find_tools
Search for AI agent tools using semantic queries and rank results by AN Score to discover relevant APIs for integration.
Instructions
Semantic search for agent tools, ranked by AN Score
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Semantic search query for tool discovery | |
| limit | No | Max results to return (default 10) |
Implementation Reference
- packages/mcp/src/tools/find.ts:21-52 (handler)The handler function `handleFindServices` performs a semantic search for services using the Rhumb API and ranks them by aggregate score.
export async function handleFindServices( input: FindServiceInput, client: RhumbApiClient ): Promise<FindServiceOutput> { const limit = Math.min(Math.max(input.limit ?? DEFAULT_LIMIT, 1), MAX_LIMIT); try { const services = await client.searchServices(input.query); // Sort by aggregateScore descending — nulls sink to bottom const sorted = [...services].sort((a, b) => { if (a.aggregateScore === null && b.aggregateScore === null) return 0; if (a.aggregateScore === null) return 1; if (b.aggregateScore === null) return -1; return b.aggregateScore - a.aggregateScore; }); return { services: sorted.slice(0, limit).map((s) => ({ name: s.name, slug: s.slug, aggregateScore: s.aggregateScore, executionScore: s.executionScore, accessScore: s.accessScore, explanation: s.explanation })) }; } catch { // Resilient fallback: return empty array on any error return { services: [] }; } } - packages/mcp/src/server.ts:57-71 (registration)Registration of the 'find_services' tool in the MCP server, which calls `handleFindServices`. Note that while the user asked for 'find_tools', the implementation and registration are for 'find_services'.
// -- find_services ----------------------------------------------------- server.tool( "find_services", "Search indexed Services by what you need them to do. Returns ranked Services with AN Scores. Use this when you know the problem but not which Service to call. For Capability-level search (e.g. 'email.send'), use discover_capabilities instead.", { query: z.string().describe(FindServiceInputSchema.properties.query.description), limit: z.number().min(1).max(50).optional().describe(FindServiceInputSchema.properties.limit.description) }, async ({ query, limit }) => { const result = await handleFindServices({ query, limit }, client); return { content: [{ type: "text" as const, text: JSON.stringify(result) }] }; } );