openapi-directory-mcp
Version:
Model Context Protocol server for accessing enhanced triple-source OpenAPI directory (APIs.guru + additional APIs + custom imports)
24 lines • 697 B
JavaScript
import { z } from "zod";
export const tool = {
name: "get_openapi_spec",
description: "Get the OpenAPI specification for a specific API",
inputSchema: {
type: "object",
properties: {
url: {
type: "string",
description: "URL to the OpenAPI specification (JSON or YAML)",
},
},
required: ["url"],
},
async execute(args, context) {
const schema = z.object({
url: z.string(),
});
const params = schema.parse(args);
return await context.apiClient.getOpenAPISpec(params.url);
},
};
export default tool;
//# sourceMappingURL=get-openapi-spec.js.map