Skip to main content
Glama
io.github.akfamily/aktools

io.github.akfamily/aktools

Official
by akfamily

save_data

Idempotent

调用 AKShare 接口,把完整数据保存为本机的 CSV 文件,返回文件路径、总行数、各列的说明与前 5 行。需要把数据交给其他程序(如用 AKQuant 回测)或数据超过 get_data 的 1000 行上限时使用;只想查看数据请用 get_data。文件保存在固定的数据目录中,不能指定路径,相同的接口与参数覆盖同一个文件

Instructions

调用 AKShare 接口,把完整数据保存为本机的 CSV 文件,返回文件路径、总行数、各列的说明与前 5 行。需要把数据交给其他程序(如用 AKQuant 回测)或数据超过 get_data 的 1000 行上限时使用;只想查看数据请用 get_data。文件保存在固定的数据目录中,不能指定路径,相同的接口与参数覆盖同一个文件

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "save_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes接口名,如 stock_zh_a_hist_sina
paramsNo接口参数,如 {"symbol": "sh600519", "start_date": "20240101"}

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.12

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations it discloses the important behaviors: the file lands in a fixed data directory, no path can be supplied, and identical interface+params overwrite the same file. That overwrite detail materially clarifies the meaning of idempotentHint=true and softens destructiveHint=false, and it also previews the return payload.

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 front-loaded with the action and return shape, then the routing rules, then the filesystem constraint — a sensible order. There is mild redundancy between 'files are stored in a fixed data directory' and 'the path cannot be specified', which keeps it from a 5.

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 two-parameter write tool with annotations and an output schema, everything needed to call it correctly is present: when to use it, what it writes, where it writes, overwrite semantics, and a preview of the response. Nothing material is left to inference.

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?

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by explaining that name+params jointly determine file identity and therefore overwrite behavior. It adds no per-parameter syntax detail beyond what the schema already provides.

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 states a specific verb and resource: it calls an AKShare interface and persists the full dataset as a local CSV, returning the path, row count, column notes and first 5 rows. It explicitly contrasts with the sibling get_data, so an agent can pick the right tool without opening either schema.

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?

It gives explicit when-to-use conditions (handing data to another program like AKQuant backtesting, or datasets exceeding get_data's 1000-row cap) and an explicit when-not (use get_data for viewing only). This is a complete routing rule with a named alternative.

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