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
This page documents the core TypeScript types used throughout the Pi MCP Adapter. These types are defined intypes.ts and used across the extension.
Configuration Types
McpConfig
Root configuration object formcp.json.
Map of server names to their configurations. Each key is a server name, each value is a
ServerEntry.List of external configurations to import. See ImportKind.
Global settings. See McpSettings.
ServerEntry
Configuration for a single MCP server.McpSettings
Global settings for all MCP servers.ImportKind
Supported external configuration sources.MCP Protocol Types
McpTool
Tool definition from an MCP server.The tool’s identifier (e.g.,
"take_screenshot").Human-readable title.
Tool description shown to the LLM.
JSON Schema object defining the tool’s parameters.
McpResource
Resource definition from an MCP server.Resource URI (e.g.,
"file:///project/README.md").Resource identifier.
Resource description.
Content MIME type (e.g.,
"text/plain", "application/json").McpContent
Content block returned by MCP tools.Content type discriminator.
Text content (for
type: "text").Base64-encoded data (for
type: "image" or type: "audio").MIME type for binary content.
Embedded resource content (for
type: "resource").Resource URI (for
type: "resource_link").Internal Types
ToolMetadata
Internal representation of a tool with prefixed name and original name.Tool name with server prefix applied (based on
toolPrefix setting).Original tool name from the MCP server (before prefixing).
Tool description.
If present, this tool reads from an MCP resource instead of calling a tool. The
resourceUri is the URI to read.JSON Schema for tool parameters. Stored for
describe mode and error messages.DirectToolSpec
Specification for a directly-registered Pi tool.The server this tool belongs to.
Original MCP tool name.
Prefixed name used for Pi tool registration.
Tool description.
JSON Schema for parameters.
If present, this is a resource tool.
Transport
Union of supported MCP transport types.@modelcontextprotocol/sdk:
- StdioClientTransport - Local process communication via stdin/stdout
- SSEClientTransport - HTTP server-sent events
- StreamableHTTPClientTransport - HTTP streaming (preferred for HTTP servers)
ContentBlock
Pi content block type (returned to the agent).@mariozechner/pi-ai:
- TextContent -
{ type: "text", text: string } - ImageContent -
{ type: "image", data: string, mimeType: string }
Utility Functions
getServerPrefix
Computes the prefix for a server name based on the prefix mode.formatToolName
Formats a tool name with the server prefix.Related
- Server Options -
ServerEntryfield documentation - Settings -
McpSettingsfield documentation - mcp() Tool - Tool usage and return types