Skip to main content
Glama
dan1d

mercadolibre-mcp

get_item_description

Retrieve detailed product descriptions from MercadoLibre listings to analyze item specifications, features, and seller information for e-commerce research.

Instructions

Get the full text description of a MercadoLibre item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYesItem ID

Implementation Reference

  • The getItemDescription function that implements the actual tool logic. It makes an API call to the MercadoLibre API endpoint '/items/{item_id}/description' using the provided client.
    export async function getItemDescription(
      client: MercadoLibreClient,
      params: GetItemDescriptionParams
    ): Promise<unknown> {
      return client.get(`/items/${encodeURIComponent(params.item_id)}/description`);
    }
  • The GetItemDescriptionParams interface defining the input schema for the tool, which requires an item_id string parameter.
    export interface GetItemDescriptionParams {
      item_id: string;
    }
  • The MCP server tool registration for 'get_item_description'. Defines the tool name, description, Zod schema for validation, and the async handler that calls the tools.get_item_description method.
    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)
    The tool creation in createMercadoLibreTools function that creates the get_item_description tool binding, passing the client and parameters to getItemDescription.
    get_item_description: (params: GetItemDescriptionParams) => getItemDescription(client, params),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dan1d/mercadolibre-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server