Skip to main content
Glama

面灵AI 面试助手

preview_coupon

Read-only

预览优惠码能否使用、折扣多少;传商品 ID 时同时算出该商品的折后价。优惠码仅新用户首单可用,不会因预览而占用。(需要用户授权,范围 account:read)

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": {
      "couponCode": "<couponCode>"
    },
    "name": "preview_coupon"
  }
}

Input Schema

NameRequiredDescriptionDefault
productIdNolist_plans 中的商品 ID;不传只校验优惠码本身
couponCodeYes优惠码

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare a read-only, non-destructive, closed-world operation, and the description goes well beyond that: it discloses the required authorization scope (account:read) and, critically, that previewing does not consume or occupy the coupon. That non-mutating guarantee is exactly the fact an agent needs before repeatedly calling a preview endpoint. It also adds the new-user first-order eligibility constraint, so the agent knows a 'false' result may reflect eligibility rather than coupon validity.

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?

Three compact clauses, front-loaded with the core purpose, followed by the conditional product-price behavior, then eligibility and the auth note in parentheses. There is no redundant wording and the conditional logic is expressed in a single well-placed clause.

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 two-parameter preview tool with a fully described schema and read-only annotations, the definition covers purpose, conditions, eligibility, and side-effect guarantees. The main remaining gap is the shape of the response: with no output schema, the agent is not told how validity, discount amount, and final price are represented. This is a small but genuine omission rather than a blocking one.

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 description coverage is 100%, so both parameters are already documented, including that omitting productId validates only the coupon. The description still adds semantic value by explaining the consequence of supplying productId: the tool also computes that product's discounted price, which is a behavioral effect rather than a format detail. The gain over the schema is modest but real.

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 names a specific action (preview a coupon) and its concrete outcomes: whether the coupon is usable, how large the discount is, and, when a product ID is supplied, the discounted price for that product. This is far more specific than a restatement of the name; an agent immediately knows what the tool returns conceptually, and the scope is narrow enough that the unrelated sibling tools (job applications, interviews, knowledge bases) cannot conflict with it.

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?

The description gives clear conditions for use: preview a coupon before applying it, and omit the product ID to validate only the coupon. It also states the eligibility rule that the coupon is restricted to new users' first orders, which is a real precondition for interpreting the result. It does not name an alternative tool or explicitly say when not to call it, which keeps this below a 5.

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