touchdesigner-mcp-server
Version:
MCP server for TouchDesigner
30 lines (29 loc) • 1.08 kB
TypeScript
import type { z } from "zod";
import type { ToolNames } from "../index.js";
import { type ToolCategory, type ToolDefinition } from "../toolDefinitions.js";
export type { ToolCategory };
export interface ToolParameterMetadata {
name: string;
type: string;
required: boolean;
description?: string;
}
export interface ToolMetadata {
tool: ToolNames;
modulePath: string;
functionName: string;
description: string;
category: ToolCategory;
parameters: ToolParameterMetadata[];
returns: string;
example: string;
notes?: string;
}
/**
* Builds the `describe_td_tools` manifest from the tool table. Parameter
* metadata is introspected from each tool's Zod schema, so it always reflects
* the schema that is actually registered (sourced from the OpenAPI spec).
*/
export declare function buildToolMetadata(definitions?: readonly ToolDefinition[]): ToolMetadata[];
/** Introspects a Zod object schema into flat parameter metadata. */
export declare function deriveParameters(schema: z.ZodObject<z.ZodRawShape>): ToolParameterMetadata[];