Skip to main content
Glama

Agentic Fabrication Network (AFN)

Add a part to a cart

add_to_cart

Put one more part in a cart. Name it ONE way: quote_id (a quote you already have — its shops are not asked again, and the part arrives configured and picked exactly as that quote is), or file_id or file_url (a design that has no quote yet — it gets one ordinary quote, priced exactly as get_fabrication_quote would price it). A cart holds at most 24 parts. Returns the whole cart. HOW A CART WORKS: each part in a cart IS a quote — its material, finish, quantity, rules and its pick (selection) live on that part's quote, and nothing is kept twice. To change a part, call refine_quote on its quote_id and pass cart_item_id: the cart follows the part to the new quote by itself. To pick the option to order for a part, store the pick on its quote (refine_quote selection). The cart_id is the only key to the cart — whoever holds it can read and change it — so give it only to the user it belongs to, and never put it in a link you did not get from the network.

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

Input Schema

NameRequiredDescriptionDefault
labelNoThe part's name as the user knows it. Default: the file's own name
cart_idYesThe cart to add to (cart_…)
file_idNoA design file the network already holds (f_…): it gets one ordinary quote
file_urlNoA public URL of the design: it is fetched and gets one ordinary quote
quote_idNoA quote you already have: the part arrives configured and picked as that quote is, and no shop is asked again

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare non-read-only, open-world, non-destructive; the description adds genuinely non-inferable behavior: a hard 24-part cap, that the whole cart is returned, that changes must go through refine_quote rather than this tool, and a bearer-token style warning about cart_id custody. It does not state failure modes (e.g., what happens at the 24 limit or with a bad file_url), leaving one meaningful gap.

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 with the action and the identifier choice, then mechanics, then the security caveat — a sensible order. It is dense and somewhat long, and the cart_id confidentiality paragraph is verbose for what it conveys, but essentially every sentence carries operational information.

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?

With no output schema, the description correctly states the return value (the whole cart) and explains the underlying data model (parts are quotes, nothing stored twice) plus the edit and pick workflows. For a 5-parameter mutation tool in a quote/cart workflow, an agent has what it needs 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 the baseline is 3, but the description adds a constraint absent from the schema: name the target ONE way (quote_id XOR file_id/file_url) — the schema has no oneOf or exclusivity rule. It also adds pricing semantics for the file_id/file_url path. Only 'label' is left entirely to the schema.

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?

Opens with a specific verb and resource ("Put one more part in a cart") and immediately scopes it against the sibling set: adding one part, to an existing cart, versus create_cart, get_cart, remove_from_cart. It also clarifies that each part IS a quote, which is the distinguishing semantic of this tool.

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

Usage Guidelines5/5

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

Explicitly routes the two entry paths: quote_id when a quote already exists (no shops re-asked), file_id/file_url when the design has no quote yet and gets one priced like get_fabrication_quote. It also names refine_quote with cart_item_id for edits and refine_quote selection for picking, so the agent knows what NOT to use this tool for.

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