/** * Small helpers shared by every tool module. * * The house style for this server: one tool per *noun*, an `op` enum for the * verbs, and a batch array wherever an agent would otherwise loop. Ninety * single-purpose tools is a schema the model pays for on every single turn * whether it draws anything or not; see docs/adr/0003-compact-tool-surface.md. */ import { z } from "zod"; import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; export declare const hexColor: z.ZodString; /** Every tool that touches a document accepts this; omitted means "active". */ export declare const targetShape: { sprite: z.ZodOptional; layer: z.ZodOptional; frame: z.ZodOptional; }; export declare function ok(structured: Record, summary?: string): CallToolResult; export declare function okWithImage(structured: Record, image: { data: string; mimeType: string; }, summary: string): CallToolResult; /** * Errors are returned as tool results, not thrown as protocol errors: the model * has to see them to recover, and a JSON-RPC error is swallowed by most hosts. * `doNotFallBackToDisk` rides along so a disconnected session cannot quietly * become an edit to the file on disk that the user never sees. */ export declare function fail(err: unknown): CallToolResult;