Skip to main content
Glama
Vestuário MCP
by nilsond

buscar_produto_por_id

Read-onlyIdempotent

Fetch full product details—description, colors, sizes, price, and per-size availability—using a product ID obtained from the catalog list.

Instructions

Retorna todos os detalhes de um produto: descrição, cores, tamanhos, preço e disponibilidade por tamanho.

Args: produto_id: ID do produto, obtido em listar_produtos.

Returns: Detalhes do produto, incluindo disponivel_por_tamanho (estoque físico menos reservas).

Erros: Produto não encontrado. A mensagem lista os IDs existentes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "produto_id": "<produto_id>"
    },
    "name": "buscar_produto_por_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
produto_idYesID numérico do produto, obtido em listar_produtos.

Output Schema

NameRequiredDescriptionDefault
idYesIdentificador do produto.
nomeYes
coresYes
precoYesPreço unitário em BRL.
tamanhosYes
categoriaYes
descricaoYes
preco_formatadoYesPreço formatado, ex.: R$ 79,90.
disponivel_totalYesUnidades disponíveis somando todos os tamanhos.
disponivel_por_tamanhoYesUnidades disponíveis (estoque físico menos reservas) por tamanho.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this as read-only, idempotent, non-destructive and closed-world, so the description only needs to add behavior beyond that. It contributes real value by documenting the error path ('Produto não encontrado. A mensagem lista os IDs existentes') and by explaining that `disponivel_por_tamanho` is physical stock minus reservations, a non-obvious business rule.

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

Conciseness4/5

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

Front-loaded one-line purpose followed by short Args/Returns/Erros blocks — easy to scan and no wasted prose. The Args section is near-redundant with the schema, which slightly dilutes it, but the structure remains efficient.

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?

For a single-parameter lookup with full annotations and an output schema, the description covers the essentials: what is returned, where the ID comes from, and how failure behaves. The only gap is guidance on preferring verificar_estoque when only stock is needed.

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?

Schema coverage is 100% and the single parameter is fully described in the schema, so the baseline is 3. The description's 'ID do produto, obtido em listar_produtos' restates the schema text verbatim rather than adding format or constraint detail.

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

Purpose4/5

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

States a specific verb and resource ('Retorna todos os detalhes de um produto') and enumerates what details are included (descrição, cores, tamanhos, preço, disponibilidade por tamanho). This clearly separates it from listar_produtos, which only lists. It does not explicitly address the overlap with verificar_estoque, which also reports availability.

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 gives concrete usage context by telling the agent where the required ID comes from ('obtido em listar_produtos'), which chains it correctly after the listing tool. It lacks an explicit exclusion rule against verificar_estoque for stock-only lookups, so it is clear context but not full when/when-not guidance.

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