Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_void_bills

Destructive

Cancels (voids) Kingdee Cloud Star business documents such as sales orders, purchase orders, and stock-in records by FormId, using FID or bill numbers, with an optional custom operation code.

Instructions

作废单据(opNumber=Cancel,非 Invalid!全库无 Invalid 常量)。

  • FormId 参数化通用工具(非某单专用,理由:作废是标准动作应走通用工具防重复), 仅适用于单据(如 SAL_SaleOrder / PUR_PurchaseOrder / STK_InStock 等)。

  • action 依据:范探源 2026-08-07 三重证据查证——作废 = Cancel, 旧文档误作 Invalid(OperationNumberConst.cs 反编译确认全库无 Invalid 常量),勿引用。

  • 端点/格式:ExecuteOperation,opNumber=Cancel 放顶层(与 formid 平级), data 只放业务参数 {"Ids":"..."} 或 {"Numbers":[...]}(QA 严过关真机实测格式)。

  • 传参:bill_ids(FID 列表,优先)或 bill_nos(单据编号列表),至少一个。

  • 二开单据自定义作废动作时,可显式传 operation 覆盖默认 Cancel。

Returns: str: JSON,含 success / fid / ids / action / endpoint 字段(注意是 fid/ids 而非 id)

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.4

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false and readOnlyHint=false, so the safety profile is covered. Beyond that the description adds genuinely non-obvious behavioural detail: the ExecuteOperation endpoint, the requirement that opNumber sits at the top level alongside formid while data carries only the business payload, and the return shape (success/fid/ids/action/endpoint, note fid/ids not id). It omits preconditions such as required bill status or permissions, which keeps it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The bullets are front-loaded and the critical fact (Cancel, not Invalid) leads. However, the provenance narrative ('范探源 2026-08-07 三重证据查证', 'QA 严过关真机实测格式') and the extended rationale for why it is generic consume space without helping an agent decide or call the tool.

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 destructive operation with annotations covering the safety hints and an output schema that documents the return, the description covers endpoint, payload placement, parameter selection and override semantics, which is most of what an agent needs. The remaining gap is operational preconditions (bill state, permissions) and sibling disambiguation.

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?

Top-level schema coverage is reported as 0% (the single 'params' object carries no description), so the description has to compensate, and it does: it states bill_ids is preferred over bill_nos, that at least one is required, and that operation exists to override the default Cancel for second-development forms. Some of this restates the nested ExecuteActionInput descriptions, so the added value is real but not fully incremental.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource (作废单据, executed as opNumber=Cancel via ExecuteOperation) and states it is a generic, FormId-parameterized tool that applies only to bills (SAL_SaleOrder, PUR_PurchaseOrder, STK_InStock). It also pre-empts the most likely naming error by insisting the action is Cancel and not Invalid. What it does not do is distinguish itself from the closely named sibling kingdee_cancel_bills, leaving an agent to guess which of the two is the right tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a real scope constraint ('仅适用于单据'), tells the caller at least one of bill_ids/bill_nos must be supplied with bill_ids taking priority, and explains when to pass an explicit operation override for customized forms. But with siblings kingdee_cancel_bills, kingdee_close_bill, kingdee_forbid_bills and kingdee_delete_bills all present, it never says when to void versus cancel/close/forbid/delete, which is exactly the decision an agent faces.

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

Deploy Server

Other Tools