Skip to main content
Glama
YanSir1999

kingdee-mcp

by YanSir1999

query_bill_all

Automatically paginate through Kingdee bills to fetch all rows matching filters, up to a configurable safety limit. Returns row count and indicates if all data was retrieved.

Instructions

自动翻页查询直到拉完或达到 max_rows 安全上限。

适合估算 ≤ 数千行的场景。大数据量(> 5000 行)请用 query_bill_to_file(落盘) 或 query_bill_range(日期分片),避免超过 MCP 1 MB 返回限制。

返回格式: {"rows": [...], "row_count": N, "exhausted": true/false, "next_start_row": N, # 仅 exhausted=false 时 "hint": "..."} # 仅 exhausted=false 时

Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder、BD_MATERIAL 等 field_keys: 查询字段,逗号分隔。如 "FBillNo,FDate,FAmount" filter_string: 过滤条件。如 "FDate >= '2025-01-01'" order_string: 排序字段。如 "FDate ASC" max_rows: 安全上限,默认 20000;超过则提前终止并返回 exhausted=false page_size: 每页行数,默认 2000,建议不超过 2000

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
form_idYes
max_rowsNo
page_sizeNo
field_keysYes
order_stringNo
filter_stringNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses the pagination loop, early termination via max_rows, exhausted flag semantics, next_start_row continuation, and the MCP response limit rationale. This is rich behavioral context beyond a simple 'query' operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is well-structured with clear sections: purpose, usage guidance, return format, and parameter breakdown. It is front-loaded with the core behavior, and every line adds value with no filler content. The use of bullets and examples enhances readability.

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 moderate complexity (auto-pagination), but the description covers all aspects: purpose, when to use, parameter semantics, return format, and edge cases (exhausted=false, next_start_row). It is self-contained and sufficient for a correct invocation, especially given the absent annotations and schema descriptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description thoroughly explains all 6 parameters with concrete examples (e.g., form_id: SAL_SaleOrder, field_keys: FBillNo,FDate,FAmount, filter_string: FDate >= '2025-01-01'). It also clarifies default values and constraints for max_rows and page_size, fully compensating for the lack of schema descriptions.

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 clearly states the tool performs auto-paginated queries until all records are fetched or max_rows is reached. It distinguishes itself from siblings by explicitly naming alternatives for large datasets (query_bill_to_file, query_bill_range) and defines the exact resource (bills) and operation (query).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states that this tool is suitable for estimating ≤ 5000 rows and directs users to query_bill_to_file or query_bill_range for larger datasets, citing the MCP 1 MB return limit. This provides clear when-to-use and when-not-to-use guidance with alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YanSir1999/kingdee-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server