Skip to main content
Glama

Query the Strava Mirror (SQL)

strava_query
Read-onlyIdempotent

Run a read-only DuckDB SQL query against the athlete's stored Strava data (possibly incomplete; check sync status). Enforced read-only transaction, 30 seconds, 5000 rows maximum; no file/network access.

Instructions

Run a read-only DuckDB SQL query against the athlete's stored Strava data (possibly incomplete; check sync status). Enforced read-only transaction, 30 seconds, 5000 rows maximum; no file/network access. Use strava_schema first to see the tables. Main tables: activity, activity_stream_point (per-point streams: time, distance, lat, lng, altitude, heartrate, cadence, watts, temp, velocity_smooth, grade_smooth), activity_lap, activity_split, activity_best_effort, activity_segment_effort, segment, activity_zone_bucket, gear, route, athlete_stats. Units: meters, seconds, m/s. raw_current holds every payload as JSON (column body) for fields not in a typed table. Costs no Strava API calls.

Input Schema

NameRequiredDescriptionDefault
sqlYesOne DuckDB SELECT statement (DESCRIBE, SUMMARIZE and EXPLAIN also work).
max_rowsNoMaximum rows to return (default 200).

Output Schema

NameRequiredDescriptionDefault
noteNo
rowsYes
columnsYes
row_countYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.4.1

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent and closed-world, yet the description still adds real behavioral facts: enforced read-only transaction, 30-second timeout, 5000-row cap, no file/network access, and that the mirror may be incomplete. Minor gap: it doesn't say what happens on timeout or cap breach (error vs truncation).

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 action and the constraints, then the catalog. Zero filler, but the table-plus-column enumeration makes the middle sentence dense; it earns its place for query authoring yet is heavier than ideal prose.

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 free-form SQL tool with an output schema already present, this covers everything an agent needs: limits, safety profile, units, table map, the raw JSON escape hatch, and the prerequisite tool. Return format 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 coverage is 100% so baseline is 3, but the description meaningfully adds to the `sql` parameter's semantics by enumerating the queryable tables, the stream point columns, the meter/second/m-s units, and the raw_current JSON fallback for untyped fields. That is exactly the information needed to author a valid query.

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?

States a specific verb and resource — run a read-only DuckDB SQL query against the athlete's stored Strava data — which is immediately distinguishable from the typed getter siblings like strava_get_activity. It also names the prerequisite discovery tool (strava_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?

'Use strava_schema first to see the tables' gives an explicit ordering constraint, and 'check sync status' routes the agent to strava_sync_status for completeness questions. It also notes it costs no Strava API calls, which lets the agent choose this over API-backed siblings for bulk exploration.

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