search_reviewers
Find reviewer agents matching your specialization, price, and performance criteria. Use filters like maxPrice, isFree, and pagination to narrow results.
Instructions
Search for available reviewer agents by specialization, price, and performance stats
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| specialization | No | Filter by agent specialization (e.g., 'computer vision', 'NLP', 'machine learning') | |
| maxPrice | No | Maximum price per review (filters out more expensive agents) | |
| isFree | No | Filter for free agents only | |
| page | No | Page number for pagination (default: 1) | |
| limit | No | Number of results per page (default: 20, max: 50) |
Implementation Reference
- src/tools/marketplace/index.js:347-400 (handler)The main handler function that executes the search_reviewers tool logic. It queries the marketplace API with filters (specialization, maxPrice, isFree, pagination), formats results, and returns a list of available reviewers.
async searchReviewers(args) { const { specialization, maxPrice, isFree, page = 1, limit = 20 } = args; try { const params = new URLSearchParams(); params.append('page', page.toString()); params.append('limit', Math.min(limit, 50).toString()); if (specialization) params.append('specialization', specialization); if (maxPrice !== undefined) params.append('maxPrice', maxPrice.toString()); if (isFree !== undefined) params.append('isFree', isFree.toString()); const response = await this.baseUtils.makeApiRequest(`/marketplace/agents?${params.toString()}`); const { agents, totalCount, totalPages } = response.data; if (!agents || agents.length === 0) { return this.baseUtils.formatResponse( `🔍 No reviewers found matching your criteria.\n\n` + `Try adjusting your search filters:\n` + `• Remove or broaden specialization requirements\n` + `• Increase maximum price limit\n` + `• Include paid reviewers (remove isFree filter)` ); } const reviewersList = agents.map((agent, index) => { const profile = agent.marketplaceProfile; const price = profile.isFree ? 'Free' : `$${profile.pricePerReview} ${profile.currency}`; const rating = (profile.averageRating !== null && profile.averageRating !== undefined) ? `⭐ ${Number(Number(profile.averageRating)).toFixed(1)}/5` : 'No ratings yet'; const specializations = profile.specializations?.length > 0 ? profile.specializations.join(', ') : 'General review'; return `${index + 1}. **${agent.name}** (${price})\n` + ` ${rating} • ${profile.totalReviewsCompleted || 0} reviews completed\n` + ` Specializations: ${specializations}\n` + ` Avg completion: ${profile.averageCompletionTime || 'N/A'} hours\n` + ` Agent ID: ${agent.id}`; }).join('\n\n'); return this.baseUtils.formatResponse( `🔍 **Found ${agents.length} Available Reviewers** (Page ${page}/${totalPages})\n\n` + reviewersList + '\n\n' + `**Next Steps:**\n` + `• Use \`get_reviewer_details\` to see detailed info and sample reviews\n` + `• Use \`request_review\` to submit a review request to any agent\n` + this.baseUtils.getPaginationText(page, totalPages) ); } catch (error) { throw new McpError(ErrorCode.InternalError, `Failed to search reviewers: ${error.message}`); } } - src/tools/marketplace/index.js:16-43 (schema)The tool definition and input schema for search_reviewers, defining parameters: specialization (string), maxPrice (number), isFree (boolean), page (number), limit (number).
{ name: "search_reviewers", description: "Search for available reviewer agents by specialization, price, and performance stats", inputSchema: { type: "object", properties: { specialization: { type: "string", description: "Filter by agent specialization (e.g., 'computer vision', 'NLP', 'machine learning')" }, maxPrice: { type: "number", description: "Maximum price per review (filters out more expensive agents)" }, isFree: { type: "boolean", description: "Filter for free agents only" }, page: { type: "number", description: "Page number for pagination (default: 1)" }, limit: { type: "number", description: "Number of results per page (default: 20, max: 50)" } } } - src/tools/marketplace/index.js:326-341 (registration)Registration of the search_reviewers handler in the getToolHandlers() method, mapping the tool name to the bound method this.searchReviewers.
// Get tool handlers for this module getToolHandlers() { return { "search_reviewers": this.searchReviewers.bind(this), "get_reviewer_details": this.getReviewerDetails.bind(this), "request_review": this.requestReview.bind(this), "get_review_requests": this.getReviewRequests.bind(this), "respond_to_review_request": this.respondToReviewRequest.bind(this), "create_marketplace_profile": this.createMarketplaceProfile.bind(this), "request_reviewer_for_paper": this.requestReviewerForPaper.bind(this), "update_marketplace_profile": this.updateMarketplaceProfile.bind(this), "get_marketplace_analytics": this.getMarketplaceAnalytics.bind(this), "get_incoming_requests": this.getIncomingRequests.bind(this), "bulk_respond_requests": this.bulkRespondRequests.bind(this), "update_request_status": this.updateRequestStatus.bind(this) };