Skip to main content
Glama

Exchange WHOOP OAuth Code

whoop_exchange_code

Exchange a WHOOP OAuth authorization code for locally stored tokens. Tokens are saved with restricted permissions and are never returned to the caller.

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=...
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 adds valuable behavioral context beyond annotations: tokens are stored locally with 0600 permissions, are never returned, and require explicit user intent. It does not contradict the annotations (readOnlyHint=false, etc.) and clarifies side effects. Minor gap: it doesn't mention failure handling or overwrite behavior, but this is sufficient given the annotations.

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?

Three concise sentences: purpose, second describes storage/return behavior, third states gating. Every sentence carries essential information, no redundancy, front-loaded with the verb and resource.

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 core side effect (token storage with permissions), the output constraint (never returns tokens), and the critical gating requirement. The output schema covers return values, so no need to describe them. It doesn't explicitly connect to the broader OAuth flow (e.g., after get_auth_url), but the tool is simple enough that the description suffices.

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

Parameters2/5

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

Schema description coverage is 50%, and the description does not compensate. It restates the 'code' concept but provides no additional detail about the 'response_format' parameter or how the code parameter should be used beyond the schema. The behavioral note that tokens are never returned implicitly clarifies the expected output, but this is not parameter-specific.

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 action: 'Exchange a WHOOP OAuth authorization code for local tokens.' It identifies the specific resource (OAuth authorization code) and the outcome (local tokens), distinguishing it from sibling tools like whoop_get_auth_url which generates the auth URL.

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 an explicit when-not condition: 'agents must not call this autonomously' and a prerequisite: 'requires explicit user intent.' It does not explicitly mention alternatives, but the OAuth flow context is clear. This is strong guidance, but lacks a direct reference to preceding tools like whoop_get_auth_url.

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

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