Skip to main content
Glama

calculate-price

Read-only

Estimate the payable total for a store order from item codes and quantities, returning total price in cents and item details. Read-only pricing only; no order is placed.

Instructions

按门店和餐品试算订单应付金额,返回总价(单位分)和餐品明细。只算价、不下单,可放心调用;用户问“多少钱”时用它,不要用 create-order。只读。演示数据,虚构,不连麦当劳官方服务。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes要点的餐品,每项一个餐品编码和数量,至少一项
beTypeYes业务类型,取自 query-nearby-stores 返回的 beType;演示门店为 1(到店取餐)
orderTypeYes订单类型:1 到店,2 外送。演示门店只支持 1
storeCodeYes门店编码,取自 query-nearby-stores 返回的 storeCode;演示里只有 DEMO001

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.2
    • changedInput schema / properties / beType / description
      Previous value: -"1-到店取餐"New value: +"业务类型,取自 query-nearby-stores 返回的 beType;演示门店为 1(到店取餐)"
    • changedInput schema / properties / items / description
      Previous value: -"餐品列表"New value: +"要点的餐品,每项一个餐品编码和数量,至少一项"
    • changedInput schema / properties / items / items / properties / quantity / description
      Previous value: -"数量"New value: +"份数,正整数"
    • addedInput schema / properties / items / items / properties / quantity / minimum
      Added value: +1
    • changedInput schema / properties / orderType / description
      Previous value: -"1-到店,2-外送"New value: +"订单类型:1 到店,2 外送。演示门店只支持 1"
    • changedInput schema / properties / storeCode / description
      Previous value: -"门店编码,从 query-nearby-stores 获取"New value: +"门店编码,取自 query-nearby-stores 返回的 storeCode;演示里只有 DEMO001"
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true, and the description meaningfully extends that: it confirms no order is placed, states the return payload (total in 分 plus item line detail), and discloses that the data is fictional demo data not connected to McDonald's official services. It stops short of describing validation or error behavior for bad store/product codes.

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 core action and return value, then safety, then routing, then provenance — a sensible priority order with no filler sentences. The semicolon-chained clauses are dense but each carries distinct information, so it is efficient rather than padded.

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 no output schema, the description compensates by naming the return contents (total price in 分, item detail), and it covers side-effect safety, routing, and demo-data caveats for a 4-required-parameter tool. Only edge-case behavior (invalid codes, unsupported orderType) is unaddressed, which is minor for a read-only calculator.

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% — storeCode, orderType, beType and items all carry their own descriptions, including provenance (from query-nearby-stores, query-meals) and demo values. The description only restates '门店和餐品' at a high level and adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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?

The description states a specific verb and resource in the first clause ('试算订单应付金额' for a store and its items) and immediately contrasts it with the sibling it is not ('只算价、不下单', '不要用 create-order'). An agent can distinguish calculate-price from order creation without inspecting either 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?

It gives an explicit trigger condition ('用户问"多少钱"时用它') and an explicit exclusion naming the alternative tool ('不要用 create-order'). Both when-to-use and when-not are stated, leaving nothing to inference.

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