Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_query_stock_in

Read-onlyIdempotent

Query purchase stock-in receipts by supplier, warehouse, date, or document status to retrieve completed or in-transit receipt and supplier information.

Instructions

查询采购入库单。

对应金蝶 ApiDoc 库存管理域「采购入库」模块,FormId: STK_InStock。 用于查询已完成/在途的采购入库单及其供应商信息,支持按供应商、仓库、日期、单据状态筛选。

⚠️ 字段 Key 警示(真机实测,范探源已验证): 本单据业务伙伴是供应商,字段 Key 用 FSupplierId(注意与销售类单据的 FCustId / FCustomerID 不同,采购入库单的客户字段并不存在)。误用 FCustId 会报「字段不存在」。 字段 Key 一律以 kingdee_get_fields 元数据为准。

⚠️ 动作范围说明:标准保存/提交/审核动作已由通用 kingdee_save_bill / kingdee_submit_bills / kingdee_audit_bills 等按 FormId 参数化覆盖,本工具仅做查询,不负责写操作。

常用 filter_string:

  • 已审核: "FDocumentStatus='C'"

  • 指定供应商: "FSupplierId.FNumber='V001'"

  • 日期区间: "FDate>='2026-05-01' and FDate<='2026-05-31'"

推荐 field_keys(已按本环境元数据校验可用): FID,FBillNo,FDate,FDocumentStatus,FSupplierId.FName

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?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful domain behavior: it is query-only, write actions are handled elsewhere, and misusing FCustId instead of FSupplierId on this FormId produces a field-not-found error.

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 purpose is front-loaded and the warnings are clearly separated. The description is somewhat long, but the field-key warning, query-only scope, and filter examples all add actionable value for this domain.

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?

The tool has an output schema, so return values need not be explained. The description provides the missing domain context an agent needs to call it correctly: FormId, supported filters, safe field keys, supplier-field pitfall, and explicit query-only scope.

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?

The nested QueryInput schema documents the generic parameters, and the description adds substantial domain semantics beyond that: FormId STK_InStock, recommended field_keys, common filter_string examples, and the supplier field-key caveat. It does not explain pagination parameters such as limit and start_row, but those are covered by the schema.

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 (查询采购入库单), gives the exact FormId (STK_InStock), and places it in the inventory-management module. It also distinguishes the tool from write-oriented siblings kingdee_save_bill / kingdee_submit_bills / kingdee_audit_bills by stating it is query-only.

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 clearly says when the tool is used (querying completed/in-transit purchase stock-in bills and supplier information) and explicitly excludes write actions. However, it does not explicitly distinguish this tool from closely named query siblings such as kingdee_query_stock_bills or kingdee_query_bills.

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