Skip to main content
Glama

nexus_oauth_exchange

Complete the OAuth2 flow by exchanging the authorization code for tokens via PKCE, saving them for automatic refresh and validating your identity.

Instructions

Complete the OAuth2 flow: exchange the authorization code for tokens.

Exchanges via PKCE code_verifier (+ client_secret when configured), saves tokens to the token file, and validates the identity with the resulting Bearer token. Tokens auto-refresh; any 4xx refresh response is treated as revocation per the official guide.

Returns: JSON account summary from nexus_validate_key, or an error string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe 'code' query parameter from the OAuth redirect after nexus_oauth_login.
stateNoOptional 'state' value from the redirect URL; verified against the pending login when provided.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

The description discloses meaningful side effects: tokens are saved to a token file, identity is validated with the resulting Bearer token, tokens auto-refresh, and 4xx refresh responses are treated as revocation. This goes well beyond the annotations and gives the agent a realistic model of the tool's behavior.

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 concise and well-structured: a clear purpose statement, a compact description of mechanics, a note on refresh behavior, and a return summary. Every sentence contributes useful information without redundancy or padding.

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?

The description covers the full invocation context: what it exchanges, how it authenticates, where tokens are stored, how refresh failures behave, and what it returns. Combined with full schema coverage and the output schema, nothing essential is missing for an agent to call it correctly.

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 input schema already covers both parameters fully: code and state are described with origin and verification behavior. The tool description adds process context around PKCE and client_secret but does not materially enhance parameter-level understanding, so the high-coverage baseline of 3 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 verb and resource: 'exchange the authorization code for tokens,' clearly identifying this as the OAuth token exchange step. It also clarifies the tool completes the OAuth2 flow and validates identity, which distinguishes it from related OAuth siblings like login, refresh, status, and logout.

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 clearly signals this is the post-redirect step by mentioning the authorization code and PKCE exchange, and the schema explicitly references the 'OAuth redirect after nexus_oauth_login.' It does not explicitly name alternative tools or state when not to use it, but the intended usage context is unmistakable.

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/Talya1412/nexus-mcp'

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