Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_unclose_bill

Restore business for fully closed Kingdee bills, such as sales orders and purchase requisitions, by unclosing them via bill IDs or bill numbers, with the operation code resolved per form.

Instructions

整单反关闭单据(已整单关闭的单据恢复业务,opNumber 随表单而异)。

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

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

  • 端点/格式: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.8/5.0
Behavior4/5

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

Annotations only declare the generic safety profile (readOnly=false, destructive=false, idempotent=false), so the description earns real credit for disclosing the endpoint (ExecuteOperation), the payload layout (opNumber top-level, data holds only business params), and the metadata-cache-driven operation resolution with a documented failure mode. It omits permission requirements and what state the bill lands in after success, which keeps it short of 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 purpose is front-loaded and the bullet structure is scannable, but several bullets carry provenance narration ("范探源 2026-08-07 三重证据查证 + QA 严过关真机实测", "理由:反关闭是标准动作应走通用工具防重复") that serves design documentation rather than agent invocation. Roughly a third of the text does not help an agent decide or call.

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 single-parameter wrapper around an ExecuteOperation action, the description covers endpoint, parameter precedence, fallback behavior on metadata mismatch, and is complemented by an output schema declaring success/fid/ids/action/action_source/endpoint, so return values need not be explained. The remaining gap is the absence of any permission/state-precondition detail, which is minor here.

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?

The nested schema already documents form_id, bill_ids, bill_nos ("bill_ids 未提供时使用"), and operation, including the same bill_ids-over-bill_nos priority the description restates. The description's added value is the resolution-priority rule and concrete per-form opNumber examples (SAL_SaleOrder=YLUnBillClose, PUR_Requisition=Unclose, etc.), which the schema does not provide — useful, but largely redundant with the schema's own field text.

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+resource: "整单反关闭单据(已整单关闭的单据恢复业务)", which is unambiguous against the sibling kingdee_close_bill and other action tools. It lists concrete applicable forms (销售订单、采购申请单、发货通知单), but never names the inverse sibling explicitly, leaving that differentiation to inference from the name.

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?

Specifies the precondition (a bill that is already 整单关闭) and the effect (restore business), plus the resolution priority when no explicit operation is supplied and what happens on match failure (clear Chinese error prompting an explicit operation). It does not explicitly say "use kingdee_close_bill to close" or exclude other action tools like cancel/void, so exclusions are implied rather than stated.

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