Skip to main content
Glama

get_activity_detail

Retrieve comprehensive activity data including laps and intervals from intervals.icu training logs for detailed performance analysis and workout planning.

Instructions

Get full detail for a single activity including laps and intervals.

Args: activity_id: The activity ID (visible in the intervals.icu URL).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activity_idYes

Implementation Reference

  • main.py:55-62 (handler)
    The main handler function for the 'get_activity_detail' tool. It takes an activity_id parameter and returns full activity details by making a GET request to the Intervals.icu API endpoint /activity/{activity_id}.
    @mcp.tool()
    def get_activity_detail(activity_id: str) -> dict:
        """Get full detail for a single activity including laps and intervals.
    
        Args:
            activity_id: The activity ID (visible in the intervals.icu URL).
        """
        return _get(f"/activity/{activity_id}")
  • main.py:18-22 (helper)
    Helper function _get() that performs authenticated HTTP GET requests to the Intervals.icu API and returns JSON responses.
    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 an authenticated httpx Client with API credentials and base URL configured.
    def _client() -> httpx.Client:
        return httpx.Client(auth=("API_KEY", API_KEY), base_url=BASE_URL)
  • main.py:11-11 (registration)
    FastMCP server instance creation which serves as the registration point for all tools including get_activity_detail.
    mcp = FastMCP("intervals")
Behavior3/5

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

With no annotations provided, the description carries full disclosure burden. It adds valuable context that 'full detail' specifically includes 'laps and intervals,' but omits safety characteristics (read-only status), error handling (404 behavior), or rate limiting that annotations would typically cover.

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?

Efficient two-part structure with the main sentence front-loaded with key behavioral details (laps/intervals), followed by a standard Args block. No redundant or wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Appropriate for a single-parameter tool without output schema. The description conceptually explains the return value (laps/intervals) and documents the required parameter. Minor gap regarding error cases or authentication, but sufficient for the complexity level.

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?

Schema coverage is 0%, requiring description compensation. The Args section adds critical context beyond the schema: it defines activity_id and specifies it is 'visible in the intervals.icu URL,' helping users locate the correct value. Could be a 5 if it added format validation rules.

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?

Description clearly states the tool 'Get[s] full detail for a single activity' with specific scope including 'laps and intervals.' The 'single activity' focus effectively distinguishes it from sibling get_activities (likely a list operation).

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?

No explicit when-to-use guidance or comparison to alternatives (e.g., 'Use this instead of get_activities when you need lap data'). However, the 'single activity' phrasing implies usage for detailed retrieval versus bulk listing.

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