UNPKG

openapi-directory-mcp

Version:

Model Context Protocol server for accessing enhanced triple-source OpenAPI directory (APIs.guru + additional APIs + custom imports)

30 lines 859 B
import { z } from "zod"; export const tool = { name: "clear_cache_key", description: "Clear a specific cache key", inputSchema: { type: "object", properties: { key: { type: "string", description: "Cache key to clear", }, }, required: ["key"], }, async execute(args, context) { const schema = z.object({ key: z.string(), }); const params = schema.parse(args); const deleted = context.cacheManager.delete(params.key); return { message: deleted > 0 ? `Cache key '${params.key}' cleared successfully.` : `Cache key '${params.key}' not found.`, deleted: deleted, }; }, }; export default tool; //# sourceMappingURL=clear-cache-key.js.map