Skip to main content
Glama

Preview order

get_order_preview
Read-onlyIdempotent

Full order summary to show the human before ordering: line items, promo/discount, shipping, address, grand total. Prices are server-computed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
errorNoPresent when the cart is empty.
itemsNoRe-priced order lines.
totalNo
issuesNoLines that became unavailable, if any.
currencyNo
discountNo
shippingNo
subtotalNo
promo_codeNo
ready_to_prepareNoTrue when an address is set and all lines are orderable.
shipping_addressNoAddress set via set_shipping_address (null if not set).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "currency": {
      +      "type": "string"
      +    },
      +    "discount": {
      +      "type": "number"
      +    },
      +    "error": {
      +      "description": "Present when the cart is empty.",
      +      "type": "string"
      +    },
      +    "issues": {
      +      "description": "Lines that became unavailable, if any.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "items": {
      +      "description": "Re-priced order lines.",
      +      "items": {
      +        "properties": {
      +          "custom": {
      +            "type": "boolean"
      +          },
      +          "price": {
      +            "type": "number"
      +          },
      +          "product": {
      +            "type": "string"
      +          },
      +          "qty": {
      +            "type": "integer"
      +          },
      +          "size": {
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "promo_code": {
      +      "type": "string"
      +    },
      +    "ready_to_prepare": {
      +      "description": "True when an address is set and all lines are orderable.",
      +      "type": "boolean"
      +    },
      +    "shipping": {
      +      "properties": {
      +        "method": {
      +          "type": "string"
      +        },
      +        "price": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "shipping_address": {
      +      "description": "Address set via set_shipping_address (null if not set).",
      +      "type": "object"
      +    },
      +    "subtotal": {
      +      "type": "number"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. Description adds that 'prices are server-computed', which is useful but not extensive.

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?

Two concise sentences, front-loaded with key purpose and content. No wasted words.

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?

With zero parameters and output schema present, description covers purpose and key behaviors. Could mention prerequisites (e.g., having a cart) but adequate for simple tool.

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?

No parameters, schema coverage 100%. Baseline 4 per rule, no need for parameter info.

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?

Description clearly states verb 'preview' and resource 'order', listing included elements (line items, promo, shipping, grand total). Distinct from sibling 'prepare_order' which likely places the order.

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?

Explicitly states 'to show the human before ordering', providing context for when to use. Does not explicitly exclude alternatives but siblings are different actions.

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