Skip to main content
Glama
al-one

MCP Server for stock and crypto

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

get_current_time

Retrieve current system time and A-share trading day information to verify date parameters before using other financial data tools.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_current_time' tool. It retrieves the current datetime, determines the weekday in Chinese, fetches recent A-share trading dates using ak_cache and ak.tool_trade_date_hist_sina, and returns formatted information.
    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)
  • Registration of the 'get_current_time' tool using the @mcp.tool decorator, specifying title and description.
    @mcp.tool(
        title="获取当前时间及A股交易日信息",
        description="获取当前系统时间及A股交易日信息,建议在调用其他需要日期参数的工具前使用该工具",
    )
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions what the tool returns (current time and A-share trading day info) but doesn't disclose behavioral traits like whether this is a read-only operation, if it makes external API calls, what format the time is returned in, or any rate limits. For a tool with zero annotation coverage, this is insufficient behavioral disclosure.

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?

The description is perfectly concise with just two Chinese sentences. The first states the purpose, the second provides usage guidance. Every word earns its place with zero waste or redundancy. It's appropriately sized for a simple tool.

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?

Given this is a simple read operation with no parameters and no output schema, the description provides basic purpose and usage guidance. However, without annotations or output schema, it should ideally describe what exactly 'A股交易日信息' includes (e.g., is today a trading day, next trading date, etc.) and the format of returned data. The current description is adequate but has clear gaps in output specification.

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?

The tool has 0 parameters with 100% schema description coverage. The description doesn't need to explain parameters, and it appropriately doesn't mention any. Since there are no parameters to document, this earns a baseline 4 for not creating confusion about non-existent parameters.

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 states the tool's purpose: '获取当前系统时间及A股交易日信息' (Get current system time and A-share trading day information). It specifies both the verb ('获取' - get) and resources (system time, A-share trading day info). However, it doesn't explicitly differentiate from sibling tools, which are mostly financial data tools but none specifically about time/trading day info.

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?

The description provides clear usage context: '建议在调用其他需要日期参数的工具前使用该工具' (Recommended to use this tool before calling other tools that require date parameters). This gives practical guidance on when to use it. However, it doesn't specify when NOT to use it or name specific alternatives among siblings.

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