Skip to main content
Glama

add_to_cart

Adds a template to the cart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesSlug of the template to add.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYesAlways true: the cart ended up with that template inside.
totalYesLines the cart has after this call.
alreadyThereYesIt was already in the cart and has not been added again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / slug / description
      Previous value: -"Slug de la plantilla a añadir."New value: +"Slug of the template to add."
    • changedOutput schema / properties / alreadyThere / description
      Previous value: -"Ya estaba en el carrito y no se ha vuelto a añadir."New value: +"It was already in the cart and has not been added again."
    • changedOutput schema / properties / ok / description
      Previous value: -"Siempre true: el carrito quedó con esa plantilla dentro."New value: +"Always true: the cart ended up with that template inside."
    • changedOutput schema / properties / total / description
      Previous value: -"Líneas que tiene el carrito después de la llamada."New value: +"Lines the cart has after this call."
  2. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden. It states only the primary action but does not disclose side effects such as duplicate handling, overwriting behavior, or error conditions. It also does not mention whether the operation is idempotent or requires any preconditions. This is a significant gap for a mutation tool.

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?

A single sentence with no fluff. It is appropriately concise for a simple operation, though it could be slightly more informative without becoming verbose. The structure is front-loaded with the action.

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

Completeness3/5

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

Given the simple nature (one parameter, no nested objects), the description is minimally sufficient but lacks critical context such as success/failure behavior, potential errors, or what the output schema contains. The presence of an output schema mitigates the need to explain return values, but behavioral nuances are still missing. A more complete description would mention duplicate handling or confirmation.

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 description coverage is 100% (slug is described as 'Slug of the template to add.'). The description adds no extra meaning beyond the schema, just reiterates 'template'. Baseline 3 is appropriate since the schema already documents the parameter.

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 clear verb and resource: 'Adds a template to the cart.' It distinguishes from remove_from_cart by implying addition vs removal. However, it does not specify whose cart or the scope, but the slug parameter implies a specific template. It is clear and specific enough.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives like remove_from_cart or my_cart. It does not mention prerequisites (e.g., must be logged in) or exclusions. The context implies it is for adding items, but the description does not explicitly differentiate it from other cart-related tools.

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