get_seller_info
Retrieve a seller's profile including reputation, ratings, and transaction statistics to assess trustworthiness before making a purchase.
Instructions
Get seller profile including reputation, ratings, and transaction stats.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seller_id | Yes | Seller user ID |
Implementation Reference
- src/actions.ts:56-61 (handler)The actual handler function that executes the get_seller_info tool logic. It makes a GET request to the MercadoLibre API endpoint /users/{seller_id}.
export async function getSellerInfo( client: MercadoLibreClient, params: GetSellerInfoParams ): Promise<unknown> { return client.get(`/users/${encodeURIComponent(String(params.seller_id))}`); } - src/schemas.ts:27-29 (schema)Input schema/type definition for GetSellerInfoParams, requiring a single seller_id field of type number.
export interface GetSellerInfoParams { seller_id: number; } - src/mcp-server.ts:104-119 (registration)Registration of the get_seller_info tool in the MCP server using the McpServer.tool() method with Zod schema and handler.
server.tool( "get_seller_info", "Get seller profile including reputation, ratings, and transaction stats.", { seller_id: z.number().describe("Seller user ID"), }, async (params) => { try { const result = await tools.get_seller_info(params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { const message = error instanceof Error ? error.message : String(error); return { content: [{ type: "text", text: message }], isError: true }; } }, ); - src/index.ts:33-34 (helper)Helper wiring in createMercadoLibreTools that binds the getSellerInfo action to the client instance, making it available as tools.get_seller_info.
get_seller_info: (params: GetSellerInfoParams) => getSellerInfo(client, params), get_trends: (params?: GetTrendsParams) => getTrends(client, params),