Context Tools

Context tools (custom_context) don’t call an external endpoint. Instead, when the agent invokes the tool, Phonic injects a block of context (context) into the conversation. This is useful for surfacing instructions or reference material on demand — for example, a detailed script for handling a specific request that would clutter the main system prompt if always present.

See Tool Definition for the shared fields and Tool Behavior Configuration for the behavior toggles.

Because they only inject text, Context tools:

  • Cannot have parameters.
  • Always run in sync execution mode (they cannot be async).
  • Provide a Context field (context, up to 64,000 characters) instead of an endpoint.

In the dashboard, choose Context in the Create tool menu (“We’ll inject additional context into the conversation.”) and fill in the Context textarea.

Creating a Context Tool

1await client.tools.create({
2 name: "urgent_request",
3 description:
4 "Instructions for assisting with an urgent customer request.",
5 type: "custom_context",
6 execution_mode: "sync",
7 context:
8 "When the caller reports an outage, first confirm the account ID, then ...",
9});