Skip to main content
Glama

delete_activity

Permanently delete a Garmin activity by providing its activity ID. This action cannot be undone.

Instructions

Delete an activity permanently. This action cannot be undone

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activityIdYesThe Garmin activity ID to delete

Implementation Reference

  • The tool handler for 'delete_activity' - registers the tool with the MCP server, extracts activityId from input, calls client.deleteActivity(), and returns the result.
    server.registerTool(
      'delete_activity',
      {
        description: 'Delete an activity permanently. This action cannot be undone',
        inputSchema: deleteActivitySchema.shape,
      },
      async ({ activityId }) => {
        const data = await client.deleteActivity(activityId);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data ?? 'Activity deleted', null, 2) }],
        };
      },
    );
  • The input schema and type definition for delete_activity - validates that activityId is a positive number.
    export type DeleteActivityDto = {
      activityId: number;
    };
    
    export const deleteActivitySchema = z.object({
      activityId: z.number().positive().describe('The Garmin activity ID to delete'),
    });
  • The underlying GarminClient method that sends an HTTP DELETE request to the activity endpoint with the given activityId.
    async deleteActivity(activityId: number): Promise<unknown> {
      return this.request(`${ACTIVITY_ENDPOINT}/${activityId}`, {
        method: 'DELETE',
      });
    }
  • The registration of 'delete_activity' via server.registerTool, which is called from registerWriteTools().
    server.registerTool(
      'delete_activity',
      {
        description: 'Delete an activity permanently. This action cannot be undone',
        inputSchema: deleteActivitySchema.shape,
      },
      async ({ activityId }) => {
        const data = await client.deleteActivity(activityId);
        return {
          content: [{ type: 'text' as const, text: JSON.stringify(data ?? 'Activity deleted', null, 2) }],
        };
      },
    );
Behavior4/5

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

With no annotations provided, the description carries the burden of transparency. It explicitly states the action is permanent and cannot be undone, which clearly communicates the destructive nature of the tool.

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 extremely concise—one sentence plus a warning. It is front-loaded with the action and contains no unnecessary words.

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?

For a simple delete operation without an output schema, the description adequately explains the action and its irreversibility. It could mention return behavior, but it is functionally complete.

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 input schema has 100% coverage for the single parameter 'activityId', including a description. The tool description does not add extra semantic meaning beyond the schema, so baseline score of 3 is appropriate.

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 tool deletes an activity permanently, which is a specific verb and resource. Among siblings, which are mostly get/set/add/remove, this is the only delete tool, so it is well-distinguished.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

The description implies that this tool is used when you want to irreversibly delete an activity. It does not explicitly state when not to use it or provide alternatives, but the warning 'cannot be undone' adds 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