Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_query_outsource_orders

Read-onlyIdempotent

Query outsourced processing orders and filter by supplier, batch, product, or due date to track work-in-progress, overdue tasks, and return forecasts.

Instructions

查询委外加工订单(SUB_SubReqOrder)列表。

委外加工订单记录外协生产任务,包含 CP 测试、封装、FT 成品测试等工序 的委托加工情况,是 WIP 在制量、逾期分析、回货预测的核心数据来源。

常用 filter_string:

  • 在制(未结案): "FDocumentStatus='C' and FStatus not in ('6','7')"(默认)

  • 指定供应商: "FSupplierId.FName like '%华力%'"

  • 逾期未完工: "FPlanFinishDate<GETDATE() and FStatus not in ('3','6','7')"

  • 30 天内到期: "FPlanFinishDate>=GETDATE() and FPlanFinishDate<=DATEADD(day,30,GETDATE())"

  • 指定批次: "FLot.FNumber='AP5E047'"

  • 指定产品型号: "FMaterialId.FSpecification='APT32F004B'"

  • 已完工待入库: "FStatus='3'"

关键字段说明:

  • FQty: 委外订单总数量(颗)

  • FStockInQty: 已入库数量(已完工回厂的数量)

  • FNoStockInQty: 未入库在制量(FQty - FStockInQty,可为负表示超收)

  • FStatus: 执行状态(1=开工,3=完工,6=结案,7=结算)

  • FPlanFinishDate:计划完工日(逾期判断基准)

  • FPurOrderNo: 关联采购订单号(CP 委外专用,可反查晶圆来源采购单)

  • FLot.FNumber: 批次号(WIP 追溯用)

  • F_XTR_Qty: 晶圆辅单位片数(自定义扩展字段,如需可追加到 field_keys)

💡 REMEMBER: 若报"字段不存在",用 kingdee_get_fields('SUB_SubReqOrder') 确认该账套可用字段

Returns: str: JSON,含 count / has_more / data 字段

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.4

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuinely useful behavior: the default filter is already applied only when none is supplied, results expose count / has_more / data, and a failure path is documented (if a field does not exist, call kingdee_get_fields('SUB_SubReqOrder') to confirm). It does not state whether field_keys rejects unknown fields or how pagination interacts with has_more, which keeps it below 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.

Conciseness4/5

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

The long bulleted structure is front-loaded with a scope statement, then filter presets, then field keys, with no filler sentences. It is denser than strictly necessary, and the returns note duplicates what the output schema already provides, but every bullet adds information an agent would otherwise have to guess.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a query tool with a rich filter DSL as its main parameter, the description supplies the domain vocabulary, the status code table, field-level meanings, a default that affects results, and a fallback when a field is missing. An output schema exists, so return values need not be explained further; nothing an agent needs in order to call this correctly is missing.

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?

Schema description coverage is reported as 0%, so the description carries the burden, and it does so well: filter_string is explained through seven worked examples plus status-code mapping (1=开工, 3=完工, 6=结案, 7=结算), and field_keys is tied to field meanings such as FQty, FStockInQty, FNoStockInQty, FLot.FNumber, and the custom F_XTR_Qty. limit and start_row are left entirely to the schema, and the max-100 pagination interplay is never explained, so it is not a full 5.

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?

The description names a specific verb and resource ('查询委外加工订单(SUB_SubReqOrder)列表') and immediately explains the business scope: outsourced CP testing, packaging, FT final test, and its role as the source for WIP, overdue, and return-forecast analysis. This easily distinguishes it from generic siblings like kingdee_query_bills or kingdee_query_purchase_orders.

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?

It enumerates concrete usage scenarios via filter presets: default in-progress orders, by supplier, overdue and not completed, due within 30 days, by lot, by model, and completed pending stock-in. However, it never explicitly states when to prefer this tool over the sibling kingdee_query_bills or how it relates to kingdee_query_purchase_order_progress, so the alternative-routing guidance is incomplete.

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