Skip to main content
Glama

Update activities (batch)

batch_update_activities
DestructiveIdempotent

Update up to 100 activities in a single call. Each entry must include its id. STRENGTH: write lifting, circuits and Hyrox as exercises, never as steps: items {type 'exercise', exercise, sets: one entry per set with reps and weightKg in kg, so 3x8 is three entries} and {type 'cardio', sport ('run', 'bike', 'skierg' or 'row'), distanceM or durationSec} for the runs and ergs between stations. Set sportType 'strength'. YOGA, pilates and mobility routines with named moves are exercises too, with sportType 'yoga': one exercise item per move, its sets time only (durationSec: cat-cow 2 min is one set of 120, 2x30s is two sets of 30, 1 min each side is two sets of 60), a move done on each side one set per side with 'each side' in notes, no reps or weight. Only exercises or moves the athlete named, never invented ones: "Strength 45 min" or "30 min yoga" is the duration with no exercises. Keep duration when there are exercises. An activity has exercises or steps, never both. On a planned activity exercises is the plan; on a completed one, what was done. When the athlete tells you what they did in a planned session ("I did 3x8 at 62.5", "log today's session"), call complete_activity with its plannedActivityId instead: updating the planned activity overwrites the plan.

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": {
      "activities": "<activities>"
    },
    "name": "batch_update_activities"
  }
}

Input Schema

NameRequiredDescriptionDefault
activitiesYes

Output Schema

NameRequiredDescriptionDefault
updatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / activities / items / properties / sportType / enum
      Previous value: -[
      -  "run",
      -  "bike",
      -  "swim",
      -  "hike",
      -  "yoga",
      -  "tennis",
      -  "golf",
      -  "soccer",
      -  "skiing",
      -  "nordicski",
      -  "skierg",
      -  "row",
      -  "kayak",
      -  "strength",
      -  "surf",
      -  "other"
      -]New value: +[
      +  "run",
      +  "bike",
      +  "swim",
      +  "hike",
      +  "yoga",
      +  "tennis",
      +  "golf",
      +  "soccer",
      +  "skiing",
      +  "nordicski",
      +  "skierg",
      +  "row",
      +  "kayak",
      +  "climb",
      +  "strength",
      +  "surf",
      +  "other"
      +]
  2. Changed2 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the concrete consequence the annotations cannot convey: editing a planned activity overwrites the existing plan, and existing duration/exercises are semantically replaced. It also states the exercises-XOR-steps invariant and the 100-item cap. Return behavior is left to the output schema, which is fine.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening constraint is front-loaded, but the body is a dense wall of ALL-CAPS emphasis and nested parentheticals that is hard to scan. It also duplicates material already present verbatim in the exercises schema description (rounds written out item by item, yoga sets, 'each side' notes), which is redundant given both are visible to the agent.

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 100-item batch mutation with a deep nested schema and an output schema, the description covers the ambiguities that matter most: exercise vs step modeling, planned vs completed semantics, set expansion, and the alternative tool for logging done sessions. Fine-grained unit and enum rules are appropriately delegated to the schema.

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?

Top-level parameters carry no schema descriptions (coverage 0%), yet the description compensates well for the hardest field: it says each entry needs an id, that a 3x8 set is three separate set entries, that lifts/circuits/Hyrox go under 'exercises' with sportType 'strength', that runs and ergs between stations are 'cardio' items with sport or distanceM/durationSec, and that yoga moves are timed sets (2 min = one set of 120). It does not cover load, startTime, or title, which the schema itself documents in depth.

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 first sentence gives a specific verb, resource and scope: 'Update up to 100 activities in a single call' plus the hard requirement that each entry carry its id. It distinguishes itself from complete_activity explicitly, but never contrasts with the singular update_activity or with batch_create_activities, so the batch-vs-single boundary is left implicit.

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?

Strong routing rule: when the athlete reports what they did in a planned session, call complete_activity with its plannedActivityId instead, with the reason given ('updating the planned activity overwrites the plan'). It also separates planned vs completed semantics for the exercises field. Missing only a rule for choosing this over the singular update_activity for a one-item edit.

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