Skip to main content
Glama

Fit a design to its size

design_adapt
Destructive

Put a design made before the product was chosen onto its cart line, fitted to the size the customer chose, and show it before paying.

Call this once the customer chose a delivery option for a line whose design_id came from catalog_configure_product: pass the line_id and the chosen offer_ids, one per cart line. When the size differs, the design is laid out again, which takes about a minute. adapted: false means it already fitted and nothing changed. If catalog_configure_product reported an Unmet Constraint for a line, the call fails with UnmetConstraintUnansweredError until the customer answers; if they accept the line as configured, call again with unmet_accepted=true. The payment link refuses a line whose design still needs this step (AdaptStepRequiredError).

The result shows the design on its size (product_label, thumbnails, design_url). Share design_url as a markdown hyperlink and the thumbnails. When the design card is displayed, it shows the previews with "Looks good" and "Change something", so don't paste the link or describe the images. Ask whether it looks good; for a change, call design_chat with design_id.

Returns a job — poll until SUCCEEDED.

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_id": "<session_id>",
      "line_id": "<line_id>"
    },
    "name": "design_adapt"
  }
}

Input Schema

NameRequiredDescriptionDefault
line_idYes
offer_idsNo
session_idYes
unmet_acceptedNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Adds substantial behavior beyond the annotations: roughly a minute for re-layout, `adapted: false` semantics, the job/poll-until-SUCCEEDED contract, and two named error conditions. What it does not disclose is the consequence of the `destructiveHint: true` / `idempotentHint: false` profile — i.e. that the existing layout is replaced and a repeat call re-runs the work — so the mutation risk is implied rather than stated.

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?

Purpose is front-loaded in the first sentence, then trigger, failure modes, and UI instructions follow in a logical order. It is dense with operational detail rather than padded, though the presentation rules ('don't paste the link or describe the images') add length that is advisory rather than definitional.

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 stateful, mutating, job-returning tool this covers the workflow, the failure paths, and the follow-up action, which is more than most. The residual gaps are the undocumented `session_id` and the unstated destructive/idempotency implications; return-value explanation is largely unnecessary given the output schema exists.

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 0%, so the description must carry all parameter meaning. It explains `line_id` (the cart line), `offer_ids` (chosen delivery offers, 'one per cart line'), and `unmet_accepted` (accept the line as configured), but `session_id` is never mentioned and the 'one per cart line' phrasing is ambiguous when only a single `line_id` is passed.

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?

States a specific verb chain and resource: place a pre-product design onto its cart line, fit it to the chosen size, and preview it before payment. It is clearly distinguished from `catalog_configure_product` (which supplies the design_id) and from `design_chat` (which handles changes), so an agent can pick it out without opening a schema.

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?

Gives an explicit trigger ('once the customer chose a delivery option for a line whose design_id came from catalog_configure_product'), names the alternative for revisions (`design_chat` with `design_id`), and routes the error branches: UnmetConstraintUnansweredError → answer or retry with `unmet_accepted=true`; AdaptStepRequiredError → the payment link blocks until this runs.

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