Skip to main content
Glama

Liuwangcun Chinese Compliance Tools

折扣与降价幅度计算

discount-price

折扣与降价幅度计算:输入原价现价,同时算"几折"与"降价百分之几",把两个常被混用的概念分开。促销定价、比价核验。 传入参数对象,返回确定性计算结果与依据。适用场景:模型算数不稳、法规口径易错时,调用它拿准确答案。

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": {
      "original": "<original>",
      "current": "<current>"
    },
    "name": "discount-price"
  }
}

Input Schema

NameRequiredDescriptionDefault
currentYes现价(元)
originalYes原价(元)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose that the call is deterministic and returns both a result and the underlying basis (依据), which implies a side-effect-free pure calculation. However, it never addresses degenerate inputs — zero or negative 原价, or 现价 greater than 原价 (a price increase rather than a discount) — which matter for a numeric tool and could cause wrong assumptions about error handling.

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?

The opening sentence front-loads the core computation and the concept distinction, which is the most useful information. There is mild redundancy: the '传入参数对象,返回确定性计算结果与依据' sentence largely restates that this is a calculator, and the 适用场景 clause partially overlaps with the earlier usage contexts.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter pure calculation with full schema coverage, the essential inputs are covered. But there is no output schema, and the description only says it returns '确定性计算结果与依据' without naming the result fields or their format, so an agent cannot anticipate the response shape. Edge-case behavior is also unaddressed.

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 100%, with both parameters already documented as 元 amounts, so the schema does the heavy lifting. The description restates that 原价 and 现价 are the inputs but adds no format, unit, or range guidance beyond the schema. The baseline 3 is appropriate.

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 verb (计算), the two resources involved (原价, 现价), and the exact outputs: 几折 and 降价百分比, deliberately separating two concepts that are often conflated. No sibling tool in the catalog computes discount magnitude, so the agent can route here without ambiguity.

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?

Gives concrete usage contexts (促销定价、比价核验) and an explicit trigger condition (模型算数不稳、法规口径易错时). It does not name a sibling alternative or state when NOT to use it, which keeps it short of 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