export interface ToolSpec { name: string description: string inputSchema: Record isReadOnly?: boolean isDestructive?: boolean } export interface ToolResult { name: string output: unknown isError: boolean toolUseId?: string } export interface ToolContext { cwd: string workspaceRoot: string } export interface Tool { spec(): ToolSpec run(input: Record, ctx: ToolContext): ToolResult | Promise }