MCP

Search mode

Starting with a few tools that find the rest, instead of every schema.

A connection that can do everything lists well over a hundred tools, and an assistant pays for every one of their schemas on every turn — tens of thousands of tokens before it has done anything. In search mode it starts with five tools instead, and loads one tool's schema only when it is about to use it:

ToolWhat it does
whoamiThe companies the connection reaches, and how many tools each allows, by domain.
search_tools{ query, domain?, kind?, limit? } — the best-matching tools, one line each.
describe_tool{ name } — one tool's full description, input schema, and which runner to use.
run_tool{ name, arguments } — runs a tool that only reads.
run_write_tool{ name, arguments } — runs a tool that changes data. Listed only where something may be written.

The server's instructions tell the assistant the order: search, describe, run. These are ordinary MCP tools, so any client that speaks MCP works without knowing anything about the mode.

Reads and writes run through separate tools because clients decide whether to ask you first from a tool's annotations: run_write_tool is marked as changing data, so a client that confirms changes confirms every one, and run_tool can't be used to slip a write past that.

Nothing about permissions changes. Search and describe show only the tools the connection was granted, and the runners call the same code as the tool itself — the same argument checks, the same per-company permission check, the same API request, logged under the tool's own name.

Choosing the mode. New connections start in search mode; connections made before it existed keep the full list. Switch either way under the connection in Dev Tools → MCP — it applies on the assistant's next request, and every tool stays callable by name in both modes, so a client holding the old list keeps working. A client using a company API token, which has no connection to store a choice on, gets the full list unless it sends X-Pxb-Tools: search; any client may send X-Pxb-Tools: full or search to override its connection for one request.

When what a connection is shown changes mid-conversation — the mode switched, a permission granted or taken away — the server sends notifications/tools/list_changed with the answer to the assistant's next tool call, so a client that listens fetches the list again.