Skip to main content
Glama
aahl

AkTools MCP Server

by aahl

全球财经快讯

stock_news_global

Get current global financial news and market updates for informed investment decisions.

Instructions

获取最新的全球财经快讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the stock_news_global tool. Fetches global financial news via akshare's stock_info_global_sina() and supplements with newsnow_news() helper.
    @mcp.tool(
        title="全球财经快讯",
        description="获取最新的全球财经快讯",
    )
    def stock_news_global():
        news = []
        try:
            dfs = ak.stock_info_global_sina()
            csv = dfs.to_csv(index=False, float_format="%.2f").strip()
            csv = csv.replace(datetime.now().strftime("%Y-%m-%d "), "")
            news.extend(csv.split("\n"))
        except Exception:
            pass
        news.extend(newsnow_news())
        return "\n".join(news)
  • Tool registration via FastMCP decorator with title '全球财经快讯'.
    @mcp.tool(
        title="全球财经快讯",
        description="获取最新的全球财经快讯",
    )
  • Helper function called by stock_news_global to fetch news from configurable NewsNow sources (wallstreetcn, cls-telegraph, jin10 via environment variables).
    def newsnow_news(channels=None):
        base = os.getenv("NEWSNOW_BASE_URL")
        if not base:
            return []
        if not channels:
            channels = os.getenv("NEWSNOW_CHANNELS") or "wallstreetcn-quick,cls-telegraph,jin10"
        if isinstance(channels, str):
            channels = channels.split(",")
        all = []
        try:
            res = requests.post(
                f"{base}/api/s/entire",
                json={"sources": channels},
                headers={
                    "User-Agent": USER_AGENT,
                    "Referer": base,
                },
                timeout=60,
            )
            lst = res.json() or []
            for item in lst:
                for v in item.get("items", [])[0:15]:
                    title = v.get("title", "")
                    extra = v.get("extra") or {}
                    hover = extra.get("hover") or title
                    info = extra.get("info") or ""
                    all.append(f"{hover} {info}".strip().replace("\n", " "))
        except Exception:
            pass
        return all
Behavior2/5

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

No annotations provided, so the description bears full responsibility. It states the tool fetches news but does not disclose if it's read-only, if it requires authentication, or if it has any side effects. For a simple fetch tool, this minimal disclosure is inadequate given the lack of annotations.

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?

A single sentence that is concise and front-loaded with the core action. No fluff or redundancy.

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?

The tool has zero parameters and no output schema, so the description is the only source of context. While the purpose is clear, it does not describe what the returned data looks like (e.g., headlines, summaries, or full articles). For a news tool, this is a notable omission, but given the simplicity, it is minimally 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 in the schema, so schema coverage is 100%. Per rubric, 0 parameters merits a baseline of 4. The description does not need to add parameter meaning since there are none.

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?

The description clearly states the tool's purpose: '获取最新的全球财经快讯' (Get the latest global financial news). The verb '获取' (get) and resource '全球财经快讯' (global financial news) are specific. The name and description distinguish it from sibling tool 'stock_news' which likely focuses on Chinese stocks.

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 guidance on when to use this tool versus alternatives like 'stock_news' or other news sources. The description does not mention any context, prerequisites, or exclusions.

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