Skip to main content
Glama

Adicionar ao carrinho

add_to_cart

Adiciona um produto ao carrinho da sessão (soma à quantidade que já estiver lá). Produtos com opções exigem "opcao". Limites: 50 produtos diferentes e 99 unidades por item. Devolve o carrinho atualizado.

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": {
      "session_token": "<session_token>",
      "codigo": "<codigo>"
    },
    "name": "add_to_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
opcaoNoOpção do produto (cor, modelo), exatamente como em get_product.opcoes. Vazio se não houver.
codigoYesCódigo do produto (ex.: M10469).
quantidadeNoPadrão: 1.
session_tokenYesO session_token devolvido por start_session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations (which only declare non-read-only, non-destructive, closed-world), it discloses business limits (50 distinct products, 99 units per item), the additive rather than replacing quantity semantics, and that the response is the updated cart. It does not say what error occurs when a limit is exceeded or a required option is missing.

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?

Four short clauses, front-loaded with the action and scope, then the conditional rule, then limits, then return value. No redundant or filler wording; each sentence carries distinct 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?

For a write tool with no output schema, the description covers the mutation semantics, constraints, and return value, which is close to complete. Only failure behavior (limit violations, missing option, invalid session) is left unstated.

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 already 100%, so the schema documents each parameter; the description still adds value by clarifying that 'quantidade' adds to the existing quantity instead of overwriting, and that 'opcao' is mandatory only for products that have options. That is meaningful semantics the schema does not encode.

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 description gives a specific verb and resource ('Adiciona um produto ao carrinho da sessão') plus an accumulation rule that implicitly distinguishes it from update/remove siblings. It does not name any sibling explicitly, so the differentiation is inferential rather than stated.

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

Usage Guidelines3/5

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

It provides one conditional usage rule ('Produtos com opções exigem "opcao"') but never says when to call this versus update_cart_item or remove_cart_item when the item is already present. Usage is implied by the tool name rather than guided.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources