Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_close_bill

Close entire approved documents in Kingdee ERP by specifying form ID and bill IDs or numbers; operation code is resolved per form automatically.

Instructions

整单关闭单据(已审核单据业务关闭,opNumber 随表单而异)。

  • FormId 参数化通用工具(非某单专用,理由:整单关闭是标准动作应走通用工具防重复), 适用于单据(销售订单、采购申请单、发货通知单等)。

  • action 依据:范探源 2026-08-07 三重证据查证 + QA 严过关真机实测——整单关闭 opNumber 因表单而异(如 SAL_SaleOrder=YLBillClose、PUR_Requisition=BillClose、 PUR_PurchaseOrder=BillClose、SAL_DELIVERYNOTICE=BillClose),无法静态固定,需真机确认。

  • 端点/格式:ExecuteOperation,opNumber 放顶层,data 只放业务参数。

  • 解析优先级:显式 operation 参数 > 该 form_id 元数据 Operations 按中文名 「整单关闭/关闭单据」匹配 OperationNumber(复用元数据缓存 _query_metadata); 匹配不到返回明确中文错误(提示显式传 operation)。

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

Returns: str: JSON,含 success / fid / ids / action / action_source / endpoint 字段

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?

Goes well beyond the annotations by disclosing the endpoint (ExecuteOperation), that opNumber goes at the top level while data holds only business params, the resolution precedence for the operation code, and the explicit Chinese error returned when metadata matching fails. It omits whether repeated close calls are idempotent or what permissions are needed, but the resolution-failure behavior is genuinely useful for a mutation tool.

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 first line is well front-loaded, but the body carries provenance noise ('范探源 2026-08-07 三重证据查证 + QA 严过关真机实测') and a defensive rationale for why it is a generic tool, neither of which helps an agent invoke it. Roughly a third of the text could be cut without information loss.

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 mutation tool the description covers action resolution, parameter precedence, error behavior, and target form applicability. An output schema exists, so return values need not be explained further; the remaining gap is idempotency and preconditions (must be audited and not already closed) which are only obliquely implied.

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?

Although the flattened schema coverage signal reads 0% (the real parameters are nested under params/$ref), the description adds real semantic content: form-specific opNumber examples per form_id, the 'explicit operation > metadata Chinese-name matching' precedence, and the bill_ids-over-bill_nos priority rule. This meaningfully compensates for the nested schema.

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?

States a specific verb and resource in the first clause — '整单关闭单据(已审核单据业务关闭)' — and scopes it to audited bills across named form types (销售订单、采购申请单、发货通知单). It never explicitly names kingdee_unclose_bill as the reverse operation, so sibling differentiation is implied by the 反关闭 mention rather than stated.

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?

Gives the admissibility condition ('已审核单据', 'bill_ids 或 bill_nos 至少一个') and notes the tool is generic across form types, but gives no explicit when-not guidance and does not route the agent to kingdee_unclose_bill, kingdee_cancel_bills, or kingdee_void_bills. Usage is inferable rather than prescribed.

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