Skip to main content
Glama
al-one

MCP Server for stock and crypto

全球财经快讯

stock_news_global

Access global financial news covering stock markets and cryptocurrencies.

Instructions

获取最新的全球财经快讯

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'stock_news_global' tool. It fetches global financial news via akshare's stock_info_global_sina() and additionally pulls news from the NewsNow API via the 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)
  • Registration of the 'stock_news_global' tool via @mcp.tool decorator with title '全球财经快讯' and description '获取最新的全球财经快讯'.
    @mcp.tool(
        title="全球财经快讯",
        description="获取最新的全球财经快讯",
  • Helper function newsnow_news() called by stock_news_global to fetch additional news from configurable NewsNow API channels.
    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 exist, so description must bear full burden. It only says 'get latest', implying read-only, but does not disclose data scope, frequency, rate limits, or any other behavioral traits beyond the minimal read intent.

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, front-loaded with core meaning, extremely concise with no wasted words.

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 zero parameters and no output schema, the description is minimally sufficient. However, it could provide more context on what the news includes (e.g., sources, categories) to be more complete for agent decision-making.

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?

Input schema has 0 parameters with 100% schema description coverage. The baseline is 3, and the description adds no parameter information beyond the schema, which is adequate.

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 retrieves the latest global financial news. It is specific with verb and resource, and implicitly differentiated from sibling 'stock_news' by including 'global', though not explicitly.

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 siblings like 'stock_news' or 'stock_indicators_*'. No exclusions or alternative mentions provided.

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