Skip to main content
Glama

set_activity_name

Rename a Garmin activity by specifying its activity ID and a new name.

Instructions

Rename an activity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesThe Garmin activity ID
nameYesNew name for the activity

Implementation Reference

  • The actual tool handler logic that calls client.setActivityName and formats the JSON response.
    async ({ activityId, name }) => {
      const data = await client.setActivityName(activityId, name);
      return {
        content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
      };
    },
  • The GarminClient method that makes the HTTP PUT request to the Garmin Connect API to rename an activity.
    async setActivityName(activityId: number, name: string): Promise<unknown> {
      return this.request(`${ACTIVITY_ENDPOINT}/${activityId}`, {
        method: 'PUT',
        body: { activityName: name },
      });
    }
  • Registration of the 'set_activity_name' tool via server.registerTool with description and input schema.
    server.registerTool(
      'set_activity_name',
      {
        description: 'Rename an activity',
        inputSchema: setActivityNameSchema.shape,
      },
      async ({ activityId, name }) => {
        const data = await client.setActivityName(activityId, name);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],
        };
      },
    );
  • Zod schema defining the input validation for set_activity_name: activityId (positive number) and name (string).
    export const setActivityNameSchema = z.object({
      activityId: z.number().positive().describe('The Garmin activity ID'),
      name: z.string().describe('New name for the activity'),
  • TypeScript type definition for the setActivityName DTO.
    export type SetActivityNameDto = {
      activityId: number;
      name: string;
    };
Behavior2/5

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

With no annotations provided, the description fails to disclose any behavioral traits beyond the basic renaming action. It does not mention side effects, permission requirements, or what happens to associated data, which is insufficient for a mutation tool.

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 extremely concise (three words) and front-loaded, with no wasted text. However, it is so brief that it may lack necessary context, slightly detracting from its effectiveness.

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?

For a simple rename tool with full schema coverage and no output schema, the description is minimally viable. It states the action but lacks context on constraints or return values, which is acceptable but not thorough.

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?

Input schema has 100% coverage with descriptions for both parameters, so the description adds no additional meaning beyond the schema. Per calibration, baseline 3 applies.

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 'Rename an activity' uses a specific verb (rename) and a clear resource (activity), distinct from sibling tools like delete_activity or get_activity. It is unambiguous.

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 guidance on when to use this tool versus alternatives, such as when to rename vs. delete or update an activity. No context or exclusion criteria are given.

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