Skip to main content
Glama
Kingdee MCP Unified

Kingdee MCP Unified

by sclyxnet

kingdee_get_bill_template

Read-onlyIdempotent

Fetch a minimal savable bill model template for a Kingdee form_id, with correct field names and required entry fields, so AI can replace placeholders and build valid ERP documents.

Instructions

获取单据的「最小可保存 model 骨架」模板。

优先从金蝶元数据动态生成(QueryBusinessInfo → NeedReturnData),任意 form_id 都支持, 必填项以服务端元数据为准(源自 T_META_OBJECTTYPE + FKERNELXML),不依赖本地人工整理。 仅当元数据不可达时,才降级到本地预置模板(SAL_Quotation / SAL_SaleOrder / PUR_PurchaseOrder)。

返回该表单的正确字段名、必填项、分录必填字段组成的 model 示例,AI 只需替换占位符填业务数据。 占位符形如 <客户编码>,参照型字段形如 {"FNumber": "<BD_MATERIAL 编码>"}。 保存前建议再用 kingdee_validate_bill 校验。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "form_id": "<form_id>"
    },
    "name": "kingdee_get_bill_template"
  }
}

Input Schema

NameRequiredDescriptionDefault
form_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.11

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuinely new behavior: the template is generated dynamically from QueryBusinessInfo → NeedReturnData, required fields come from server metadata (T_META_OBJECTTYPE + FKERNELXML), and there is a documented degradation path to local templates. It does not cover latency, metadata-miss failure modes, or how partial metadata is handled.

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?

Front-loads the core purpose, then layers source-of-truth and fallback details in short paragraphs. The metadata lineage detail is slightly more than a caller strictly needs, but it is well organized and free of filler.

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 an output schema exists, the description needn't explain return shape, yet it still usefully documents what the template contains (correct field names, required fields, entry required fields) and the placeholder conventions (<客户编码>, {"FNumber": "<BD_MATERIAL 编码>"}). The only real gap is how to obtain a valid form_id.

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?

Schema coverage is 0%, so the description must carry the single parameter. It says any form_id is supported and names a few examples, but never explains where a valid form_id comes from (e.g., kingdee_list_forms) or its format, leaving the agent to infer it.

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?

Names a specific verb and resource: 获取单据的「最小可保存 model 骨架」模板. It further distinguishes its role in the workflow, noting it feeds into kingdee_validate_bill before saving, so an agent can place it precisely among siblings.

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?

Explains when the dynamic metadata path applies (任意 form_id 都支持, preferred) and when the fallback fires (metadata unreachable, limited to SAL_Quotation / SAL_SaleOrder / PUR_PurchaseOrder). It also recommends following up with kingdee_validate_bill, though it never states when NOT to use this tool (e.g., for read-only inspection, kingdee_view_bill).

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