Skip to main content
Glama

list_openapi_spec_sources

Fetch available source URLs for OpenAPI specifications, enabling developers to integrate API definitions into their AI-powered IDEs via SushiMCP.

Instructions

This tool lists all available source urls where an OpenAPI spec can be fetched.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that implements the logic for the 'list_openapi_spec_sources' tool. It formats and returns a list of available OpenAPI spec sources passed via apiSpecSources.
    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 };
    };
  • src/index.ts:114-119 (registration)
    Registers the 'list_openapi_spec_sources' tool with the MCP server, providing its description and handler wrapper that passes CLI-provided openApiSpecs.
    server.tool(
      "list_openapi_spec_sources",
      "This tool lists all available source urls where an OpenAPI spec can be fetched.",
      (extra: RequestHandlerExtra<ServerRequest, ServerNotification>) =>
        list_openapi_spec_sources(extra, openApiSpecs)
    );
  • src/index.ts:66-77 (registration)
    Declares the tool capability in the MCP server's capabilities object, including name, description, and annotations.
    list_openapi_spec_sources: {
      name: "list_openapi_spec_sources",
      description:
        "List the source urls where an OpenAPI spec can be fetched.",
      annotations: {
        title: "List OpenAPI spec sources",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false,
      },
    },
  • src/index.ts:11-14 (registration)
    Imports the list_openapi_spec_sources handler from the tools module.
    list_llms_txt_sources,
    fetch_llms_txt,
    fetch_openapi_spec,
    list_openapi_spec_sources,
  • src/tools/index.ts:5-5 (registration)
    Re-exports the tool handler from its implementation file.
    export * from "./list_openapi_spec_sources.js";
Install Server

Other Tools

Related Tools

Latest Blog Posts

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