Skip to main content
Glama

Analyze activity or route

analyze_activity

Analyze supplied GPX/FIT directly with the browser's canonical pipeline; no catalog search or runner profile is needed. Accept inline course_file, URL, or artifact source. Existing CRSProf is preserved and summarized. Returns job plus a bounded structured summary, units, missing-data warnings and complete CRSProf artifact. Defaults: moving threshold 0.25 m/s, minimum stop 30 s, merge distance 60 m with combined-speed guard. Detected stop elapsed may include short moving portions; it is not total non-moving time. No timestamp means no invented pace/time. Hosted clients without file-byte access or direct upload connectivity should send the user to the fixed page https://courseprofiler.com/agent-upload.html. The page creates the private upload session; the user copies the returned artifact ID into chat. MCP does not create a session-specific browser link. Inspect job.status/errors; this call currently runs analysis synchronously. Optional idempotency {key, caller_token} requires the server feature enabled; API keys are optional. Persist the private caller/key before submission, use get_activity_submission to reconcile, and never switch to a fresh key to bypass an unresolved outcome.

Input Schema

NameRequiredDescriptionDefault
sourceNo
optionsNo
course_fileNoInline GPX/FIT content or base64; use an artifact from agent-upload.html if the client cannot read bytes.
idempotencyNo

Output Schema

NameRequiredDescriptionDefault
jobYes
errorNo
summaryYes
submissionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / idempotency
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "caller_token": {
      +      "description": "Anonymous callers: private stable 32-byte cryptographic random token, unpadded base64url. Preserve before submitting; never expose in URLs/logs. Omit for API-key identity.",
      +      "pattern": "^[A-Za-z0-9_-]{43}$",
      +      "type": "string",
      +      "writeOnly": true
      +    },
      +    "key": {
      +      "description": "Stable per-submission random key. Same caller/key/input replays; changed input conflicts. Never reuse expired keys.",
      +      "pattern": "^[A-Za-z0-9._:-]{16,128}$",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "key"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / error
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "properties": {
      +        "code": {
      +          "description": "Machine-readable warning/error code.",
      +          "type": "string"
      +        },
      +        "message": {
      +          "description": "Human-readable warning/error message.",
      +          "type": "string"
      +        },
      +        "severity": {
      +          "description": "Problem severity, usually warning or error.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "code",
      +        "message"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
    • addedOutput schema / properties / job / properties / submission_request_id
      Added value: +{
      +  "description": "Request ID that originally allocated this job; absent in legacy metadata.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / submission
      Added value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / properties / job / properties / result_artifacts / items / properties / download_url / description
      Previous value: -"Private short-lived download URL. Share only with the user."New value: +"Artifact download URLs are private and short-lived; share them only with the user, verbatim in a code block, not a clickable link. Ask the user to copy the entire URL into their browser address bar. Do not rewrite the URL or add tracking parameters such as utm_source: changes invalidate the signature. If expired, call get_artifact for a fresh URL. This applies only to artifact download_url values, not authorization or upload links."
  3. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that existing CRSProf is preserved and summarized, that the call runs synchronously, that missing timestamps mean no invented pace/time, that the detected-stop figure may include short moving portions, and that idempotency requires a server feature flag with optional API keys. It also warns to persist the caller key before submission and not to switch keys to bypass an unresolved outcome. The qualified idempotency support does not conflict with idempotentHint=false since it is explicitly feature-gated.

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 purpose and the no-prerequisites condition, then dense but mostly load-bearing detail on defaults, caveats, the upload fallback, and idempotency. The idempotency guidance is three consecutive sentences of process instruction that could be tightened, but no sentence is clearly filler.

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 complex, nested, zero-required-param tool with an output schema, the description covers preconditions, fallback flows, safety-relevant caveats, and idempotency recovery, so an agent can call it and handle failures without extra discovery. Return-value detail is 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.

Parameters4/5

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

Schema description coverage is low (25%), so the description must compensate, and it does: it names the accepted source forms (inline course_file, URL, artifact), restates the default thresholds with the combined-speed guard on merge distance, and adds non-obvious semantics such as the stop-elapsed caveat. The default-algorithm behavior it cites partly duplicates the enum description, keeping it short of a 5.

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?

States a specific verb and resource: analyze supplied GPX/FIT through the canonical browser pipeline, with inline course_file, URL, or artifact accepted. It implicitly differentiates from siblings by stating no catalog search (search_race_catalog) or runner profile (build_runner_profile_from_strava) is needed, but it never names an alternative tool, so sibling routing is only partly resolved.

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?

Gives clear conditional routing: hosted clients without file-byte access or upload connectivity should send the user to the fixed agent-upload.html page and paste the returned artifact ID. It also explains the idempotency-key workflow and reconciliation via get_activity_submission. It stops short of explicit when-not-to-use-this-tool-vs-import_course/submit_course/validate_course_profile guidance.

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