Skip to main content
Glama

get_activity_weather

Retrieve weather conditions recorded during a Garmin activity, including temperature, humidity, wind speed, and condition description.

Instructions

Get weather conditions during an activity: temperature, humidity, wind, condition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesThe Garmin activity ID

Implementation Reference

  • Registration of the 'get_activity_weather' tool with the MCP server, including description, input schema, and handler function.
    server.registerTool(
      'get_activity_weather',
      {
        description:
          'Get weather conditions during an activity: temperature, humidity, wind, condition',
        inputSchema: getActivitySchema.shape,
      },
      async ({ activityId }) => {
        const data = await client.getActivityWeather(activityId);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Handler function that calls client.getActivityWeather(activityId) and returns the result as JSON text.
    async ({ activityId }) => {
      const data = await client.getActivityWeather(activityId);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • Input schema (Zod) for the tool: requires a positive numeric activityId.
    export const getActivitySchema = z.object({
      activityId: z.number().positive().describe('The Garmin activity ID'),
    });
  • Client method that constructs the request URL using ACTIVITY_ENDPOINT, activityId, and ACTIVITY_WEATHER_SUBPATH, then makes an authenticated API request.
    async getActivityWeather(activityId: number): Promise<unknown> {
      return this.request(`${ACTIVITY_ENDPOINT}/${activityId}/${ACTIVITY_WEATHER_SUBPATH}`);
    }
  • Constant defining the weather subpath for activity-related API endpoints.
    export const ACTIVITY_WEATHER_SUBPATH = 'weather';
Behavior2/5

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

With no annotations, the description carries full burden but only lists return fields. It does not disclose whether the operation is read-only, any authentication requirements, or potential rate limits.

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 a single, front-loaded sentence that efficiently communicates the tool's purpose and return fields. It is concise but could list fields more explicitly.

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?

Despite no output schema, the description adequately enumerates four returned fields (temperature, humidity, wind, condition) for a simple weather query. The tool has low complexity with one parameter.

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?

The single parameter 'activityId' is already described in the schema as 'The Garmin activity ID'. The tool description adds no further meaning or constraints, so it meets the baseline for 100% schema coverage.

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?

The description clearly states the verb 'Get' and the resource 'weather conditions during an activity', listing specific fields (temperature, humidity, wind, condition). It is distinct from sibling tools which cover other aspects of activity data.

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?

No explicit guidance on when or when not to use this tool, nor alternatives. The description only states what it does, leaving the agent to infer usage context.

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/Nicolasvegam/garmin-connect-mcp'

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