Skip to main content
Glama
YanSir1999

kingdee-mcp

by YanSir1999

query_bill_range

Query Kingdee bills across date ranges with automatic chunking and pagination for cross-month/year spans. Returns inline for small ranges or streams to a file for large queries.

Instructions

按日期自动切片 + 翻页,适合跨月/跨年查询。

将 [date_from, date_to) 按 chunk 切成 N 段,每段独立翻页拉取。 output_path 为空时内联返回(受 MCP 1 MB 限制,适合小跨度); 非空时流式落盘,适合大跨度(年级)查询。

返回格式(内联): {"rows": [...], "row_count": N, "chunks": K, "exhausted": true} 返回格式(落盘): {"path": "...", "row_count": N, "bytes": M, "chunks": K, "format": "ndjson"} 若中途出错:{"error": "...", "path": "...", "row_count": <已写入>, "bytes": M}

Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder 等 field_keys: 查询字段,逗号分隔 date_field: 日期字段名。通常是 FDate 或 FCreateDate date_from: 起始日期(含),YYYY-MM-DD date_to: 结束日期(不含),YYYY-MM-DD extra_filter: 额外过滤条件(与日期条件 AND 拼接) chunk: 切片粒度,month(默认)/ week / day output_path: 落盘路径(绝对路径)。空=内联返回 page_size: 每页行数,默认 2000

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chunkNomonth
date_toYes
form_idYes
date_fromYes
page_sizeNo
date_fieldYes
field_keysYes
output_pathNo
extra_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: automatic date slicing, independent pagination per chunk, the 1 MB inline limit, streaming write behavior when output_path is set, and error handling with partial row counts. This is exceptionally transparent.

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 description is well-structured with a one-line summary, behavior explanation, output format examples, and a parameter list. It is slightly long but every section earns its place. The return format examples are slightly redundant given the output schema exists, but they provide valuable concrete context.

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 complex tool with 9 parameters and chunking logic, the description is complete. It covers all parameters, behavioral nuances, output modes, error handling, and format details. An agent can confidently select and invoke this tool correctly based on this description alone.

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?

The input schema has zero description coverage, but the description compensates fully. Every parameter is explained with meaning and examples: form_id (e.g., SAL_SaleOrder), field_keys (comma-separated), date_field (e.g., FDate), date_from/to (inclusive/exclusive), extra_filter (AND-combined), chunk (month/week/day), output_path (empty vs absolute path), and page_size (default 2000).

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's function: it automatically slices a date range into chunks and paginates through each chunk, making it suitable for cross-month/year queries. This distinguishes it from siblings like query_bill (likely single-range) and query_bill_all (likely without chunking).

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?

The description specifies that it is suited for cross-month/year queries and explains the trade-off between inline return (MCP 1 MB limit) and streaming to file for large spans. It does not explicitly name alternative tools, but the context is clear enough for an agent to decide when to use it.

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