import { type JsonObject } from './boundaryDecoder'; /** * The slice of the runpane contract that MCP tools are generated from. Every * command with result `jsonSchemas` becomes a tool; its inputs are the union of * the flags in its `usage` lines and its `agentContext` arguments, plus * `--pane-dir` for daemon commands. Inputs are strings or booleans unless the argument declares * a `schema`. Its output schema is the command's `*Result` schema. */ export interface McpToolContract { commands: readonly { name: string; summary: string; usage: readonly string[]; mutates?: boolean; additive?: boolean; idempotent?: boolean; openWorld?: boolean; toolsets?: readonly string[]; jsonSchemas?: readonly string[]; }[]; /** Named JSON Schemas; `#/jsonSchemas/...` refs inside them resolve against the contract root. */ jsonSchemas: unknown; flags: Readonly>; agentContext: { commands: Readonly>; }; } interface McpToolParameter { flag: string; property: string; takesValue: boolean; /** Array and object values reach the CLI as JSON text. */ json: boolean; } export interface McpTool { name: string; title: string; command: string; /** Contract toolsets that serve this tool (`runpane mcp --toolsets`). */ toolsets: readonly string[]; description: string; parameters: McpToolParameter[]; inputSchema: { type: 'object'; properties: Record; required?: string[]; additionalProperties: false; }; outputSchema: JsonObject; /** MCP tool annotations; see the `additive`, `idempotent`, and `openWorld` contract fields. */ annotations: { title: string; readOnlyHint: boolean; destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; }; } export declare const CONFIRM_FLAG = "--yes"; export declare function buildMcpTools(contract?: McpToolContract): McpTool[]; /** Builds the argv for one tool call; the result is `runpane ` with `--json`. */ export declare function buildToolArgv(tool: McpTool, input?: JsonObject): string[]; export {}; //# sourceMappingURL=mcpTools.d.ts.map