browse_marketplace
Search and filter available functions on Theagora marketplace. Browse listings with provider details, pricing, and quality specifications. Use parameters to filter by keyword, price range, or provider.
Instructions
Search and filter available functions on the Theagora marketplace. Returns function listings with provider info, pricing, and QoS specs. Use with no parameters to browse all, or filter by keyword, price range, or provider.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | Search keyword (matches name and description) | |
| minPrice | No | Minimum price in cents | |
| maxPrice | No | Maximum price in cents | |
| sort | No | Sort order | |
| provider | No | Filter by provider agent ID |
Implementation Reference
- src/tools/discovery.ts:8-31 (handler)The browse_marketplace tool handler - registers the tool with MCP server, defines input schema (q, minPrice, maxPrice, sort, provider), and implements the handler logic that calls client.listFunctions() and returns results as JSON text
server.tool( 'browse_marketplace', 'Search and filter available functions on the Theagora marketplace. Returns function listings with provider info, pricing, and QoS specs. Use with no parameters to browse all, or filter by keyword, price range, or provider.', { q: z.string().optional().describe('Search keyword (matches name and description)'), minPrice: z.number().optional().describe('Minimum price in cents'), maxPrice: z.number().optional().describe('Maximum price in cents'), sort: z.enum(['price_asc', 'price_desc', 'newest', 'name']).optional().describe('Sort order'), provider: z.string().optional().describe('Filter by provider agent ID'), }, { readOnlyHint: true, openWorldHint: true }, async (params) => { const results = await client.listFunctions({ q: params.q, minPrice: params.minPrice, maxPrice: params.maxPrice, sort: params.sort, provider: params.provider, }); return { content: [{ type: 'text' as const, text: JSON.stringify(results, null, 2) }], }; } ); - src/tools/discovery.ts:11-17 (schema)Zod validation schema for browse_marketplace parameters: optional search keyword (q), price range filters (minPrice, maxPrice), sort order enum, and provider filter
{ q: z.string().optional().describe('Search keyword (matches name and description)'), minPrice: z.number().optional().describe('Minimum price in cents'), maxPrice: z.number().optional().describe('Maximum price in cents'), sort: z.enum(['price_asc', 'price_desc', 'newest', 'name']).optional().describe('Sort order'), provider: z.string().optional().describe('Filter by provider agent ID'), }, - src/client.ts:109-117 (helper)AgoraApiClient.listFunctions() method - makes HTTP GET request to /functions endpoint with optional query parameters (q, minPrice, maxPrice, sort, provider) and returns the API response
async listFunctions(params?: { q?: string; minPrice?: number; maxPrice?: number; sort?: string; provider?: string; }): Promise<any> { return this.request('/functions', { params: params as any }); }