Skip to main content
Glama

Exchange Oura OAuth Code

oura_exchange_code

Exchange an Oura OAuth authorization code for locally stored tokens. Requires user to complete OAuth in browser and supply the authorization code.

Instructions

Exchange an Oura 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?

Annotations indicate a mutation (readOnlyHint=false), and the description adds that tokens are stored locally with 0600 permissions and never returned, which goes beyond the structured data. However, it does not disclose error handling or failure modes.

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?

Two sentences no fluff. First sentence states the core action, second provides essential behavioral and usage context. Every word earns its place.

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?

Given the tool's simplicity and the presence of an output schema, the description covers the main behavioral aspects. It could mention idempotency or one-time use, but it is largely complete for typical usage.

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 coverage is 50% with only the 'code' parameter described. The description does not elaborate on parameters beyond the schema, but the 'code' parameter is clearly implied in the tool's purpose. The 'response_format' enum is simple and self-explanatory.

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 'Exchange an Oura OAuth authorization code for local tokens,' which is a specific verb+resource. It clearly distinguishes this tool from siblings like oura_get_auth_url and oura_revoke_access by focusing on the token exchange step.

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?

The description explicitly states when to use the tool: after the user completes browser OAuth and provides the code. It also warns against inventing codes, providing clear usage boundaries.

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

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