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

io.github.akfamily/aktools

Official
by akfamily

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

AKTools 提供 AKShare 的近千个财经数据接口(股票、期货、期权、基金、债券、外汇、宏观等)。 使用步骤:

  1. 用 search_interfaces 搜索接口,可用多个关键词,例如“A股 日线”“交易日历”“期货持仓”“stock_zh_a”

  2. 用 describe_interface 查看接口的参数、默认值、返回列与调用示例

  3. 用 get_data 传入接口名和参数获取数据;数据量大时一次最多返回 max_rows 行, 用 offset 翻页,offset 为负数时从末尾倒数(按日期升序的数据,最新的行在末尾,如 offset=-20 取最近 20 行) 参数值一律按文本传给 AKShare,日期通常写成 20240101 的形式。 搜索关键词请描述数据类型(如“港股 日线”“期货 分钟”),不要写具体证券的名称或代码。 数据来源:搜索结果与接口说明中的 source 是数据来源,同类数据常有多个来源(如东方财富、新浪财经、腾讯); describe_interface 的 alternatives 列出了来自其他来源的同类接口。 有 save_data 工具时(服务在本机运行):需要把数据交给其他程序(如 AKQuant 回测)或数据超过 1000 行时, 用 save_data 把完整数据保存为 CSV 文件,再把返回的 path 交给对方;只想查看数据仍用 get_data。 来源为“东方财富·行情(频繁访问易限流)”的接口,短时间内请求较多时整个 IP 会被临时限流,所有东方财富行情接口约 5 分钟以上无法使用; 需要连续获取多只证券或大量行情数据时,优先选用其他来源的同类接口。东方财富的其他接口(宏观、财务报表、龙虎榜等)不受影响,照常使用。 get_data 报 429 限流时不要立即重试同一个接口,按报错中的建议改用其他来源。回答时说明数据来自哪个来源;换了来源时告诉用户,不同来源的复权方式与列名可能不同。

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_interfacesA

按关键词搜索 AKShare 数据接口,结果按相关度排序,返回接口名、中文标题、类目与数据来源(source)。最多返回前 50 个。关键词描述数据类型,不要写证券名称或代码。同类数据常有多个来源:source 为“东方财富·行情(频繁访问易限流)”的接口,需要连续或批量取数时优先选其他来源的同类接口

describe_interfaceA

查看接口的标题、数据来源与访问限制、其他来源的同类接口(alternatives)、各参数的默认值、类型和说明,以及返回列、数据范围说明与调用示例

get_dataA

调用 AKShare 接口获取数据。一次最多返回 max_rows 行,用 offset 翻页或取最后若干行;返回总行数与本次的起始行,随 HTTP 服务运行时还给出完整数据的 CSV 下载地址

save_dataA

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

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool covers a distinct stage of the workflow: search_interfaces for discovery, describe_interface for metadata or schema inspection, get_data for retrieving rows, and save_data for persisting data to a CSV file. The only pair with any real overlap is get_data and save_data, but the descriptions explicitly separate them: one returns rows, while the other writes the full dataset to disk and returns the file path.

Naming Consistency5/5

All four tools use the same verb_noun snake_case pattern: search_interfaces, describe_interface, get_data, save_data. The singular and plural forms of the noun reflect semantics rather than inconsistency.

Tool Count4/5

Four tools cover the essentials of discover, inspect, fetch, and save for a large interface catalog, and each has a clear purpose. It is on the thin side, with no dedicated way to browse categories or list all interfaces, but nothing is redundant.

Completeness4/5

The discover-inspect-fetch-save lifecycle is fully covered, including paging via offset and max_rows, so agents can handle the 1000-row limit. Minor gaps remain: there is no way to browse interfaces by category or without a keyword, no batch or multi-interface fetch, and no way to check rate-limit or quota state, though these are workable around.

Maintenance

ActivityMaintained
ResponsivenessLimited data