/** * Naming for dynamic component render tools (#1272). * * A *promoted* registered component is surfaced as its own MCP tool named * `render_` whose `inputSchema` is the component's prop schema. The * MCP server synthesizes these per workspace at `tools/list` time and dispatches * calls back to the shared render path. Both sides MUST derive the tool name with * {@link componentRenderToolName} so the tool an agent sees is the tool it calls. */ /** * Reserved prefix for dynamic component render tools. No statically-registered * MCP tool may start with this (enforced by a test); the server uses it to route * a `tools/call` to the dynamic component dispatcher. */ export declare const RENDER_TOOL_PREFIX: string; /** * Derive the dynamic render-tool name for a component name, or `undefined` when * the name has no usable characters (the component is then not promotable to a * tool). The slug keeps `[A-Za-z0-9_]`, collapses every other run to a single * `_`, and trims leading/trailing underscores — yielding a valid MCP tool name. * * @example componentRenderToolName("Revenue Chart") // "render_Revenue_Chart" */ export declare function componentRenderToolName(name: string): string | undefined; /** A promoted component paired with the render-tool name it's exposed as. */ export interface PromotedRenderTool { /** The dynamic MCP tool name, `render_`. */ toolName: string; /** The component exposed by that tool. */ component: T; } /** * Select the promoted components to expose as `render_` tools, resolving * tool-name collisions deterministically (#1272). Components must be supplied in * the order the registry returns them (`updatedAt DESC`); the FIRST occurrence of * each tool name wins, so the most-recently-updated component owns the name. * Non-promoted components and names with no usable slug are skipped. * * Both the `tools/list` synthesis and the call dispatcher run this so the tool an * agent sees is exactly the tool it calls. */ export declare function selectPromotedRenderTools(components: readonly T[]): PromotedRenderTool[]; //# sourceMappingURL=component-render-tool.d.ts.map