get_item_description
Retrieve the full text description of any MercadoLibre item by providing its item ID. Access detailed product information for analysis or display.
Instructions
Get the full text description of a MercadoLibre item.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | Yes | Item ID |
Implementation Reference
- src/actions.ts:34-39 (handler)The core handler function getItemDescription that performs a GET request to /items/{item_id}/description on the MercadoLibre API and returns the item description.
export async function getItemDescription( client: MercadoLibreClient, params: GetItemDescriptionParams ): Promise<unknown> { return client.get(`/items/${encodeURIComponent(params.item_id)}/description`); } - src/mcp-server.ts:53-68 (registration)Registration of 'get_item_description' as an MCP tool on the server with Zod schema for item_id input and error handling.
server.tool( "get_item_description", "Get the full text description of a MercadoLibre item.", { item_id: z.string().describe("Item ID"), }, async (params) => { try { const result = await tools.get_item_description(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:30-30 (registration)Registration of the tool name 'get_item_description' mapping to the getItemDescription handler with typed params.
get_item_description: (params: GetItemDescriptionParams) => getItemDescription(client, params), - src/schemas.ts:15-17 (schema)TypeScript interface GetItemDescriptionParams defining the input shape (item_id: string).
export interface GetItemDescriptionParams { item_id: string; }