Skip to main content
Glama

Edit an activity

update_activity
DestructiveIdempotent

Correct an activity by id (from get_activities or log_activity). One logged by hand or by you: any field (type, name, date, start time, distance, duration, heart rate, calories, elevation, notes); pace is recalculated. One that came from the watch or an imported file: only name and notes (e.g. how it felt), its numbers are the device's. Only the fields given change; null clears name, notes, distance, heart rate, calories or elevation. intensity and muscles (main and secondary, for muscle recovery) can be set on any activity. Calories Heza estimated are worked out again when the type, duration, distance or intensity changes; giving calories replaces the estimate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "activity_id": "<activity_id>"
    },
    "name": "update_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
rpeNoAlternative to intensity: RPE 1-10
dateNoMove it to this date (YYYY-MM-DD)
nameNo
notesNoHow it felt, what happened
avg_hrNo
max_hrNo
musclesNoMain muscles worked (Heza names or arms / core / legs / back); null clears
caloriesNo
durationNoAlternative to duration_min: 'mm:ss' or 'h:mm:ss'
intensityNoeasy, moderate or hard
start_timeNoHH:MM local or ISO datetime
activity_idYesHeza activity id (UUID)
distance_kmNo
duration_minNo
activity_typeNorunning, trail_running, treadmill_running, cycling, indoor_cycling, walking, hiking, swimming, rowing, elliptical, other
elevation_gain_mNo
estimate_caloriesNotrue: an activity logged by hand without calories gets Heza's estimate now (e.g. sessions logged before estimates existed)
muscles_secondaryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / estimate_calories
      Added value: +{
      +  "description": "true: an activity logged by hand without calories gets Heza's estimate now (e.g. sessions logged before estimates existed)",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / intensity
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "easy",
      +        "moderate",
      +        "hard"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "easy, moderate or hard"
      +}
    • addedInput schema / properties / muscles
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "maxLength": 30,
      +        "type": "string"
      +      },
      +      "maxItems": 17,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Main muscles worked (Heza names or arms / core / legs / back); null clears"
      +}
    • addedInput schema / properties / muscles_secondary
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "maxLength": 30,
      +        "type": "string"
      +      },
      +      "maxItems": 17,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedInput schema / properties / rpe
      Added value: +{
      +  "description": "Alternative to intensity: RPE 1-10",
      +  "maximum": 10,
      +  "minimum": 1,
      +  "type": "number"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations: annotations say destructiveHint=true, and the description explains exactly what is destroyed (null clears name, notes, distance, heart rate, calories, elevation), that only supplied fields change, and that pace is recalculated. It also discloses derived-value behavior (Heza's calorie estimate is recomputed on type/duration/distance/intensity changes, and supplying calories overrides the estimate), which an agent could not infer from the schema or hints.

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?

Front-loaded with the core action and id source, then organized by provenance case in a logical order; nearly every clause carries operational information. The semicolon-heavy packing makes it dense to parse, and small illustrative asides ("e.g. how it felt") are expendable.

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

Completeness5/5

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

For an 18-parameter destructive mutation with no output schema, the description covers the risky parts an agent must know: what is overwritten vs. cleared, source-dependent editability, and side effects on derived values. Remaining unknowns (response shape, invalid-id behavior) are secondary to calling it correctly.

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?

With 18 parameters and only 56% schema description coverage, the description carries real weight: it names the editable field groups, states null-clearing semantics, explains that intensity and muscles apply to any activity, and clarifies the calories-vs-estimate relationship. Gaps remain for estimate_calories and rpe (both handled only in the schema) and for the avg_hr/max_hr pair as distinct fields.

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?

"Correct an activity by id" is a specific verb+resource, and the description immediately splits behavior by provenance (logged by hand/agent vs. from the watch or an imported file), which no sibling tool covers. An agent can distinguish this from log_activity and get_activities without opening the schema.

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?

It names where ids come from (get_activities or log_activity) and gives explicit field-level rules for each provenance case, which is effectively when-you-may-use-which-field guidance. It never states the negative case (e.g. use log_activity to create a new activity rather than this), so it stops short of a full when/when-not statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources