Skip to main content
Glama
kukapay

binance-announcements-mcp

fetch_latest_announcements

Retrieve Binance announcements in Markdown format to analyze market updates and take timely actions based on exchange communications.

Instructions

Tool to fetch the latest Binance announcements in Markdown format.
Args:
    count: Number of announcements to fetch (max 20).
    page: Page number to fetch (default 1).
Returns:
    Markdown string with announcement title, URL, and time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
pageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:14-48 (handler)
    The main handler function that implements the tool logic: fetches latest announcements from Binance API, processes them into Markdown format, handles pagination and limits, and manages errors.
    async def fetch_latest_announcements(count: int = 20, page: int = 1) -> str:
        """
        Tool to fetch the latest Binance announcements in Markdown format.
        Args:
            count: Number of announcements to fetch (max 20).
            page: Page number to fetch (default 1).
        Returns:
            Markdown string with announcement title, URL, and time.
        """
        if count > 20:
            raise ValueError("Count cannot exceed 20")
        if page < 1:
            raise ValueError("Page must be at least 1")
    
        async with httpx.AsyncClient() as client:
            try:
                response = await client.get(BINANCE_API_URL, params={"page": page, "rows": count})
                response.raise_for_status()
                data = response.json()
                if data["code"] != "000000":
                    raise Exception(f"API error: {data.get('message', 'Unknown error')}")
                
                announcements = data["data"]
                markdown = "# Binance Announcements\n\n"
                for ann in announcements:
                    title = ann.get("title", "No Title")
                    url = ann.get("url", "No URL")
                    time = datetime.fromtimestamp(ann.get("time", 0) / 1000).strftime('%m-%d %H:%M:%S')
                    markdown += f"- [{title}]({url}) _{time}_\n"
                
                return markdown if announcements else "# No Announcements Found\n"
            except httpx.HTTPStatusError as e:
                raise Exception(f"HTTP error: {e}")
            except Exception as e:
                raise Exception(f"Failed to fetch announcements: {e}")
  • main.py:13-13 (registration)
    The @mcp.tool() decorator registers the fetch_latest_announcements function as an MCP tool.
    @mcp.tool()
  • main.py:11-11 (helper)
    Constant defining the Binance API endpoint URL used by the tool handler.
    BINANCE_API_URL = "https://www.binance.com/bapi/composite/v1/public/market/notice/get"
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the return format ('Markdown string') and basic parameter info, but fails to disclose critical traits like rate limits, authentication needs, error handling, or whether it's a read-only operation. This leaves significant gaps in understanding the tool's behavior.

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 well-structured and front-loaded with the core purpose, followed by parameter and return details. It uses bullet-like formatting for clarity without unnecessary verbosity. However, the lack of usage context slightly reduces efficiency, as every sentence doesn't fully earn its place in guiding the agent.

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 the tool's low complexity (2 parameters, no annotations, but has an output schema), the description is minimally adequate. It covers the purpose, parameters, and returns, but the output schema existence means it needn't explain return values in detail. However, gaps in behavioral transparency and usage guidelines prevent a higher score.

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 schema description coverage is 0%, so the description must compensate. It adds meaningful semantics: 'count' is explained as 'Number of announcements to fetch (max 20)' and 'page' as 'Page number to fetch (default 1).' This clarifies usage beyond the bare schema, though it could detail format constraints or examples for full compensation.

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: 'fetch the latest Binance announcements in Markdown format.' It specifies the verb ('fetch'), resource ('Binance announcements'), and format ('Markdown'), making the action concrete. However, without sibling tools, it cannot demonstrate differentiation from alternatives, which prevents a perfect score.

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 provides no guidance on when to use this tool versus alternatives, prerequisites, or contextual constraints. It only lists parameters and returns, offering no usage context. This lack of guidance limits its effectiveness for an AI agent in decision-making scenarios.

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/kukapay/binance-announcements-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server