Skip to main content
Glama

Get activity

get_activity
Read-onlyIdempotent

Fetch a single Shape activity by id. If this is a completed workout with plannedActivityId set, that id is the plan — fetch it for the planned description and steps; they are not copied onto the completed row. The recorded route is left out unless you ask for it, and get_activity_details is the better way to get it: it serves GPS as lat/lng channels at a resolution you pick, where map is an opaque encoded polyline only a map renderer can use.

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": {
      "id": "<id>"
    },
    "name": "get_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
includeMapNoInclude `map`, the activity's route as an encoded polyline (Google's algorithm, up to 500 points). Off by default: it is unreadable without decoding and can outweigh every other field in the response. Turn it on only to draw the route on a map.

Output Schema

NameRequiredDescriptionDefault
activityYesRecorded fields (calories, elapsedTime, maxima, cadence, running dynamics, extras...) are left out when the source reported none: never estimated, never zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, and the description adds real domain behavior: planned fields are not copied onto the completed row and the route is omitted by default. The only gap is that it does not characterize the response shape beyond the route omission, though the output schema covers that.

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, then the two edge cases in priority order. The map sentence is long and partly repeats the includeMap schema description, but each clause still carries useful decision information.

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?

Given an output schema and full safety annotations, the description covers the non-obvious traps an agent would otherwise hit: the missing plan fields and the absent route. Nothing needed to call it correctly is missing.

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 50% schema coverage, the description must partly compensate; 'by id' clarifies the required identifier is an activity id, and the includeMap guidance frames its cost/use case beyond the schema's wording. It stops short of specifying id format or where ids come from.

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?

Opens with a specific verb and resource: 'Fetch a single Shape activity by id.' It also implicitly separates itself from list tools by specifying 'a single' activity, and names the sibling it is not (get_activity_details) for route retrieval.

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?

Gives explicit alternative routing: use get_activity_details for GPS data, and only set includeMap when drawing a route on a map. It also gives a concrete when-to-use condition for a follow-up call: when a completed workout has plannedActivityId set, fetch that plan for description and steps.

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