UNPKG

@codervisor/devlog-mcp

Version:

MCP server for managing development logs and working notes

31 lines 1.04 kB
/** * MCP Tool validation utilities * * This module provides utilities for validating MCP tool arguments * using Zod schemas and generating proper error responses. */ import { z } from 'zod'; import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'; /** * Validate tool arguments and return validated data or error result */ export declare function validateToolArgs<T>(schema: z.ZodSchema<T>, args: unknown, toolName: string): { success: true; data: T; } | { success: false; result: CallToolResult; }; /** * Create a standardized error response for tool validation failures */ export declare function createValidationErrorResponse(toolName: string, errors: string[]): CallToolResult; /** * Create a standardized success response */ export declare function createSuccessResponse(message: string): CallToolResult; /** * Create a standardized error response */ export declare function createErrorResponse(message: string, error?: unknown): CallToolResult; //# sourceMappingURL=validation.d.ts.map