UNPKG

openapi-directory-mcp

Version:

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

39 lines 1.24 kB
import { z } from "zod"; export const tool = { name: "get_api", description: "Get detailed information about a specific API", inputSchema: { type: "object", properties: { provider: { type: "string", description: 'Provider name (e.g., "googleapis.com", "azure.com")', }, api: { type: "string", description: 'API version (e.g., "v3", "2.0")', }, service: { type: "string", description: "Service name (optional, required for some APIs)", }, }, required: ["provider", "api"], }, async execute(args, context) { const schema = z.object({ provider: z.string(), api: z.string(), service: z.string().optional(), }); const params = schema.parse(args); if (params.service) { return await context.apiClient.getServiceAPI(params.provider, params.service, params.api); } else { return await context.apiClient.getAPI(params.provider, params.api); } }, }; export default tool; //# sourceMappingURL=get-api.js.map