Skip to main content
Glama
YanSir1999

kingdee-mcp

by YanSir1999

query_bill_to_file

Exports Kingdee ERP bill data to a local file in NDJSON or CSV format, streaming paginated results for large volumes. Supports custom fields, filters, and returns file path and row count.

Instructions

自动翻页并流式写入本地文件,适合大数据量导出(万行以上)。

不在内存中累积数据,写入完成后返回文件路径和统计信息。 文件可用 Read 工具抽检,或交由 pandas/polars 处理。

返回格式: {"path": "...", "row_count": N, "bytes": M, "format": "ndjson"} 若中途出错:{"error": "...", "path": "...", "row_count": <已写入>, "bytes": M}

Args: form_id: 表单ID。如 SAL_SaleOrder、PUR_PurchaseOrder、BD_MATERIAL 等 field_keys: 查询字段,逗号分隔。如 "FBillNo,FDate,FAmount" filter_string: 过滤条件。如 "FDate >= '2025-01-01'" output_path: 输出文件绝对路径。如 "/tmp/orders.ndjson" format: 输出格式,ndjson(每行一个 JSON 对象)或 csv,默认 ndjson page_size: 每页行数,默认 2000 max_rows: 最大写入行数,默认 500000;超过则截断并正常返回

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNondjson
form_idYes
max_rowsNo
page_sizeNo
field_keysYes
output_pathNo
filter_stringNo

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 full responsibility. It discloses auto-pagination, streaming writes, no in-memory accumulation, return format with row_count/bytes, error behavior with partial rows, and max_rows truncation—all beyond what the schema shows.

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 front-loaded with purpose and use case, followed by a concise return-format spec and a clearly structured Args list. Every section earns its place given the tool's complexity (7 parameters and rich behavior).

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?

Given the output schema is included in the description (@return/error shape) and the parameters are fully documented, the description covers the entire invocation lifecycle: when to use, how to call, and what to expect on success/failure. No major gaps remain.

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 description coverage is 0%, so the description must compensate fully. It explains every parameter with concrete examples (e.g., form_id like 'SAL_SaleOrder', filter_string like "FDate >= '2025-01-01'"), defaults, and the output_path example. This is exemplary.

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 opens with a specific verb+resource+outcome: '自动翻页并流式写入本地文件' (auto-paginate and stream-write to local file). It clearly distinguishes from siblings like query_bill and view_bill by emphasizing file output for large exports.

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 explicitly states suitability for large data exports ('适合大数据量导出(万行以上)') and explains the streaming/no-memory-accumulation advantage. It mentions the file can be read by Read tool or pandas/polars, but does not explicitly state when to avoid this tool or name 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