Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_push_bill

Convert source documents (e.g., sales orders, purchase orders) into target documents (e.g., outbound orders, inbound orders) with configurable conversion rules and validation checks.

Instructions

将源单据下推生成目标单据(如销售订单下推销售出库单、采购订单下推采购入库单)。

常用下推场景:

  • 销售订单 → 销售出库单: form_id=SAL_SaleOrder, target_form_id=SAL_OUTSTOCK

  • 采购订单 → 采购入库单: form_id=PUR_PurchaseOrder, target_form_id=STK_InStock

  • 采购订单 → 收料通知单: form_id=PUR_PurchaseOrder, target_form_id=PUR_ReceiveBill

  • 销售订单 → 销售退货单: form_id=SAL_SaleOrder, target_form_id=SAL_RETURNSTOCK

转换规则说明:

  • 默认(rule_id=空,enable_default_rule=false):Kingdee 使用系统配置的默认转换规则

  • enable_default_rule=true:强制启用该单据的默认下推规则,忽略 rule_id

  • rule_id 显式指定:绕过默认规则,直接使用指定规则(下推失败时常用此方式)

采购订单下推限制(关联数量规则):

  • 采购订单【关联数量】>=【订单数量】时,无法下推收料单/入库单 (关联数量 = 累计收料数量 + 累计入库数量)

  • 勾选【控制交货数量】时:

    • 关联数量 >= 交货下限时,无法下推

    • 关联数量 + 本次下推数量 > 交货上限时,目标单据无法保存

  • 单据状态必须为"已审核",且未关闭、业务状态为"正常"

响应包含:

  • Result.ResponseStatus:保存结果(IsSuccess 判断整体是否成功)

  • Result.ConvertResponseStatus:每行下推转换结果(可查看具体分录成功/失败)

Returns: str: JSON,含 success / bill_nos / next_action 字段(成功时包含目标单据编号)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description discloses that the tool creates target documents (write operation, consistent with readOnlyHint=false) and is not destructive (consistent with destructiveHint=false). It explains conversion rule behavior, failure handling (draft_on_fail), and response structure. It adds context beyond annotations, though idempotency is not mentioned.

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 description is well-structured with sections for common scenarios, conversion rules, limitations, and response. It is front-loaded with the main action. However, it is lengthy and could be slightly more concise without losing essential information.

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?

Given the presence of an output schema and input schema with descriptions, the description covers conversion rules, limitations, and response fields. It lacks explicit mention of idempotency or error types, but overall provides sufficient context for an agent to use the tool correctly.

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?

While the description does not have a dedicated parameter section, it adds value by illustrating parameter usage with examples (e.g., form_id values) and explaining nuanced behaviors like when to set rule_id explicitly or enable_default_rule=true. The input schema already provides descriptions, so the description's contribution is moderate but useful.

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 clearly states that the tool pushes source documents to target documents with specific examples. It identifies the action (下推) and the resource (单据). However, it does not explicitly differentiate from sibling push tools like kingdee_push_production_pick, which are more specialized.

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 provides detailed guidance on when to use default rule, enable_default_rule, or explicit rule_id. It also lists conditions under which push fails (e.g., linked quantity exceeds order quantity) and required document states (已审核, not closed). It does not compare to alternative tools but provides clear when-not scenarios.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WaHaiLong/KingdeeMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server