Skip to main content
Glama
powercess

yimu-mcp

by powercess

save_refund

save_refund

Add or update a refund entry in the ledger by providing refund ID, associated bill, amount, and optional details as JSON.

Instructions

新增或更新退款(POST /refund/addOrUpdateRefund,upsert:带主键为更新)。entity 字段:refundId 主键;billId 关联账单;refundNum 退款金额;refundInfos 退款明细(JSON)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entityYes退款对象

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden. It does well by revealing that the tool is an upsert, that the HTTP method is POST, that providing the primary key makes it an update, and that refundInfos is JSON. It stops short of stating required fields for creation or behavior on invalid input, but the core write behavior is transparent.

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?

The description fits into one compact sentence that front-loads the action, then supplies endpoint, upsert rule, and the critical entity fields in order. Every clause earns its place; there is no filler or repetition of the title.

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?

It covers endpoint, entity fields, and the primary-key behavior, which is a solid baseline for an upsert tool. However, it leaves an agent to infer how to construct a valid create payload, what fields are required, and what shape refundInfos must take; there is also no output/return information and no annotations to fill those gaps.

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?

The schema only describes the entity as '退款对象', so the description adds real value by enumerating the meaningful fields inside it: refundId (primary key), billId, refundNum, and refundInfos. This is field-level semantics the schema alone does not provide, though it leaves the internal shape of refundInfos unspecified.

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 leads with a specific action, '新增或更新退款' (create or update refund), and anchors it to a concrete endpoint, POST /refund/addOrUpdateRefund. It also clarifies the upsert semantics, which distinguishes it from sibling tools like delete_refund and save_reimbursement beyond the name itself.

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 context for when to call it: use it to create or update a refund, and choose the mode by whether refundId is present ('带主键为更新'). It does not explicitly name alternatives or exclusion conditions, but the resource-specific verb and endpoint make the intended scenario clear.

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