Skip to main content
Glama

get-api-catalog

Retrieve the API catalog to access metadata for all OpenAPI specifications, operations, and schemas, enabling easier integration and understanding within development tools.

Instructions

Get the API catalog, the catalog contains metadata about all openapi specifications, their operations and schemas

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'get-api-catalog' MCP tool, including the inline handler that fetches the catalog from specExplorer and returns it as YAML string.
    server.tool( "get-api-catalog", "Get the API catalog, the catalog contains metadata about all openapi specifications, their operations and schemas", async () => { try { this.logger.debug('Getting API catalog'); const catalog = await this.specExplorer.getApiCatalog(); return { content: [ { type: "text", text: stringify({ catalog }, { indent: 2 }) }, ], }; } catch (error) { this.logger.error('Failed to get API catalog', { error }); throw error; } } );
  • Inline handler function for the tool that calls specExplorer.getApiCatalog() and formats the response.
    async () => { try { this.logger.debug('Getting API catalog'); const catalog = await this.specExplorer.getApiCatalog(); return { content: [ { type: "text", text: stringify({ catalog }, { indent: 2 }) }, ], }; } catch (error) { this.logger.error('Failed to get API catalog', { error }); throw error; } }
  • Implementation of getApiCatalog() in SpecService (FileSystemSpecService) which returns the cached catalog of API specifications.
    async getApiCatalog(): Promise<SpecCatalogEntry[]> { return this.catalog; }
  • Type definition for SpecCatalogEntry, the structure returned by getApiCatalog().
    export interface SpecCatalogEntry { /** URI identifying the specification */ uri: SpecUri; /** Optional description of the specification */ description?: string; /** List of operations in the specification */ operations: SpecOperationEntry[]; /** List of schemas in the specification */ schemas: SpecSchemaEntry[]; }
  • Interface definition of getApiCatalog method in ISpecExplorer.
    getApiCatalog(): Promise<SpecCatalogEntry[]>;

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/ReAPI-com/mcp-openapi'

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