Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nicobailon/pi-mcp-adapter/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Themcp() tool is a unified gateway that provides access to all MCP servers and their tools through a single interface. Instead of registering hundreds of individual tools (which would consume 10,000+ tokens), the adapter exposes one proxy tool (~200 tokens) that routes requests to the appropriate MCP server.
Function Signature
Parameters
Tool name to call (e.g.,
'chrome_devtools_take_screenshot'). Triggers call mode.Arguments as a JSON string (e.g.,
'{"key": "value"}'). Must be a valid JSON object, not an array or primitive.Important: This is a JSON string, not an object. The string will be parsed and validated.Server name to connect to. Triggers connect mode. Forces a connection and refreshes metadata for the specified server.
Tool name to describe. Triggers describe mode. Shows tool details including parameters and their schemas.
Search query for finding tools. Triggers search mode. Space-separated words are OR’d together (like most search engines).Searches both MCP tools and Pi tools from installed extensions.
Treat the search query as a regular expression instead of space-separated terms.
Include parameter schemas in search results. Set to
false for compact output.Filter results to a specific server. Works with search mode and list mode. Also disambiguates tool calls when multiple servers have the same tool name.
Operation Modes
The tool’s behavior is determined by which parameters you provide. Mode resolution follows this priority: tool > connect > describe > search > server > status See Operation Modes for detailed documentation of each mode.Return Values
Success Response
Error Response
Array of content blocks. Text content includes tool output, status information, or error messages. May include images or other media types from MCP tools.
Structured metadata about the operation. Always includes a
mode field. Error responses include an error field.Only present on error responses. Indicates that the operation failed.
Examples
Status Check
Search Tools
Describe Tool
Call Tool
Connect to Server
Filter by Server
github server.
Error Handling
Common Errors
MCP initialization failed. Check server logs and configuration.
MCP not initialized. Wait for initialization to complete.
The
args parameter contains invalid JSON.The
args parameter parsed successfully but is not a JSON object (it’s an array, null, or primitive).The requested tool was not found in any connected server. The error message includes available tools if a server was identified.
The specified server does not exist in the configuration.
The server failed to connect. May include backoff information.
Failed to establish connection to the server. Check server command, args, and environment.
The tool executed but returned an error. The error message includes the expected parameter schema to help with self-correction.
Failed to call the tool (network error, crash, etc.). Includes expected parameter schema.
Tool Name Resolution
Tools are found using the following logic:- Exact match - If a tool with the exact name exists, use it
- Normalized match - Hyphens and underscores are treated as equivalent (
resolve-library-idmatchesresolve_library_id) - Prefix match - If no match found and
toolPrefixis not"none", extract the server prefix and try connecting to that server - Server parameter - If
serverparameter is provided, only search that specific server
Related
- Operation Modes - Detailed documentation for each mode
- Server Options - Configure MCP servers
- Settings - Global MCP settings