Skip to main content
Glama

get_workouts

Retrieve workout details for a specific time period from your health data, with timestamps automatically converted to your local time zone.

Instructions

Get details about the workouts that the user has done during a period of time. Result timestamps will include time zones. Always translate timestamps to the user's local time zone when this is known.

Args: start_time: The starting time of the period. Must include tz (ISO8601). end_time: the ending time of the period. Must include tz (ISO8601).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_timeYes
end_timeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_workouts' tool. It is decorated with @mcp.tool() for automatic registration. Fetches workouts from FulcraAPI.apple_workouts between the given datetime range and returns a JSON string summary.
    @mcp.tool()
    async def get_workouts(start_time: datetime, end_time: datetime) -> str:
        """Get details about the workouts that the user has done during a period of time.
        Result timestamps will include time zones. Always translate timestamps to the user's local
        time zone when this is known.
    
        Args:
            start_time: The starting time of the period. Must include tz (ISO8601).
            end_time: the ending time of the period. Must include tz (ISO8601).
        """
        fulcra = get_fulcra_object()
        workouts = fulcra.apple_workouts(start_time, end_time)
        return f"Workouts during {start_time} and {end_time}: " + json.dumps(workouts)
Behavior4/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 valuable context beyond the input schema: it specifies that 'Result timestamps will include time zones' and instructs to 'Always translate timestamps to the user's local time zone when this is known.' This clarifies output behavior and user-facing considerations, though it doesn't cover aspects like rate limits, authentication needs, or error handling.

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 well-structured and front-loaded, with the core purpose stated first, followed by behavioral notes and a dedicated 'Args:' section for parameters. Every sentence adds value: the first defines the tool, the second explains timestamp handling, and the parameter descriptions are essential given the schema gaps. There is no 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?

Given the tool's moderate complexity (2 required parameters, no annotations, but with an output schema), the description is largely complete. It covers purpose, behavioral traits (timestamp handling), and parameter semantics. Since an output schema exists, it doesn't need to explain return values. However, it could improve by addressing potential limitations (e.g., data availability) or sibling tool differentiation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides significant semantic value beyond the input schema, which has 0% description coverage. It explicitly defines both parameters ('start_time' and 'end_time'), specifies they 'Must include tz (ISO8601)', and contextualizes them as 'The starting time of the period' and 'the ending time of the period.' This fully compensates for the schema's lack of descriptions, making the parameters clear and actionable.

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 details about the workouts that the user has done during a period of time.' This specifies the verb ('Get details'), resource ('workouts'), and scope ('during a period of time'). However, it doesn't explicitly differentiate from sibling tools like 'get_metric_samples' or 'get_sleep_cycles', which might also retrieve user activity data, so it falls short of 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 Guidelines3/5

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

The description implies usage by specifying 'during a period of time' and providing time-based parameters, suggesting it's for retrieving historical workout data. However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_metric_samples' or 'get_sleep_cycles', and doesn't mention prerequisites or exclusions (e.g., whether the user must have workouts logged).

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/fulcradynamics/fulcra-context-mcp'

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