import type { CallToolResult } from '@modelcontextprotocol/client';
import { type MCPAccessor } from '../../../accessor/mcp.ts';
import { type CommandOutput } from '../../../io/types.ts';
import type { PathSpec } from '../../../types.ts';
import type { Context } from '../../config.ts';
/** The leaf errors inside an aggregate error, one each, as `<name>: <message>`. */
export declare function causes(error: unknown): string[];
/** The subcommand a tool becomes: underscores read as dashes. */
export declare function commandName(toolName: string): string;
/** A tool's answer as text: text blocks as they are, others as compact JSON. */
export declare function render(result: Pick<CallToolResult, 'content' | 'structuredContent'>): string;
/**
 * Run one MCP tool with the JSON object given as its operand.
 *
 * @param tool the tool's MCP name.
 * @param accessor the install's server.
 * @param _paths unused; a tool takes no path.
 * @param texts at most one JSON object.
 * @param ctx the command context; its signal abandons the call.
 */
export declare function callTool(tool: string, accessor: MCPAccessor, _paths: PathSpec[], texts: string[], ctx: Context): Promise<CommandOutput>;
//# sourceMappingURL=call.d.ts.map