Skip to main content
Glama
OxygenBubbles

FreeAgent MCP Server

freeagent_create_mileage_expense

Create a mileage expense in FreeAgent by providing journey details, origin/destination or manual miles, and optional rate. Supports round trips and HMRC threshold logic for automated mileage rates.

Instructions

Create a mileage expense in FreeAgent. Provide either origin + destination (requires ORS_API_KEY or GOOGLE_MAPS_API_KEY for distance lookup) or manualMiles for the journey distance. Set roundTrip=true to double the distance.

Rate: pass ratePence to set the per-mile rate explicitly (e.g. 45 for 45p/mile). If omitted, defaults to the MILEAGE_RATE_PENCE env var, or HMRC approved rates (configurable via HMRC_RATE_HIGH_PENCE / HMRC_RATE_LOW_PENCE / HMRC_THRESHOLD_MILES env vars, defaulting to 45p/25p at 10,000 miles — pass cumulativeMilesYTD to enable threshold logic).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datedOnYesJourney date YYYY-MM-DD
descriptionYesJourney description (e.g. 'Wakefield to Ackworth TT Club, coaching session')
originNoOrigin address. Requires distance API key. Omit if providing manualMiles.
destinationNoDestination address. Requires distance API key. Omit if providing manualMiles.
manualMilesNoJourney distance in miles (use instead of origin/destination)
roundTripNoDouble the distance for a return journey
ratePenceNoPence per mile (e.g. 45). If omitted, uses MILEAGE_RATE_PENCE env var or HMRC rates (configurable via env vars, defaults to 45p/25p with threshold logic).
cumulativeMilesYTDNoCumulative business miles already claimed this tax year. Used for HMRC threshold logic (high rate → low rate at threshold). Only relevant when ratePence is not set.
currencyNoISO 4217 currency code (default GBP)GBP
Behavior4/5

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

Annotations already indicate mutability (readOnlyHint=false, destructiveHint=false). Description adds behavioral details: rate selection logic involving env vars, HMRC threshold, and distance API dependency. Could be improved by noting error handling or return value.

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?

Two-paragraph structure with front-loaded main purpose. Every sentence contributes necessary detail. Could be slightly more compact, but overall efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers core functionality and key parameter interactions. Lacks information about return values (e.g., created expense ID) and error handling (e.g., invalid address, failed API call), which would be helpful given no output schema.

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 has 100% parameter description coverage. Description adds value beyond schema by explaining parameter interdependencies (origin/destination vs manualMiles, roundTrip, cumulativeMilesYTD with threshold logic). Enhances understanding of conditional behavior.

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?

Clearly states 'Create a mileage expense in FreeAgent' with specific verb and resource. Distinguishes from sibling tools like freeagent_create_expense by focusing on mileage-specific logic (origin/destination vs manualMiles, rate defaults, roundTrip).

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?

Provides explicit instructions for when to use origin+destination vs manualMiles, and explains ratePence vs environment variable defaults. However, does not directly compare to freeagent_create_expense or advise when not to use this tool.

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

Install Server

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/OxygenBubbles/freeagent-mcp-server'

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