Skip to main content
Glama
googlarz

Vinted MCP and CLI Server

get_categories

Retrieve the full Vinted category tree for a country. Get numeric IDs, names, and parent IDs to filter search results by department.

Instructions

Fetch the full Vinted category tree for a country. Returns a flat list of all categories and subcategories with their numeric IDs, names, parent IDs, and item counts. Pass a categoryId to search_items or search_all_items to restrict results to a department (e.g. women's clothing, men's shoes, electronics). Results are cached for 1 hour.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryNoCountry site to fetch categories for (category IDs are consistent across countries)fr
queryNoOptional keyword filter on category name, e.g. "shoes" or "dress"

Implementation Reference

  • src/mcp.ts:111-121 (registration)
    Tool registration in the TOOLS array with name 'get_categories', description, and inputSchema.
    {
      name: 'get_categories',
      description: 'Fetch the full Vinted category tree for a country. Returns a flat list of all categories and subcategories with their numeric IDs, names, parent IDs, and item counts. Pass a categoryId to search_items or search_all_items to restrict results to a department (e.g. women\'s clothing, men\'s shoes, electronics). Results are cached for 1 hour.',
      inputSchema: {
        type: 'object',
        properties: {
          country: { type: 'string', enum: COUNTRIES, default: 'fr', description: 'Country site to fetch categories for (category IDs are consistent across countries)' },
          query: { type: 'string', description: 'Optional keyword filter on category name, e.g. "shoes" or "dress"' },
        },
      },
    },
  • Handler function opCategories that fetches categories and optionally filters by query string.
    export async function opCategories(
      client: VintedClient,
      args: { country?: Country; query?: string },
    ): Promise<CategoryHit[]> {
      const cats = await getCategories(client, args.country ?? 'fr');
      if (args.query) {
        const q = args.query.toLowerCase();
        return cats.filter((c) => c.title.toLowerCase().includes(q));
      }
      return cats;
    }
  • Client-level getCategories function that calls the Vinted API and returns flattened categories.
    const STATIC_TTL_MS = 60 * 60 * 1000; // 1 hour — categories rarely change
    
    export async function getCategories(
      client: VintedClient,
      country: Country = 'fr',
    ): Promise<CategoryHit[]> {
      const data = await client.apiGet<{ dtos?: { catalogs?: any[] } }>(
        country,
        `/api/v2/catalog/initializers`,
        STATIC_TTL_MS,
      );
      const raw = data.dtos?.catalogs ?? [];
      return flattenCategories(raw);
    }
  • Helper flattenCategories that recursively flattens the catalog tree into a flat list of CategoryHit objects.
    function flattenCategories(nodes: any[], parentId?: number): CategoryHit[] {
      const result: CategoryHit[] = [];
      for (const n of nodes) {
        result.push({
          id: Number(n.id),
          title: String(n.title ?? n.name ?? ''),
          parentId,
          itemCount: n.item_count,
        });
        if (Array.isArray(n.catalogs) && n.catalogs.length) {
          result.push(...flattenCategories(n.catalogs, Number(n.id)));
        }
      }
      return result;
    }
  • CategoryHit interface defining the shape of a category result: id, title, parentId, itemCount.
    export interface CategoryHit {
      id: number;
      title: string;
      parentId?: number;
      itemCount?: number;
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses caching behavior (1 hour) and the return structure. However, it does not mention idempotency, rate limits, or authentication requirements. The description adds value beyond the schema but lacks some behavioral depth.

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 two sentences, front-loaded with the main action, and every sentence adds value. It efficiently explains purpose, usage, and caching without unnecessary detail.

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?

The description covers the tool's purpose, return fields, caching, and integration with sibling tools. Given the simple input schema and no output schema, it provides sufficient context for an agent to use the tool correctly. Minor gaps like error handling are not critical.

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

Parameters3/5

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

Input schema has 100% coverage with clear descriptions for country and query. The description does not add new semantic information about the parameters beyond what is in the schema. According to the guidelines, baseline is 3 when coverage is high, and the description does not enhance it further.

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 the tool fetches the full Vinted category tree for a country, listing the return fields (IDs, names, parent IDs, item counts). It is specific and distinguishes from sibling tools like search_brands or get_size_groups.

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 explains when to use the tool (to get categories for a country) and how to use the output (pass categoryId to search_items/search_all_items). It does not explicitly state when not to use it or list alternatives, but the context is 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