Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOG_LEVELNoLogging level (debug, info, warn, error)
FRESHBOOKS_CLIENT_IDYesOAuth client ID from FreshBooks Developer Portal
FRESHBOOKS_TOKEN_PATHNoPath for token storage
FRESHBOOKS_REDIRECT_URIYesOAuth redirect URI (e.g., https://freshbooks.goodsamsoftware.com/callback)
FRESHBOOKS_CLIENT_SECRETYesOAuth client secret from FreshBooks Developer Portal

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
auth_statusA

Check whether FreshBooks is connected and return the active session details.

WHEN TO USE:

  • Call first in any workflow before using accounting or time-tracking tools

  • User asks "am I connected to FreshBooks?", "what account is linked?"

  • Diagnose why a tool returned an auth error

TAKES NO ARGUMENTS — safe to call anytime.

RETURNS (connected session): { connected: true, userId, accountId, businessId, email, expiresAt }

  • accountId and businessId are the IDs to pass to accounting and time-tracking tools

RETURNS (no session or expired token): { connected: false }

NEXT STEPS:

  • If connected: false → call auth_get_url to start OAuth

  • If connected: true → use accountId/businessId with all other tools

auth_get_urlA

Generate an OAuth 2.0 authorization URL and a CSRF state token for the FreshBooks sign-in flow.

WHEN TO USE:

  • auth_status returns { connected: false }

  • User says "connect my FreshBooks account" or "sign in to FreshBooks"

  • Re-authenticating after a revoked or expired session

TAKES NO ARGUMENTS.

RETURNS: { url: "https://auth.freshbooks.com/oauth/authorize?...", state: "" }

WORKFLOW:

  1. Call auth_get_url → share the url with the user

  2. User visits the URL, authorizes, and is redirected — the redirect URL contains code and state query params

  3. User pastes the code and state back → call auth_exchange_code with both values

auth_exchange_codeA

Exchange an OAuth authorization code for access and refresh tokens, completing the FreshBooks connection.

WHEN TO USE:

  • Immediately after the user visits the auth_get_url link and is redirected with a code

  • Only call once per code — codes expire quickly (typically 60 seconds)

REQUIRED:

  • code (string): The authorization code from the FreshBooks redirect URL. Example: "eyJhbGci..."

  • state (string): The state value returned by auth_get_url — must match to prevent CSRF. Example: "abc123xyz"

RETURNS: { success: true, userId, accountId, businessId, email, expiresAt } Tokens are stored locally; all subsequent tool calls use them automatically.

ERRORS:

  • Expired or invalid code → restart with auth_get_url

  • State mismatch → CSRF protection triggered → restart with auth_get_url

auth_revokeA

Revoke the current FreshBooks OAuth session and delete all stored tokens.

WHEN TO USE:

  • User says "disconnect FreshBooks", "sign out", or "remove my FreshBooks connection"

  • Switching to a different FreshBooks account — revoke first, then use auth_get_url for the new account

  • Security: clear stored credentials from this machine

TAKES NO ARGUMENTS.

RETURNS: { success: true, message: "Authentication revoked successfully" }

NOTE: After calling this tool, all accounting and time-tracking tools will return auth errors until a new OAuth session is established via auth_get_url → auth_exchange_code.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Good-Samaritan-Software-LLC/freshbooks-mcp'

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