Built-in tools
Pi addstool_search when an Agent has deferred tools from an MCP server or an OpenAPI toolset.
codemode cannot call custom tools or tools that require confirmation.
MCP tools
The model sees each tool on an Agent’s MCP server asmcp__<server>__<tool>. By default, every MCP call pauses for approval (evaluated_permission: "ask") unless an mcp_toolset allows it:
OpenAPI toolsets
Anopenapi_toolset exposes operations from a JSON OpenAPI 3.0 or 3.1 document. This Pi Agent discovers its catalog operations through tool_search.
Save this as catalog-agent.json. Set model to a model available on your deployment. The example catalog URL describes a sample service.
catalog-agent.json
operations, including their input schemas, along with base_url and source. You can provide document_url for a public HTTPS JSON document. Checkfu reads the document when it creates the Agent version and records its source.
The model sees mcp__catalog__getItem and mcp__catalog__getCategory. Calls ask for approval by default. The named getCategory configuration allows that call to run automatically. For an authenticated API, explicitly bind a prefix-scoped Credential to catalog when creating the Session. Its scope must cover the toolset’s base_url.
An inline document shares the Agent’s request body limit. See Agents and Environments limits for the fetched document, toolset, operation, and compiled tools limits.
Custom tools
Declare custom tools on the Agent; your application handles running them.Answer a paused turn
When the agent calls a custom tool or an MCP or OpenAPI tool that requires approval, the turn pauses with stop reasonrequires_action. Answer every waiting call in stop_reason.event_ids and the turn resumes: