Skip to main content
Glama
list_openapi_spec_sources.ts979 B
import { CallToolResult, TextContent, ServerRequest, ServerNotification, } from "@modelcontextprotocol/sdk/types.js"; import { RequestHandlerExtra } from "@modelcontextprotocol/sdk/shared/protocol.js"; // --- List OpenAPI Specs Tool --- export const list_openapi_spec_sources = async ( extra: RequestHandlerExtra<ServerRequest, ServerNotification>, apiSpecSources: Record<string, string> ): Promise<CallToolResult> => { if (Object.keys(apiSpecSources).length === 0) { return { content: [ { type: "text", text: "No OpenAPI specifications configured." }, ], }; } let formatted_specs = "Available OpenAPI specifications:\n"; for (const name in apiSpecSources) { formatted_specs += `- ${name}: ${apiSpecSources[name]}\n`; } const content: TextContent[] = [ { type: "text", text: formatted_specs.trim() }, ]; return { content }; }; // Copyright (C) 2025 Christopher White // SPDX-License-Identifier: AGPL-3.0-or-later

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/maverickg59/sushimcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server