Skip to main content
Glama
aahl

AkTools MCP Server

by aahl

A股龙虎榜统计

stock_lhb_ggtj_sina

Fetch individual stock statistics on the A-share dragon and tiger list for recent 5, 10, 30, or 60 days, with configurable result count (30-100).

Instructions

获取中国A股市场(上证、深证)的龙虎榜个股上榜统计数据

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo统计最近天数,仅支持: [5/10/30/60]5
limitNo返回数量(int,30-100)

Implementation Reference

  • Handler function for the 'stock_lhb_ggtj_sina' tool. It uses the @mcp.tool decorator (which also acts as registration), retrieves data via ak_cache wrapping akshare's stock_lhb_ggtj_sina function, limits results, and returns CSV.
    @mcp.tool(
        title="A股龙虎榜统计",
        description="获取中国A股市场(上证、深证)的龙虎榜个股上榜统计数据",
    )
    def stock_lhb_ggtj_sina(
        days: str = Field("5", description="统计最近天数,仅支持: [5/10/30/60]"),
        limit: int = Field(50, description="返回数量(int,30-100)", strict=False),
    ):
        dfs = ak_cache(ak.stock_lhb_ggtj_sina, symbol=days, ttl=3600)
        dfs = dfs.head(int(limit))
        return dfs.to_csv(index=False, float_format="%.2f").strip()
  • Registration via @mcp.tool decorator on the stock_lhb_ggtj_sina function.
    @mcp.tool(
        title="A股龙虎榜统计",
        description="获取中国A股市场(上证、深证)的龙虎榜个股上榜统计数据",
    )
  • Input schema: 'days' (str, default '5', options: 5/10/30/60) and 'limit' (int, default 50, range 30-100).
    def stock_lhb_ggtj_sina(
        days: str = Field("5", description="统计最近天数,仅支持: [5/10/30/60]"),
        limit: int = Field(50, description="返回数量(int,30-100)", strict=False),
  • Helper function 'ak_cache' that wraps akshare function calls with a two-layer caching mechanism (in-memory TTL cache + disk cache).
    def ak_cache(fun, *args, **kwargs) -> pd.DataFrame | None:
        key = kwargs.pop("key", None)
        if not key:
            key = f"{fun.__name__}-{args}-{kwargs}"
        ttl1 = kwargs.pop("ttl", 86400)
        ttl2 = kwargs.pop("ttl2", None)
        cache = CacheKey.init(key, ttl1, ttl2)
        all = cache.get()
        if all is None:
            try:
                _LOGGER.info("Request akshare: %s", [key, args, kwargs])
                all = fun(*args, **kwargs)
                cache.set(all)
            except Exception as exc:
                _LOGGER.exception(str(exc))
        return all
Behavior2/5

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

No annotations are provided, and the description does not disclose behavioral traits such as data freshness, rate limits, or mutation side effects. It only states the action without additional transparency.

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 a single, concise sentence that efficiently communicates the tool's purpose. It is front-loaded and has no unnecessary words, though it could be slightly more informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of output schema, the description should hint at return values or structure. It does not. The tool is moderately complex with two parameters, but the description fails to provide complete context for an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description does not add any parameter information beyond the schema's own descriptions for 'days' and 'limit'. It neither enhances nor detracts.

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?

Description clearly states it retrieves Chinese A-share market (Shanghai, Shenzhen) dragon and tiger list individual stock statistics. This specific verb-resource combination differentiates it from sibling tools like stock_indicators_a or stock_prices, which cover different data.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or any exclusions. It lacks context on prerequisites or suitable scenarios.

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/aahl/mcp-aktools'

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