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 operates in different modes based on which parameters you provide. Mode resolution follows this priority:
tool (call) > connect > describe > search > server (list) > status
Status Mode
Shows the connection status and tool count for all configured servers.Trigger
Callmcp() with no parameters or an empty object:
Response
Status Indicators
✓- Connected○- Not connected (cached metadata available)✗- Failed (includes time since last failure)
Details Object
List Mode
Lists all tools from a specific server.Trigger
Provide theserver parameter:
Response
(not connected, cached).
Details Object
Errors
- Server not found - If the server name doesn’t exist in config
- Not connected - If the server has no cached metadata and isn’t connected
Search Mode
Searches for tools by name or description. Searches both MCP tools and Pi tools from installed extensions.Trigger
Provide thesearch parameter:
Search Behavior
- Default: Space-separated words are OR’d (matches if any word is found)
- Regex mode: Set
regex: trueto use regular expression matching - Case-insensitive by default
Response (with schemas)
Compact Output
SetincludeSchemas: false for compact results without parameter details:
Filter by Server
Combinesearch and server to search within a specific server:
Details Object
Errors
- Empty query - Search string is empty or only whitespace
- Invalid pattern - Regex is malformed (only in regex mode)
Describe Mode
Shows detailed information about a specific tool, including its parameter schema.Trigger
Provide thedescribe parameter:
Response
Parameter Schema Format
Each parameter shows:- Name
- Type (string, number, boolean, enum, object, array, etc.)
- Required indicator (
*required*suffix) - Description (if available)
- Default value (if specified in schema)
- Enum values (for enum types)
Resource Tools
For resource tools (tools that read MCP resources), the output indicates no parameters are required:Details Object
Errors
- Tool not found - No tool with that name exists
Call Mode
Calls an MCP tool with the provided arguments.Trigger
Provide thetool parameter:
Arguments Validation
Theargs parameter is:
- Parsed from JSON string to object
- Validated to ensure it’s an object (not null, array, or primitive)
- Sent to the MCP server for execution
Server Discovery
If noserver parameter is provided, the tool attempts to find the server by:
- Exact tool name match across all cached metadata
- Normalized match (hyphens/underscores treated as equivalent)
- Prefix extraction - If tool name starts with a server prefix, lazy-connect to that server
Lazy Connection
Servers are connected on-demand:- If the server is already connected, the tool is called immediately
- If not connected but in cache, the server connects first
- If connection fails, a backoff timer prevents repeated connection attempts
Response
Successful tool calls return the content from the MCP server:Error Responses
Errors include the expected parameter schema to help with self-correction:Details Object
Errors
- Tool not found - Includes available tools from matched server
- Server unavailable - Includes backoff timer information
- Tool error - The tool ran but returned an error
- Call failed - Network error, crash, or validation failure
Connect Mode
Explicitly connects to a server and refreshes its metadata cache.Trigger
Provide theconnect parameter:
Behavior
- Forces a connection to the specified server (even if already connected)
- Fetches fresh tool and resource metadata
- Updates the metadata cache
- Returns the tool list (same as list mode)
Use Cases
- Manually refresh metadata after server updates
- Force connection to a lazy server before needed
- Recover from a failed connection (bypasses backoff timer)
- Verify server configuration is working
Response
Returns the same format as list mode after successful connection.Details Object
Errors
- Server not found - Server name not in config
- Connect failed - Connection or initialization error
Mode Priority
When multiple parameters are provided, the highest priority mode wins:Related
- mcp() Tool Reference - Complete API documentation
- Tool Prefix Settings - Configure tool naming
- Server Lifecycle - Control when servers connect