mcp-server-kubernetes
Version:
MCP server for interacting with Kubernetes clusters via kubectl
19 lines (18 loc) • 819 B
TypeScript
export type ToolDefinition = {
name: string;
inputSchema: unknown;
};
/**
* Validate `input` against `tool.inputSchema` and return the arguments the
* tool should run with. Throws an McpError (InvalidParams) listing every
* problem found.
*
* Normalisation is limited to unambiguous cases, so a call that would have
* worked before keeps working:
* - an enum value that differs only in case is replaced by the listed one
* ("Pod" -> "pod"); the handlers lower-case several of these anyway
* - a required argument that is missing but has a schema default gets the
* default, which is what the handlers fall back to
* - an optional argument passed as null is treated as omitted
*/
export declare function validateToolInput(tool: ToolDefinition, input: unknown): Record<string, unknown>;