Skip to main content
Glama

search-api-operations

Search for API operations across OpenAPI specifications to find endpoints, methods, and parameters for development workflows.

Instructions

Search for operations across specifications

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
specIdNo

Implementation Reference

  • The handler function for the 'search-api-operations' tool. It searches for operations using specExplorer.searchOperations and returns YAML-formatted results.
    async (args, extra) => { try { this.logger.debug('Searching API operations', { query: args.query, specId: args.specId }); const operations = await this.specExplorer.searchOperations( args.query, args.specId ); return { content: [ { type: "text", text: stringify({ operations }, { indent: 2 }) }, ], }; } catch (error) { this.logger.error('Failed to search API operations', { error, query: args.query }); throw error; } }
  • Input schema for the tool using Zod: query (required string), specId (optional string).
    { query: z.string(), specId: z.string().optional(), },
  • Registration of the 'search-api-operations' tool on the MCP server with name, description, schema, and handler.
    server.tool( "search-api-operations", "Search for operations across specifications", { query: z.string(), specId: z.string().optional(), }, async (args, extra) => { try { this.logger.debug('Searching API operations', { query: args.query, specId: args.specId }); const operations = await this.specExplorer.searchOperations( args.query, args.specId ); return { content: [ { type: "text", text: stringify({ operations }, { indent: 2 }) }, ], }; } catch (error) { this.logger.error('Failed to search API operations', { error, query: args.query }); throw error; } } );

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