import type { z } from "zod"; import type { ILogger } from "../../core/logger.js"; import type { TouchDesignerClient } from "../../tdClient/touchDesignerClient.js"; import type { ToolNames } from "./index.js"; export type ToolCategory = "system" | "python" | "nodes" | "classes" | "state"; /** * Single source of truth for a TouchDesigner MCP tool. * * Both the MCP registration loop (`registerTdTools`) and the * `describe_td_tools` manifest (`buildToolMetadata`) are derived from this * table, so a tool's description and input parameters can never drift between * what is registered and what is documented. Parameter metadata is introspected * directly from `schema`, which itself originates from the OpenAPI spec. */ export interface ToolDefinition { /** Registered MCP tool name (also the source for functionName/modulePath). */ name: ToolNames; /** Agent-facing description, used for both registration and the manifest. */ description: string; category: ToolCategory; /** Composed Zod schema: OpenAPI-derived params extended with formatting flags. */ schema: z.ZodObject; /** Human summary of the return payload (manifest only). */ returns: string; /** Usage example shown in the detailed manifest view (manifest only). */ example: string; notes?: string; /** Optional reference comment appended to error output. */ errorComment?: string; /** Executes the tool and returns formatter-ready text. */ run: (ctx: ToolRunContext) => Promise; } export interface ToolRunContext { params: Record; tdClient: TouchDesignerClient; logger: ILogger; } export declare const TOOL_DEFINITIONS: ToolDefinition[];