Skip to main content
Glama
aahl

AkTools MCP Server

by aahl

港股关键指标

stock_indicators_hk

Retrieve key financial report indicators for Hong Kong stocks by providing a stock symbol.

Instructions

获取港股市场的股票财务报告关键指标

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes股票代码

Implementation Reference

  • Handler function for stock_indicators_hk tool. Fetches Hong Kong stock financial indicators using akshare's stock_financial_hk_analysis_indicator_em, returns first 15 rows as CSV.
    @mcp.tool(
        title="港股关键指标",
        description="获取港股市场的股票财务报告关键指标",
    )
    def stock_indicators_hk(
        symbol: str = field_symbol,
    ):
        dfs = ak_cache(ak.stock_financial_hk_analysis_indicator_em, symbol=symbol, indicator="报告期")
        keys = dfs.to_csv(index=False, float_format="%.3f").strip().split("\n")
        return "\n".join(keys[0:15])
  • Registration via @mcp.tool decorator with title and description for the stock_indicators_hk tool.
    @mcp.tool(
        title="港股关键指标",
        description="获取港股市场的股票财务报告关键指标",
    )
    def stock_indicators_hk(
        symbol: str = field_symbol,
    ):
        dfs = ak_cache(ak.stock_financial_hk_analysis_indicator_em, symbol=symbol, indicator="报告期")
        keys = dfs.to_csv(index=False, float_format="%.3f").strip().split("\n")
        return "\n".join(keys[0:15])
  • Helper function ak_cache that caches results from akshare API calls. Used by stock_indicators_hk to call ak.stock_financial_hk_analysis_indicator_em with caching.
    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, so the description carries full responsibility for behavioral disclosure. However, it merely states the purpose and gives no information about side effects, permissions, rate limits, or return behavior. It does not indicate if the operation is read-only or if it has any destructive effects.

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 short sentence that conveys the core purpose without extra words. It is appropriately sized for a simple tool, though it could benefit from better structure (e.g., bullet points or separate sections for clarity).

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

Completeness3/5

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

For a simple tool with one required parameter and no output schema, the description is minimal but covers the basic function. However, it does not explain what specific indicators are returned, how the output is structured, or any limitations. It lacks completeness for an agent to fully understand the tool's capabilities.

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% for the single parameter 'symbol' (described as '股票代码'). The description does not add any additional meaning beyond the schema (e.g., format, examples, constraints). Baseline is 3 per guidelines since coverage is high, and no extra value is provided.

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 specifies a verb ('获取' = get) and resource ('港股市场股票财务报告关键指标' = key financial indicators for HK stocks). It clearly distinguishes from sibling tools like stock_indicators_a and stock_indicators_us by region. However, it does not specify which indicators are included.

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 only states what the tool does without any guidance on when to use it versus alternatives. There is no explicit mention of prerequisites, edge cases, or when not to use it. The implied usage is for HK stocks, but no clear differentiation from other stock indicator tools.

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