Skip to main content
Glama

Exchange WHOOP OAuth Code

whoop_exchange_code

Exchange a WHOOP OAuth authorization code for tokens stored locally with 0600 permissions. Tokens are never returned, and explicit user intent is required.

Instructions

Exchange a WHOOP OAuth authorization code for local tokens. Tokens are stored locally with 0600 permissions and are never returned by this tool. Gated: requires explicit user intent — agents must not call this autonomously.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesOAuth authorization code, or a full redirect URL containing ?code=...
stateNoOptional OAuth state from the redirect URL. Recommended for PKCE verification.
response_formatNomarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
noteYes
scopeNo
expires_atNo
token_pathYes
Install Server

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already indicate this is not read-only and not idempotent, but the description adds valuable behavioral details: tokens are stored locally with 0600 permissions and are never returned by the tool. This goes beyond the annotations and meaningfully informs an agent about side effects and safety.

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?

The description is short, front-loaded with the core purpose, and every sentence earns its place: the exchange action, local storage behavior, and the gating requirement. It does not waste words, though the gating instruction could be integrated more tightly with the rest of the usage guidance.

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?

With an output schema present, the description does not need to explain return values. It covers the essential operational facts: local token storage, permissions, non-return behavior, and the consent requirement. The only minor gap is guidance on what the agent should do after a successful exchange, but that is not necessary for correct invocation.

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?

Schema description coverage is 67%, and the schema already documents the key parameters: code accepts either an authorization code or a full redirect URL, state is recommended for PKCE verification, and response_format has an enum with a default. The description adds no parameter-specific guidance, but the schema carries sufficient meaning, so a baseline score is appropriate.

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 states a specific action—exchanging a WHOOP OAuth authorization code for local tokens—with a clear resource and outcome. This is distinct from siblings like whoop_get_auth_url, whoop_connection_status, and whoop_revoke_access, so an agent can identify what this tool does without ambiguity.

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 gives clear context for when the tool should be used: as part of an OAuth exchange flow, and only with explicit user intent. It explicitly prohibits autonomous calls, which provides strong usage guidance, though it does not directly name alternative tools or state when not to use it.

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

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/whoop-mcp'

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