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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| specId | No |
Implementation Reference
- src/McpService.ts:99-115 (handler)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; } }
- src/McpService.ts:95-98 (schema)Input schema for the tool using Zod: query (required string), specId (optional string).{ query: z.string(), specId: z.string().optional(), },
- src/McpService.ts:92-116 (registration)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; } } );