Skip to main content
Glama
googlarz

Vinted MCP and CLI Server

get_item

Fetch detailed Vinted item info including price, photos, and seller details by item ID or URL. Automatically falls back to HTML scraping when API is unavailable.

Instructions

Fetch complete item details by Vinted item ID (with country) or by a direct Vinted item URL. Returns title, price, currency, brand, size, condition, full description, all photo URLs, creation date, item URL, favourite count, and seller username/ID. Automatically falls back to HTML scraping when the JSON API is unavailable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemIdNoNumeric Vinted item ID, e.g. 5678901234
urlNoFull Vinted item URL, e.g. "https://www.vinted.fr/items/5678901234-nike-air-max". Country is inferred from the URL automatically.
countryNoCountry site (required when using itemId; inferred automatically when url is provided)
browserNoUse headless browser for retrieval. Requires optional Playwright deps; only needed for items blocked by bot detection.

Implementation Reference

  • Primary handler function for the 'get_item' tool. Parses input (itemId/url/country), decides whether to use a headless browser or the API, and returns the complete ItemDetail.
    export async function opGetItem(
      client: VintedClient,
      input: { itemId?: number; url?: string; country?: Country; browser?: boolean },
    ): Promise<ItemDetail> {
      const { id, country } = parseItemRef(input);
      const useBrowser =
        input.browser ?? (process.env.VINTED_BROWSER === '1' || process.env.VINTED_STEALTH === '1');
      if (!useBrowser) return getItem(client, id, country);
    
      const data: any = await fetchItemDetailsViaBrowser(id, country, { proxyUrl: client.proxyUrl });
      const i = data.item ?? data;
      return {
        id: Number(i.id ?? id),
        title: String(i.title ?? ''),
        price: String(i.price?.amount ?? i.price ?? ''),
        currency: String(i.price?.currency_code ?? i.currency ?? ''),
        brand: i.brand_dto?.title ?? i.brand,
        size: i.size_title ?? i.size,
        condition: i.status,
        description: i.description,
        photos: (i.photos ?? []).map((p: any) => p.full_size_url ?? p.url).filter(Boolean),
        createdAt: i.created_at_ts ?? i.created_at,
        url: i.url ?? `https://${DOMAIN[country]}/items/${id}`,
        favouriteCount: i.favourite_count,
        seller: {
          id: Number(i.user?.id ?? 0),
          username: String(i.user?.login ?? i.user?.username ?? ''),
        },
        raw: i,
      };
    }
  • MCP tool registration with input schema for 'get_item'. Defines itemId (integer), url (string), country (enum), and browser (boolean) as input properties.
    {
      name: 'get_item',
      description: 'Fetch complete item details by Vinted item ID (with country) or by a direct Vinted item URL. Returns title, price, currency, brand, size, condition, full description, all photo URLs, creation date, item URL, favourite count, and seller username/ID. Automatically falls back to HTML scraping when the JSON API is unavailable.',
      inputSchema: {
        type: 'object',
        properties: {
          itemId: { type: 'integer', description: 'Numeric Vinted item ID, e.g. 5678901234' },
          url: { type: 'string', description: 'Full Vinted item URL, e.g. "https://www.vinted.fr/items/5678901234-nike-air-max". Country is inferred from the URL automatically.' },
          country: { type: 'string', enum: COUNTRIES, description: 'Country site (required when using itemId; inferred automatically when url is provided)' },
          browser: { type: 'boolean', default: false, description: 'Use headless browser for retrieval. Requires optional Playwright deps; only needed for items blocked by bot detection.' },
        },
      },
    },
  • src/mcp.ts:220-220 (registration)
    MCP request handler switch case that dispatches the 'get_item' tool name to the opGetItem function.
    case 'get_item': result = await opGetItem(c, a as any); break;
  • Helper function that parses the input to extract item ID and country from either a URL or direct itemId/country arguments.
    export function parseItemRef(input: { itemId?: number; url?: string; country?: Country }): { id: number; country: Country } {
      if (input.url) {
        const m = input.url.match(URL_RE);
        if (!m) throw new Error(`Invalid Vinted URL: ${input.url}`);
        return { id: Number(m[2]), country: DOMAIN_TO_CC[m[1].toLowerCase()] ?? 'fr' };
      }
      if (input.itemId) {
        const c = input.country ?? 'fr';
        if (!COUNTRIES.includes(c)) throw new Error(`Unknown country: ${c}`);
        return { id: input.itemId, country: c };
      }
      throw new Error('Provide itemId or url');
    }
  • Low-level API client function that fetches item details from Vinted API endpoint, with HTML/JSON-LD fallback when the API fails.
    export async function getItem(
      client: VintedClient,
      itemId: number,
      country: Country = 'fr',
    ): Promise<ItemDetail> {
      try {
        const data = await client.apiGet<{ item: any }>(country, `/api/v2/items/${itemId}/details`);
        const i = data.item ?? data;
        return {
          id: Number(i.id),
          title: String(i.title ?? ''),
          price: String(i.price?.amount ?? i.price ?? ''),
          currency: String(i.price?.currency_code ?? i.currency ?? ''),
          brand: i.brand_dto?.title ?? i.brand,
          size: i.size_title ?? i.size,
          condition: i.status,
          description: i.description,
          photos: (i.photos ?? []).map((p: any) => p.full_size_url ?? p.url).filter(Boolean),
          createdAt: i.created_at_ts ?? i.created_at,
          url: i.url ?? `https://${DOMAIN[country]}/items/${itemId}`,
          favouriteCount: i.favourite_count,
          seller: {
            id: Number(i.user?.id ?? 0),
            username: String(i.user?.login ?? i.user?.username ?? ''),
          },
          raw: i,
        };
      } catch (err) {
        return getItemFromHtml(client, itemId, country, err);
      }
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses that the tool falls back to HTML scraping when the JSON API is unavailable, which is important behavioral context. It also mentions the optional browser parameter for bot detection. No annotations are present, so the description carries the full burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no redundancy. It front-loads the core purpose, lists return fields, and appends the fallback behavior. Every sentence contributes meaningful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the moderate complexity (4 parameters, no output schema), the description covers all key aspects: input modes, return fields, and fallback behavior. It does not explain error cases or rate limits, but that is acceptable for a read-only tool with good schema coverage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides full descriptions, but the tool description adds valuable context: clarifies that country is required with itemId (when omitted from schema), that url automatically infers country, and that browser is for bot detection requiring Playwright. This enhances understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool fetches complete item details by Vinted item ID (with country) or by a direct URL. It distinguishes from siblings like search_items or get_seller by focusing on a single item's full details.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description specifies when to use the tool (to get detailed info for a specific item) and how (via ID+country or URL). It doesn't explicitly state when not to use it or mention alternatives, but the context makes it clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/googlarz/vinted-mcp-cli'

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