Skip to main content
Glama
nilsond
by nilsond

verificar_estoque

Read-onlyIdempotent

Check available stock for a clothing product in a specific size before adding it to the cart, showing physical units, cart reservations, and how many remain available.

Instructions

Consulta se há estoque disponível de um produto em um tamanho específico.

Mostra o estoque físico, quantas unidades estão reservadas em carrinhos e quantas ainda podem ser adicionadas (disponivel). Consulte antes de adicionar ao carrinho.

Args: produto_id: ID do produto. tamanho: P, M, G ou GG (aceita minúsculas).

Returns: Situação do estoque com em_estoque (bool) e uma mensagem legível.

Erros: Produto não encontrado; tamanho fora da grade ou não vendido para esse produto.

Input Schema

NameRequiredDescriptionDefault
tamanhoYesTamanho da peça: P, M, G ou GG.
produto_idYesID numérico do produto, obtido em listar_produtos.

Output Schema

NameRequiredDescriptionDefault
nomeYes
tamanhoYes
mensagemYes
reservadoYesUnidades reservadas em carrinhos ainda não finalizados.
disponivelYes
em_estoqueYes
produto_idYes
estoque_fisicoYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is covered. The description goes further by explaining what the numbers mean (physical stock, reserved in carts, addable units) and by listing the error cases (product not found, size outside the grid). Return-value detail overlaps the existing output schema, which keeps this from a 5.

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 summary followed by Args/Returns/Erros sections is easy to scan and appropriately sized. The Returns block duplicates the output schema, so a sentence or two does not earn its place.

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

Completeness5/5

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

For a two-parameter read-only lookup this covers purpose, pre-cart usage, accepted size inputs, and failure modes, while the output schema carries the return shape. An agent has everything needed to call it correctly.

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

Parameters4/5

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

Schema coverage is 100%, so both parameters are already documented, and the Args block largely restates them. The one genuine addition is "aceita minúsculas" for tamanho, a case-insensitivity rule the schema does not mention, which prevents a real invocation error.

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?

The first sentence names a specific verb (consulta) and resource (estoque disponível) scoped to a product and size, which is clearly distinct from sibling tools like listar_produtos and buscar_produto_por_id. It stops short of explicitly naming those siblings or stating what it is not, so it lands at clear-but-not-differentiated.

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?

"Consulte antes de adicionar ao carrinho" gives an explicit workflow trigger that ties it to the adicionar_ao_carrinho sibling. It states when to use it clearly but gives no when-not conditions or alternatives for other stock-related questions.

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