Skip to main content
Glama
WaHaiLong

Kingdee MCP Server

by WaHaiLong

kingdee_query_loan_balance

Read-onlyIdempotent

Query historical employee or department loan balances in Kingdee Cloud Star ERP, with filters for status, applicant, and date to review outstanding amounts.

Instructions

查询历史借款余额(人人报销域)。

对应金蝶 ApiDoc「人人报销 → 历史借款余额」模块,FormId: ER_HistoricalLoanBalance。 用于查询员工/部门的借款余额快照,支持按状态、申请人、日期筛选。

⚠️ 环境注意:该单据在部分账套(如芯之蝶测试账套 <ACCT_ID>)未启用, kingdee_get_fields 会返回「未知表单」。本工具代码已就绪,待目标账套启用该模块后即可连真机使用; 字段 Key 以金蝶标准元数据为准,若实测报「字段不存在」请先用 kingdee_get_fields 复核。

推荐 field_keys: FID,FBillNo,FDate,FDocumentStatus,FApplicantId.FName,FEmployeeId.FName,FLoanAmount,FRepaidAmount,FUnRepayAmount

Input Schema

NameRequiredDescriptionDefault
paramsYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.4

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description goes well beyond them: it warns the form is not enabled in some account sets (returning 「未知表单」 from kingdee_get_fields), explains the tool therefore may not work against a live system, and gives a concrete recovery path for 「字段不存在」 errors. That is exactly the kind of failure-mode disclosure annotations cannot carry.

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 purpose and FormId, then the environment caveat, then the recommended field keys — a sensible ordering. It is on the long side with a multi-line warning block, but every section carries operational information an agent needs; nothing is pure 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?

An output schema exists so return values need no explanation, and the description covers the essentials for a query tool: what entity, which FormId, which fields to request, and what to do when the form is unavailable. The only remaining gap is that it doesn't clarify how the recommended field_keys interact with the default in the schema.

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 schema documents each leaf parameter (limit, start_row, field_keys, order_string, filter_string), but the description adds the tool-specific value the schema cannot — form_id should be ER_HistoricalLoanBalance — and supplies a curated field_keys list (FID, FBillNo, FApplicantId.FName, FLoanAmount, FRepaidAmount, FUnRepayAmount, etc.) that maps business concepts to Kingdee field names. It doesn't spell out filter_string syntax beyond the status/applicant/date hint.

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 concrete verb+resource (查询历史借款余额) and pins it to the exact Kingdee module and FormId ER_HistoricalLoanBalance, with the business domain (人人报销) named. That level of specificity makes it unmistakable versus the generic kingdee_query_bills or the neighbouring kingdee_query_expense_reimburse.

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 the intended scope — employee/department loan balance snapshots — and enumerates the supported filter dimensions (status, applicant, date), which tells the agent when this tool applies. It stops short of naming an alternative for cases where the module is unavailable, only saying to re-check fields with kingdee_get_fields, so the when-not guidance is partial.

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