Skip to main content
Glama
aahl

AkTools MCP Server

by aahl

获取当前时间及A股交易日信息

get_current_time

Retrieves current system time and A-share market trading day status. Use before tools requiring date parameters to ensure accurate timing.

Instructions

获取当前系统时间及A股交易日信息,建议在调用其他需要日期参数的工具前使用该工具

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool 'get_current_time' is registered via the @mcp.tool decorator with title '获取当前时间及A股交易日信息'.
    @mcp.tool(
        title="获取当前时间及A股交易日信息",
        description="获取当前系统时间及A股交易日信息,建议在调用其他需要日期参数的工具前使用该工具",
    )
  • Handler function 'get_current_time' that gets current system time, weekday, and recent A-stock trading days from akshare.
    def get_current_time():
        now = datetime.now()
        week = "日一二三四五六日"[now.isoweekday()]
        texts = [f"当前时间: {now.isoformat()}, 星期{week}"]
        dfs = ak_cache(ak.tool_trade_date_hist_sina, ttl=43200)
        if dfs is not None:
            start = now.date() - timedelta(days=5)
            ended = now.date() + timedelta(days=5)
            dates = [
                d.strftime("%Y-%m-%d")
                for d in dfs["trade_date"]
                if start <= d <= ended
            ]
            texts.append(f", 最近交易日有: {','.join(dates)}")
        return "".join(texts)
  • Helper 'ak_cache' used by the handler to cache results from akshare API calls with TTL.
    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 provided to indicate safety or idempotency. Description only states purpose without any additional behavioral traits (e.g., read-only, no side effects). For a simple tool, minimal transparency is acceptable but still lacking.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, directly front-loaded with the action and result. No wasted words.

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

Completeness4/5

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

For a tool with no parameters and no output schema, the description covers purpose and recommended usage. Could specify what 'A股交易日信息' includes, but overall adequate.

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?

No parameters, so schema coverage is 100% trivial. Description adds value by specifying the return of A-share trading day information, which is not in the schema.

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 gets current system time and A-share trading day information. This distinguishes it from sibling tools like stock prices or crypto tools, which are data-focused.

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

Usage Guidelines4/5

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

Explicitly recommends using before other tools needing date parameters, providing clear context. However, no exclusions or alternative tools mentioned.

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