seller_reputation
Retrieve seller reputation insights for MercadoLibre using the seller ID, enabling better decision-making for buyers and sellers.
Instructions
Obtiene la reputación de un vendedor
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sellerId | No | ID del vendedor |
Implementation Reference
- src/services/api.service.ts:50-58 (handler)Core implementation of the seller_reputation tool: fetches seller data (reputation) from MercadoLibre API endpoint /users/{sellerId}.async sellerReputation (sellerId: string) { const headers = await this.getHeaders() const response = await fetch(`${this.baseURL}users/${sellerId}`, { headers }) if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`) } const data = await response.json() return data }
- src/handlers/tools.handler.ts:38-50 (registration)Registers the seller_reputation tool in the listTools() method, including name, description, and input schema.{ name: 'seller_reputation', description: 'Obtiene la reputación de un vendedor', inputSchema: { type: 'object', properties: { sellerId: { type: 'string', description: 'ID del vendedor' } } } },
- src/handlers/tools.handler.ts:41-49 (schema)Defines the input schema for seller_reputation tool: requires sellerId as string.inputSchema: { type: 'object', properties: { sellerId: { type: 'string', description: 'ID del vendedor' } } }
- src/handlers/tools.handler.ts:84-93 (helper)Helper in callTool method: handles tool invocation by calling apiService.sellerReputation and formatting the JSON response.case 'seller_reputation': { const { sellerId } = args as { sellerId: string } const reputation = await this.apiService.sellerReputation(sellerId) return { content: [{ type: 'text', text: JSON.stringify(reputation, null, 2) }] } }