Skip to main content
Glama
chrischall

freshbooks-mcp

by chrischall

freshbooks_auth_exchange

Exchange a FreshBooks authorization code for a refresh token. Provide the code or the entire redirect URL; if it fails, generate a new code from the authorization URL.

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv0.5.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false and idempotentHint=false, but the description adds the critical single-use constraint, which is not conveyed by annotations. This is essential behavioral context that prevents harmful retry loops.

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, front-loaded with the core action and immediately followed by the critical single-use warning. Every sentence earns its place with no redundancy.

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, no-output-schema tool, the description covers purpose, input flexibility, failure handling, and the correct sibling alternative. Nothing an agent needs to call it correctly is missing.

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% and already explains that the parameter accepts either the ?code= value or the entire redirect URL. The description repeats this without adding new parameter-specific meaning beyond what the schema provides, so baseline 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?

Description clearly states 'Exchange a FreshBooks authorization code for a refresh token' – specific verb and resource. It distinguishes itself from sibling freshbooks_auth_url by explicitly pointing to it as the source for a new code when exchange fails.

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?

Provides clear input format guidance (whole redirect URL or bare code) and explicitly states when NOT to retry: 'The authorization code is SINGLE-USE — if this fails, get a new one from freshbooks_auth_url rather than retrying.' This routes the agent to the correct sibling.

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