@vapi-ai/mcp-server
Version:
Vapi MCP Server
16 lines • 904 B
TypeScript
import { z } from 'zod';
export type ToolResponse = {
content: Array<{
type: 'text';
text: string;
}>;
};
export declare function createSuccessResponse(data: any): ToolResponse;
export declare function createErrorResponse(error: any): ToolResponse;
export declare function createToolHandler<T>(handler: (params: T) => Promise<any>): (params: T) => Promise<ToolResponse>;
export declare function createParamsSchema<T>(schema: z.ZodType<T>): any;
export declare function createIdParamSchema(paramName: string, description: string): any;
export declare const withErrorHandling: <T>(handler: () => Promise<T>) => Promise<ToolResponse>;
export declare const filterResponseWithSchema: <T>(data: any, schema: z.ZodType<T>) => T;
export declare const withSchemaFiltering: <T>(handler: () => Promise<any>, schema: z.ZodType<T>) => Promise<ToolResponse>;
//# sourceMappingURL=utils.d.ts.map