search_apis
Query and retrieve API details from Eolink OpenAPI using a search interface, facilitating API integration and management within the Windsurf IDE development environment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query |
Implementation Reference
- src/services/mcpServer.ts:107-119 (registration)Registers the MCP tool named 'search_apis' with Zod input schema requiring a 'query' string and an async handler function that calls eolinkService.searchApis and returns the results as formatted JSON text content.this.server.tool( "search_apis", { query: z.string().describe("Search query") }, async ({ query }) => { const apis = await eolinkService.searchApis(query); return { content: [{ type: "text", text: JSON.stringify({ apis }, null, 2) }] }; } );
- src/services/eolinkService.ts:97-108 (handler)Core handler function that executes the API search by making an authenticated GET request to Eolink's search endpoint `/search/apis?q={query}` and returns the array of matching APIs or empty on error.async searchApis(query: string): Promise<Api[]> { try { const response = await axios.get(`${this.baseUrl}/search/apis`, { headers: this.getHeaders(), params: { q: query }, }); return response.data.data || []; } catch (error) { console.error(`Error searching APIs with query "${query}":`, error); return []; } }
- src/services/mcpServer.ts:109-109 (schema)Zod schema defining the input parameter 'query' as a required string for the search_apis tool.{ query: z.string().describe("Search query") },