MCP servers
Attach a connected MCP server to a prompt by reference — credential_id plus an optional tool_names subset. No secret or schema is stored on the version; tool schemas resolve live at run time.
An mcp_tool reference attaches a connected MCP server to a prompt version. Where a function tool is self-contained, an MCP reference is a pointer: the server is connected once elsewhere, and the version stores only enough to find it. In the dashboard, tools are edited as raw JSON.
Attaching by reference
An mcp_tool reference carries a credential_id for the connected server and an optional tool_names subset:
[
{
"kind": "mcp_tool",
"credential_id": "cred_mcp_orders",
"tool_names": ["lookup_order", "cancel_order"]
}
]tool_namesset — the prompt is scoped to exactly those tools.tool_namesnull — the prompt gets all tools the server exposes, now and later. This is late binding: a tool added to the server after this version was saved comes along automatically, with no prompt edit.
Two properties make this safe, and both are deliberate:
- No secret is stored on the version. Only the reference to the connected server lives on the version. A version is immutable and readable by the whole team; a credential must never be copyable into one.
- No schema is stored on the version. Tool schemas are resolved live from the server at run time, so the prompt follows the server rather than a frozen snapshot.
How it appears in compile
compile() returns the reference on the tools field exactly as stored — it does not fetch schemas or run anything. You resolve the concrete schemas from the connected server and run the tool-calling loop with your provider.
const { tools } = prompt.compile({ question: 'refund status?' });
// tools: [{ kind: 'mcp_tool', credential_id: 'cred_mcp_orders', tool_names: ['lookup_order'] }]compiled = prompt.compile(question="refund status?")
# compiled.tools:
# [{"kind": "mcp_tool", "credential_id": "cred_mcp_orders", "tool_names": ["lookup_order"]}]The Playground and Experiments resolve the attached servers' live schemas and run the tool-calling loop for you — so you can see a tool-using prompt actually work before you ship it.
Tools
Self-contained function tools stored on a version — a name and a JSON Schema — and how compile hands them back for you to wire into your provider's tool-calling loop.
Output format
The response_format stored on a version — null, a JSON object mode, or a named JSON schema — passed through unchanged by compile for you to hand to your provider.