Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_query_receipts

Read-onlyIdempotent

Query accounts receivable entries with filters for customer, date, write-off status, and open status to retrieve financial data for revenue and collection analysis.

Instructions

查询应收单(AR_Receivable)列表,支持按客户、日期、核销状态、打开状态过滤。

应收单记录客户应收账款,包含应收金额、已核销金额、核销状态等信息, 是营收、回款、应收余额、票据占比等财务指标的核心数据来源。

常用 filter_string:

  • 已审核: "FDocumentStatus='C'"(默认)

  • 指定客户: "FCUSTOMERID.FNumber='C001'"

  • 指定月份: "FDATE>='2026-01-01' and FDATE<='2026-01-31'"

  • 未核销: "FWRITTENOFFSTATUS='A'"

  • 未关闭: "FOPENSTATUS='A'"

  • 期初数据: "FISINIT=true"(初始化单)或 "FISINIT=false"(业务单)

关键字段说明:

  • FALLAMOUNTFOR: 应收总金额(原币含税),财务核心指标

  • FNOTAXAMOUNTFOR: 应收不含税金额(原币),用于综合毛利率计算

  • FRELATEHADPAYAMOUNT:已核销金额

  • FWRITTENOFFSTATUS: 核销状态(A=未核销,B=部分核销,C=完全核销)

  • FOPENSTATUS: 打开状态(A=未关闭,B=已关闭,C=部分关闭)

  • FENDDATE_H: 到期日

  • FISINIT: 是否为初始化单据(期初数据)

⚠️ 不同金蝶账套字段名可能不同(如 FCUSTOMERID 可能为 FCustId、FDate 可能为 FDATE), 先调用 kingdee_get_fields('AR_Receivable') 确认该账套可用字段。

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?

Annotations already cover read-only/idempotent/non-destructive, and the description adds genuinely useful behavior: the default filter silently returns only audited bills (FDocumentStatus='C'), field names vary per 账套, and the response is JSON with count/has_more/data. It does not disclose pagination mechanics (limit ≤100, start_row) or default ordering. Minor inconsistency: the annotation title says 收款单 while the description says 应收单.

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?

Purpose and default scope are front-loaded, then bulleted filter recipes and a field dictionary – each block earns its place. There is some duplication: the 账套 field-name warning appears in both the body and inside the schema descriptions.

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 read-only filtered query with an output schema present, the description covers purpose, default scope, filter syntax, field semantics, response envelope (count/has_more/data), and the required metadata pre-check. An agent has everything it needs to call this 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?

Although structured coverage is low, the description richly documents filter_string syntax with copy-pasteable examples and explains the field keys (FALLAMOUNTFOR, FNOTAXAMOUNTFOR, FWRITTENOFFSTATUS A/B/C, FOPENSTATUS A/B/C, FISINIT). The limit and start_row pagination parameters are still undocumented in both schema and description.

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?

States a specific verb (查询) plus resource (应收单 / AR_Receivable) and pins the underlying form, immediately distinguishing it from generic siblings like kingdee_query_bills. It also explains what the record contains and which financial metrics it feeds, so an agent knows exactly what data shape to expect.

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?

Gives concrete when-to-use recipes (audited-only default, customer, month range, unwritten-off, open, initial-period) and preconditions ('先调用 kingdee_get_fields(\'AR_Receivable\') 确认该账套可用字段'). It stops short of naming which sibling query tool to use when the user wants receivables vs. receipts vs. generic 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