Skip to main content
Glama

get_events

Retrieve planned workouts and races from your training calendar by specifying date ranges. Use this tool to access scheduled athletic events for training planning and performance analysis.

Instructions

Get planned workouts and races from the calendar.

Args: oldest: Start date in YYYY-MM-DD format (inclusive). newest: End date in YYYY-MM-DD format (inclusive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
oldestNo
newestNo

Implementation Reference

  • main.py:103-119 (handler)
    The get_events tool handler function that fetches planned workouts and races from the calendar. Takes optional oldest/newest date parameters and returns a list of events from the Intervals.icu API.
    @mcp.tool()
    def get_events(
        oldest: str | None = None,
        newest: str | None = None,
    ) -> list:
        """Get planned workouts and races from the calendar.
    
        Args:
            oldest: Start date in YYYY-MM-DD format (inclusive).
            newest: End date in YYYY-MM-DD format (inclusive).
        """
        params: dict[str, Any] = {}
        if oldest:
            params["oldest"] = oldest
        if newest:
            params["newest"] = newest
        return _get(f"/athlete/{ATHLETE_ID}/events", params)
  • main.py:18-22 (helper)
    Helper function _get that makes HTTP GET requests to the Intervals.icu API. Used by get_events and other tools to fetch data.
    def _get(path: str, params: dict[str, Any] | None = None) -> Any:
        with _client() as client:
            r = client.get(path, params=params)
            r.raise_for_status()
            return r.json()
  • main.py:14-15 (helper)
    Helper function _client that creates and configures an httpx Client with API authentication for Intervals.icu API requests.
    def _client() -> httpx.Client:
        return httpx.Client(auth=("API_KEY", API_KEY), base_url=BASE_URL)
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 adds the context that events are 'planned' (suggesting future calendar items), but fails to disclose read-only status, pagination behavior, date range limits, or timezone handling. The agent must infer safety from the verb 'Get' without confirmation.

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 efficiently structured with a clear purpose statement followed by an Args block. Every sentence earns its place—no filler text. The format is front-loaded with the core action and scoped appropriately for a two-parameter 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 the simple parameter structure (two nullable strings) and lack of output schema, the description is minimally adequate. It covers parameter semantics sufficiently but leaves gaps regarding optional parameter behavior and return value structure. For a read-only retrieval tool with no annotations, additional context about data volume or filtering behavior would strengthen completeness.

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?

With 0% schema description coverage, the description effectively compensates by documenting both parameters in the Args block: it specifies that 'oldest' is the start date and 'newest' is the end date, both requiring 'YYYY-MM-DD' format and noting they are 'inclusive'. Deducted one point because it omits that both parameters are optional (nullable with defaults) per the schema.

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 'planned workouts and races from the calendar'—specific verb (Get), resource (workouts/races), and scope (planned/from calendar). It implicitly distinguishes from sibling 'get_activities' (which implies completed/historical data) through the keyword 'planned', though it doesn't explicitly name the sibling comparison.

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 explicit guidance on when to use this tool versus siblings like 'get_activities' or 'get_activity_detail'. While the 'planned' qualifier implies usage for future/scheduled events, there are no explicit when-to-use constraints, prerequisites, or exclusions stated.

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/ryansheppard/intervals.mcp'

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