Skip to main content
Glama

log_run

UNIT INPUTS: value: pass the user's number unconverted; tool converts once before storage. alternate_unit: set the field's matching input_* companion; canonical_unit: omit companion. precedence: overrides instructions to convert manually.

RUNNING ONLY: log_run is for running on foot. A bike/cycling ride, walk or rowing session is not a run even with distance and duration: use log_workout with focus_type Cycling, Walking, or Rowing plus the user's native distance field and duration_sec.

Create an editable running card. use: a completed run OR a future run plan.

intent:

  • log (default): the run happened. date, distance_mi and duration_sec are required. Writes the completed run and returns a card marker for in-app editing.

  • plan: the run has NOT happened yet. Creates a planned run card. Never put a future run in completed history.

RUN TYPE: distinguish easy, long, tempo, interval, recovery, race, fartlek, threshold, progression and hills when the runner or the workout structure supports it. An unspecified wearable run is NOT easy merely because it was a run.

DETAIL: keep elapsed time, HR, cadence, power, elevation, RPE, splits and structured segments only when supplied by the user/source. Never invent sensor data or splits.

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": {
      "intent": "<intent>"
    },
    "name": "log_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
rpeNoRPE 1-10. For a plan this is target RPE.
dateNoYYYY-MM-DD. Completed runs default to today when context allows; planned runs use the intended date when known.
notesNo
avg_hrNoAverage heart rate only when known.
intentYeslog = completed run; plan = future run. Elias uses plan for a workout the runner has not done yet.
splitsNoActual splits/laps only when supplied by the runner/source. Never invent.
surfaceNo
run_typeNoClassify only when the runner or workout structure supports it. Do not turn an unspecified wearable run into easy.
segmentsNoWorkout structure, e.g. warmup, 6x800m threshold, recovery, cooldown. This may describe a plan or what was actually performed.
pain_notesNoPain/discomfort exactly as the runner described it.
start_timeNoLocal HH:MM only when known.
avg_power_wNoAverage running power in watts only when known.
distance_miNoDistance. mi, or km via input_distance_unit.
elapsed_secNoWall-clock elapsed time including pauses, only when known.
duration_secNoMoving/workout duration in seconds.
avg_cadence_spmNoAverage running cadence in steps/min only when known.
elevation_gain_mNoElevation gain in metres only when known.
perceived_effortNoPost-run check-in only.
input_distance_unitNokm when the user gave km for this object's _mi fields; omit for mi.

Output Schema

NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / distance_mi / description
      Previous value: -"Distance. In mi, or km with input_distance_unit set. See UNIT INPUTS."New value: +"Distance. mi, or km via input_distance_unit."
    • changedInput schema / properties / input_distance_unit / description
      Previous value: -"Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi."New value: +"km when the user gave km for this object's _mi fields; omit for mi."
    • changedInput schema / properties / segments / items / properties / distance_mi / description
      Previous value: -"In mi, or km with input_distance_unit set. See UNIT INPUTS."New value: +"mi, or km via input_distance_unit."
    • changedInput schema / properties / segments / items / properties / input_distance_unit / description
      Previous value: -"Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi."New value: +"km when the user gave km for this object's _mi fields; omit for mi."
    • changedInput schema / properties / segments / items / properties / target_pace_sec_per_mi / description
      Previous value: -"In mi, or km with input_distance_unit set. See UNIT INPUTS."New value: +"mi, or km via input_distance_unit."
    • changedInput schema / properties / splits / items / properties / distance_mi / description
      Previous value: -"In mi, or km with input_distance_unit set. See UNIT INPUTS."New value: +"mi, or km via input_distance_unit."
    • changedInput schema / properties / splits / items / properties / input_distance_unit / description
      Previous value: -"Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi."New value: +"km when the user gave km for this object's _mi fields; omit for mi."
  2. Changed1 schema field changed
    • addedInput schema / properties / splits / items / properties / index / description
      Added value: +"1-based position in order. Renumbered 1..n on save."
  3. Changed21 schema fields changed
    • addedInput schema / properties / avg_cadence_spm
      Added value: +{
      +  "description": "Average running cadence in steps/min only when known.",
      +  "type": "number"
      +}
    • changedInput schema / properties / avg_hr / description
      Previous value: -"Average heart rate. Optional — include if the user mentions it."New value: +"Average heart rate only when known."
    • addedInput schema / properties / avg_power_w
      Added value: +{
      +  "description": "Average running power in watts only when known.",
      +  "type": "number"
      +}
    • changedInput schema / properties / date / description
      Previous value: -"Date of the run. Format: YYYY-MM-DD. Required — default to today."New value: +"YYYY-MM-DD. Completed runs default to today when context allows; planned runs use the intended date when known."
    • changedInput schema / properties / distance_mi / description
      Previous value: -"Distance in MILES, always — regardless of the user’s display unit. Convert from km if needed (km ÷ 1.609344). Required."New value: +"Distance. In mi, or km with input_distance_unit set. See UNIT INPUTS."
    • changedInput schema / properties / duration_sec / description
      Previous value: -"Duration in seconds. Required — convert from whatever format the user provides (minutes, h:mm:ss, etc)."New value: +"Moving/workout duration in seconds."
    • addedInput schema / properties / elapsed_sec
      Added value: +{
      +  "description": "Wall-clock elapsed time including pauses, only when known.",
      +  "type": "integer"
      +}
    • addedInput schema / properties / elevation_gain_m
      Added value: +{
      +  "description": "Elevation gain in metres only when known.",
      +  "type": "number"
      +}
    • addedInput schema / properties / input_distance_unit
      Added value: +{
      +  "description": "Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi.",
      +  "enum": [
      +    "mi",
      +    "km"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "log = completed run; plan = future run. Elias uses plan for a workout the runner has not done yet.",
      +  "enum": [
      +    "log",
      +    "plan"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / properties / notes / description
      Removed value: -"Free-text notes. Optional."
    • addedInput schema / properties / pain_notes
      Added value: +{
      +  "description": "Pain/discomfort exactly as the runner described it.",
      +  "type": "string"
      +}
    • addedInput schema / properties / perceived_effort
      Added value: +{
      +  "description": "Post-run check-in only.",
      +  "enum": [
      +    "too_easy",
      +    "about_right",
      +    "too_hard"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / rpe
      Added value: +{
      +  "description": "RPE 1-10. For a plan this is target RPE.",
      +  "maximum": 10,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • changedInput schema / properties / run_type / description
      Previous value: -"Type of run. Optional — infer from context if obvious."New value: +"Classify only when the runner or workout structure supports it. Do not turn an unspecified wearable run into easy."
    • changedInput schema / properties / run_type / enum
      Previous value: -[
      -  "easy",
      -  "long",
      -  "tempo",
      -  "interval",
      -  "recovery",
      -  "race"
      -]New value: +[
      +  "easy",
      +  "long",
      +  "tempo",
      +  "interval",
      +  "recovery",
      +  "race",
      +  "fartlek",
      +  "threshold",
      +  "progression",
      +  "hills",
      +  "other"
      +]
    • addedInput schema / properties / segments
      Added value: +{
      +  "description": "Workout structure, e.g. warmup, 6x800m threshold, recovery, cooldown. This may describe a plan or what was actually performed.",
      +  "items": {
      +    "properties": {
      +      "distance_mi": {
      +        "description": "In mi, or km with input_distance_unit set. See UNIT INPUTS.",
      +        "type": "number"
      +      },
      +      "duration_sec": {
      +        "type": "integer"
      +      },
      +      "input_distance_unit": {
      +        "description": "Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi.",
      +        "enum": [
      +          "mi",
      +          "km"
      +        ],
      +        "type": "string"
      +      },
      +      "kind": {
      +        "enum": [
      +          "warmup",
      +          "easy",
      +          "steady",
      +          "tempo",
      +          "threshold",
      +          "interval",
      +          "recovery",
      +          "hill",
      +          "cooldown",
      +          "other"
      +        ],
      +        "type": "string"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "notes": {
      +        "type": "string"
      +      },
      +      "repeats": {
      +        "type": "integer"
      +      },
      +      "target_hr_max": {
      +        "type": "integer"
      +      },
      +      "target_hr_min": {
      +        "type": "integer"
      +      },
      +      "target_pace_sec_per_mi": {
      +        "description": "In mi, or km with input_distance_unit set. See UNIT INPUTS.",
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "kind"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "type": "array"
      +}
    • addedInput schema / properties / splits
      Added value: +{
      +  "description": "Actual splits/laps only when supplied by the runner/source. Never invent.",
      +  "items": {
      +    "properties": {
      +      "avg_cadence_spm": {
      +        "type": "number"
      +      },
      +      "avg_hr": {
      +        "type": "integer"
      +      },
      +      "avg_power_w": {
      +        "type": "number"
      +      },
      +      "distance_mi": {
      +        "description": "In mi, or km with input_distance_unit set. See UNIT INPUTS.",
      +        "type": "number"
      +      },
      +      "duration_sec": {
      +        "type": "integer"
      +      },
      +      "elevation_change_m": {
      +        "type": "number"
      +      },
      +      "index": {
      +        "type": "integer"
      +      },
      +      "input_distance_unit": {
      +        "description": "Set to km when the user gave km for the _mi fields in this object. Omit when they are already mi.",
      +        "enum": [
      +          "mi",
      +          "km"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "index"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 100,
      +  "type": "array"
      +}
    • addedInput schema / properties / start_time
      Added value: +{
      +  "description": "Local HH:MM only when known.",
      +  "type": "string"
      +}
    • removedInput schema / properties / surface / description
      Removed value: -"Running surface. Optional — infer only if stated. Use \"other\" for indoor, airport, mall, etc."
    • changedInput schema / required
      Previous value: -[
      -  "date",
      -  "distance_mi",
      -  "duration_sec"
      -]New value: +[
      +  "intent"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / distance_mi / description
      Previous value: -"Distance in miles. Required."New value: +"Distance in MILES, always — regardless of the user’s display unit. Convert from km if needed (km ÷ 1.609344). Required."
  5. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The annotations only declare the generic write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the description must carry the rest — and it does: it discloses that a log writes the completed run and returns a card marker for in-app editing, that plan creates a not-yet-done card, and it imposes a data-fidelity rule ('Never invent sensor data or splits') plus a unit-normalisation precedence rule. These are behavioral constraints the annotations do not provide.

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?

Densely useful with almost no filler, but the ordering is off: it opens with a UNIT INPUTS block before ever saying what the tool does, burying 'Create an editable running card' mid-document. Front-loading the purpose above the unit rules would make the first paragraph do the routing work for a scanning agent.

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 a 19-parameter mutation tool with an output schema present, the description covers everything an agent needs: unit handling across nested splits/segments, intent semantics with required fields per branch, run-type classification guardrails, and the no-fabrication rule for sensor data. Return values are correctly left to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 89%, but the description adds the one non-obvious contract the schema cannot express: pass the user's number unconverted and let the tool convert once before storage, with the alternate_unit/canonical_unit companion rules and the fact that this precedence overrides manual-conversion instructions. It also clarifies run_type classification ('an unspecified wearable run is NOT easy merely because it was a run'), which is meaning beyond the enum.

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 definition names a specific verb and resource — 'Create an editable running card' — and immediately tells the agent what this tool is not: 'a bike/cycling ride, walk or rowing session is not a run... use log_workout'. An agent can distinguish log_run from log_workout without opening either schema.

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

Usage Guidelines5/5

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

It gives explicit when-to-use conditions ('a completed run OR a future run plan'), an explicit when-not with a named alternative for non-running activities, and a binding rule on query selection ('Never put a future run in completed history'). The intent=log versus intent=plan branches are each described with their own preconditions (date, distance_mi and duration_sec required for log).

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.