Skip to main content
Glama
chrischall

freshbooks-mcp

by chrischall

freshbooks_auth_exchange

Destructive

Complete FreshBooks OAuth by exchanging the full redirect URL for tokens; state must match a consent URL, and the code is single-use.

Instructions

Complete FreshBooks authorization. Local sessions save the credentials privately and return only status; hosted sessions return the refresh token to the host's credential-capture flow. Pass the whole redirect URL: its state must match a consent URL freshbooks_auth_url issued, so a bare code is refused. The code is SINGLE-USE — if this fails, authorize again rather than retrying it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe entire redirect URL you were sent to after approving, including its state parameter. A bare ?code= value is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.2
    • changedInput schema / properties / code / description
      Previous value: -"The ?code= value, or the entire redirect URL you were sent to after approving."New value: +"The entire redirect URL you were sent to after approving, including its state parameter. A bare ?code= value is refused."
  2. 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"
  3. Addedv0.5.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare the mutation/side-effect profile (readOnly=false, idempotent=false, destructive=true), and the description adds substantial context beyond them: local vs hosted session behavior, what each returns (status vs refresh token), the single-use nature of the code, and the state-validation requirement. No contradictions with 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three front-loaded sentences with no filler; purpose comes first, then session/return behavior, then the parameter constraint and the single-use warning. The first sentence packs multiple clauses (local vs hosted), which is dense but each clause earns its place.

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?

With no output schema, the description still tells the agent what is returned (status or refresh token, depending on session mode) and how failure must be handled. For a single-param auth-exchange tool this is complete enough to call correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the schema already documents the 'code' parameter and that a bare ?code= value is refused. The description goes slightly further by explaining the state-matching rationale, adding meaning beyond the schema, though it partly repeats the schema's bare-code warning.

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?

States a specific verb+resource ('Complete FreshBooks authorization') and clearly positions itself as the exchange step relative to the sibling freshbooks_auth_url, which it explicitly names as the source of the state. An agent can distinguish this from freshbooks_auth_url without reading the schema.

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?

Gives explicit when-to-use (after approving, with the whole redirect URL), a prerequisite (state must match a consent URL freshbooks_auth_url issued), and a when-not-to-do-something alternative ('if this fails, authorize again rather than retrying it'). Nothing about selection or sequencing is left to inference.

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