Skip to main content
Glama
chrischall

freshbooks-mcp

by chrischall

freshbooks_auth_exchange

Exchange a FreshBooks authorization code for a refresh token using the redirect URL or bare code. Since codes are single-use, obtain a new code if exchange fails.

Instructions

Exchange a FreshBooks authorization code for a refresh token. Accepts the whole redirect URL you landed on, or the bare code. The authorization code is SINGLE-USE — if this fails, get a new one from freshbooks_auth_url rather than retrying.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe ?code= value, or the entire redirect URL you were sent to after approving.
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark the tool as readOnlyHint=false and idempotentHint=false. The description adds a crucial behavioral detail beyond those flags: the code is single-use, so a failed exchange cannot be safely retried and requires a new authorization code. This significantly helps an agent avoid a wasted or erroneous retry.

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 two sentences with zero filler: sentence one states the purpose, sentence two covers accepted input and the critical single-use constraint. The most important warning is placed at the end but is compact and clear.

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?

For a single-parameter OAuth exchange tool, the description covers the action, the input flexibility, the failure mode, and the remedy. No output schema exists, but the outcome is explicitly named (a refresh token), so an agent has enough context to select and invoke the tool 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?

Schema description coverage is 100%; the parameter schema already explains that code is 'The ?code= value, or the entire redirect URL you were sent to after approving.' The tool description repeats this almost verbatim ('Accepts the whole redirect URL you landed on, or the bare code'), so it adds no new semantic value beyond the schema.

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 a FreshBooks authorization code for a refresh token.' It clearly distinguishes this tool from the sibling freshbooks_auth_url by naming it as the source of a new code when the exchange fails, making the tool's role in the OAuth flow obvious.

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 gives explicit failure-handling guidance: the authorization code is SINGLE-USE, so do not retry; instead obtain a new code from freshbooks_auth_url. This tells the agent both when to use this tool and when to switch to the alternative.

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/chrischall/freshbooks-mcp'

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