Skip to main content
Glama

get-api-catalog

Retrieve the API catalog containing metadata for all OpenAPI specifications, operations, and schemas to enable AI-powered development tools to understand and work with your APIs.

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 MCP tool 'get-api-catalog' including its description and handler function. The handler fetches the API catalog from the specExplorer and serializes it to YAML text for response.
    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; } } );
  • Implementation of the getApiCatalog method in FileSystemSpecService (implements ISpecExplorer), which returns the pre-built catalog of discovered API specifications.
    async getApiCatalog(): Promise<SpecCatalogEntry[]> { return this.catalog; }
  • Type signature of getApiCatalog method in ISpecExplorer interface, returning Promise<SpecCatalogEntry[]>.
    /** * List all specifications in the catalog */ getApiCatalog(): Promise<SpecCatalogEntry[]>;
  • Type definition for SpecCatalogEntry, the core data structure of the API catalog 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[]; }

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