Skip to main content
Glama
al-one

MCP Server for stock and crypto

A股龙虎榜统计

stock_lhb_ggtj_sina

Retrieve statistics of stocks listed on the Dragon and Tiger Board for Shanghai and Shenzhen A-share markets. Set the number of days and result limit.

Instructions

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

Input Schema

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

Implementation Reference

  • Handler function that fetches A-share LHB (龙虎榜) statistics from akshare by calling ak.stock_lhb_ggtj_sina with symbol=days, caches result for 3600s, limits to 'limit' rows, and returns CSV string.
    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()
  • Input parameters: days (str, default '5', options: 5/10/30/60) and limit (int, default 50, range 30-100).
    days: str = Field("5", description="统计最近天数,仅支持: [5/10/30/60]"),
    limit: int = Field(50, description="返回数量(int,30-100)", strict=False),
  • Registration decorator using @mcp.tool with title 'A股龙虎榜统计' and description.
    @mcp.tool(
        title="A股龙虎榜统计",
        description="获取中国A股市场(上证、深证)的龙虎榜个股上榜统计数据",
    )
  • Caching helper function that wraps akshare calls with dual-layer cache (TTLCache + diskcache) to avoid redundant API requests.
    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?

With no annotations, the description carries full burden for behavioral transparency. It only states the action (获取, 'get') without detailing behavioral traits like rate limits, data freshness, ordering, pagination, or whether the operation is read-only. The description fails to compensate for missing annotations.

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 directly states the purpose. While efficient, it could be restructured to include key behavioral or parameter context without losing brevity.

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 and annotations, the description is incomplete. It does not describe what the returned statistics contain (e.g., list of stocks with net values, frequency), nor does it clarify the scope (e.g., daily updates, historical range). The tool's context is insufficient for an agent to confidently invoke it.

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 coverage is 100%, so the parameters are already documented. The description adds no additional meaning about how 'days' or 'limit' affect the results. For example, it does not explain that 'days' likely refers to recent trading days. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's purpose: retrieving statistics of individual stocks on the dragon and tiger list for China's A-share market (Shanghai and Shenzhen). It distinguishes from sibling tools like stock_indicators_a or stock_zt_pool_em, but lacks specifics on what type of statistics are returned (e.g., net buy amounts, frequency).

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?

No usage guidelines are provided. The description does not specify when to use this tool versus alternatives such as stock_zt_pool_em or stock_info, nor does it mention prerequisites or caveats.

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

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