Skip to main content
Glama

Exchange Strava OAuth Code

strava_exchange_code

Exchange a Strava OAuth authorization code for tokens stored locally with secure permissions. Requires a user-supplied code from browser OAuth; never returns tokens to agents.

Instructions

Exchange a Strava OAuth authorization code for local tokens. Tokens are stored locally with 0600 permissions and are never returned. Requires explicit user action: the user must complete browser OAuth and supply the authorization code (agents must not invent codes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesOAuth authorization code, or a full redirect URL containing ?code=...
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
noteYes
scopeNo
expires_atNo
token_pathYes
Behavior4/5

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

The description goes beyond the annotations by disclosing critical behavioral details: 'Tokens are stored locally with 0600 permissions and are never returned.' It also warns agents not to invent codes, a crucial safety constraint. Annotations are minimal (readOnlyHint false, openWorldHint true), providing little on their own; the description shoulders the transparency burden effectively.

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

Conciseness5/5

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

The description is three sentences, each earning its place: first states the core function, second reveals token storage and permission details, third imposes a critical user-action requirement. No fluff, front-loaded with purpose. Ideal conciseness for the complexity.

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?

The description covers the essential context: prerequisites (user must complete OAuth), security behavior (local storage, 0600 permissions), and an output hint (tokens never returned). It does not explicitly describe failure modes or exact return format, but the output schema likely covers that. Given the tool's mutating nature and the minimal annotations, the description provides a solid but not exhaustive picture.

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

Parameters3/5

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

The schema provides decent parameter documentation: 'code' has a description including the full redirect URL option, and 'response_format' has enum values and a default. The description only reinforces the 'code' parameter by mentioning 'supply the authorization code.' It does not elaborate on 'response_format,' but the enum is self-explanatory. With 50% schema coverage, the description adds minimal semantic value, hence the baseline score.

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 description clearly states the tool's function: 'Exchange a Strava OAuth authorization code for local tokens.' This is a specific verb+resource pair, and it distinguishes the tool from siblings like strava_get_auth_url (which generates the auth URL) and strava_revoke_access (which revokes tokens). The purpose is unambiguous.

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?

The description provides strong usage guidance: 'Requires explicit user action: the user must complete browser OAuth and supply the authorization code (agents must not invent codes).' This tells when to use the tool (after user OAuth completion) and when not to (never fabricate codes). It does not explicitly name alternative tools, but the context makes the workflow clear. Misses the explicit sibling mention, so not a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/davidmosiah/strava-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server