Skip to main content
Glama
desk3
by desk3

get_market_calendar

Retrieve economic calendar data for specific months to track market and political events. Provide a date parameter in YYYY-MM format or get current month events automatically.

Instructions

Get economic calendar for specified month. Shows important market or political events. Parameter: date (optional) in format YYYY-MM (e.g., 2025-09). If not provided, returns current month data / 获取指定月份的经济日历,重要市场或政治事件。参数:date(可选)格式 YYYY-MM(如 2025-09),不传参表示获取当前月份

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoYear-month in format YYYY-MM (e.g., 2025-09). If not provided, returns current month / 年月格式 YYYY-MM(如 2025-09),不传参表示获取当前月份

Implementation Reference

  • The core handler function implementing the get_market_calendar tool logic by querying the external Desk3 API endpoint.
    async def get_market_calendar(date: str | None = None) -> dict[str, Any]:
        """
        Get economic calendar for specified month. Shows important market or political events.
        :param date: Year-month in format YYYY-MM (e.g., 2025-09). If not provided, returns current month
        :return: Economic calendar data with events organized by day
        """
        url = 'https://mcp.desk3.io/v1/market/calendar'
        params = {}
        if date:
            params['date'] = date
        try:
            return request_api('get', url, params=params)
        except Exception as e:
            raise RuntimeError(f"Failed to fetch market calendar data: {e}")
  • Registration of the get_market_calendar tool in list_tools(), including name, description, and JSON schema for input validation.
    types.Tool(
        name="get_market_calendar",
        description="Get economic calendar for specified month. Shows important market or political events. Parameter: date (optional) in format YYYY-MM (e.g., 2025-09). If not provided, returns current month data / 获取指定月份的经济日历,重要市场或政治事件。参数:date(可选)格式 YYYY-MM(如 2025-09),不传参表示获取当前月份",
        inputSchema={
            "type": "object",
            "properties": {
                "date": {
                    "type": "string",
                    "description": "Year-month in format YYYY-MM (e.g., 2025-09). If not provided, returns current month / 年月格式 YYYY-MM(如 2025-09),不传参表示获取当前月份",
                    "examples": ["2025-09", "2025-10", "2025-01"],
                    "pattern": "^[0-9]{4}-[0-9]{2}$"
                },
            },
            "required": [],
        },
    )
  • JSON Schema defining the input parameters for the get_market_calendar tool (optional 'date' parameter).
    inputSchema={
        "type": "object",
        "properties": {
            "date": {
                "type": "string",
                "description": "Year-month in format YYYY-MM (e.g., 2025-09). If not provided, returns current month / 年月格式 YYYY-MM(如 2025-09),不传参表示获取当前月份",
                "examples": ["2025-09", "2025-10", "2025-01"],
                "pattern": "^[0-9]{4}-[0-9]{2}$"
            },
        },
        "required": [],
    },
  • MCP tool call handler in @server.call_tool() that parses arguments, invokes the get_market_calendar function, and returns the JSON response.
    case "get_market_calendar":
        date = arguments.get("date") if arguments else None
        try:
            data = await get_market_calendar(date=date)
            return [
                types.TextContent(
                    type="text",
                    text=json.dumps(data, indent=2),
                )
            ]
        except Exception as e:
            raise RuntimeError(f"Failed to fetch market calendar data: {e}")
    case _:
Behavior3/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 describes the tool's function and parameter behavior (optional date with default to current month), but lacks details on rate limits, authentication needs, error handling, or response format. It provides basic operational context but misses deeper behavioral traits that would help an agent use it effectively.

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 appropriately sized and front-loaded, with the core purpose stated first. The bilingual format (English/Chinese) adds some redundancy but maintains clarity. Every sentence contributes essential information about the tool's function and parameter usage, with no wasted content.

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 moderate complexity (single optional parameter, no output schema, no annotations), the description is minimally complete. It covers the basic purpose and parameter behavior but lacks details on output format, error conditions, or integration context. For a data retrieval tool without structured output documentation, more guidance on what to expect would improve completeness.

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?

Schema description coverage is 100%, so the schema fully documents the single parameter. The description adds minimal value beyond the schema, only restating that the date is optional and defaults to the current month. Since there's only one parameter and the schema is comprehensive, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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: 'Get economic calendar for specified month. Shows important market or political events.' This specifies the verb ('Get'), resource ('economic calendar'), and scope ('market or political events'). However, it doesn't explicitly differentiate from sibling tools, which are all financial data tools but focus on different metrics like price indices, trends, or indicators rather than calendar events.

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

Usage Guidelines3/5

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

The description implies usage context by specifying it retrieves an economic calendar with market/political events, but it doesn't provide explicit guidance on when to use this tool versus alternatives. No sibling tools appear to offer similar calendar functionality, so there's no direct alternative mentioned, leaving usage context somewhat implied rather than clearly defined.

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/desk3/cryptocurrency-mcp-server'

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