Skip to main content
Glama
OxygenBubbles

FreeAgent MCP Server

freeagent_explain_transaction

Idempotent

Approve or update a FreeAgent bank transaction by adding a receipt, changing its category/description, and reconciling it once evidence is confirmed.

Instructions

Approve or update a FreeAgent bank transaction explanation. Use this to:

  • Approve a 'marked for review' transaction (set markExplained=true)

  • Change the category or description of an explanation

  • Attach a receipt/invoice — PREFER filePath (a local file) or fileUrl (a download link); the server reads/encodes it. Re-attaching replaces any existing attachment. Get the explanationId from freeagent_list_transactions (explanation_id field).

RECEIPTS: Before asking the user for a file, search connected email tools (Gmail, Outlook/M365) for a matching invoice using vendor name, amount and date. Pass a download link as fileUrl, or save the PDF locally and pass filePath. Avoid fileBase64 for anything but tiny files — large inline base64 is unreliable. Also check local file sources (Downloads folder, etc.) if the user has mentioned them.

SAFETY: Only set markExplained=true when you have a confirmed receipt attached or the user has explicitly approved it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileUrlNoURL of a receipt to download and attach (e.g. a Stripe 'Download invoice' link). The server fetches and encodes it — no need to handle bytes.
categoryNoFreeAgent category path (e.g. '/v2/categories/285'). Use freeagent_list_categories to find the right one.
fileNameNoFile name for the attachment (e.g. 'ionos-invoice-apr-2026.pdf')
filePathNoAbsolute path to a local file to attach (e.g. '/Users/you/Downloads/invoice.pdf'). The SERVER reads and base64-encodes it — PREFER THIS over fileBase64, which is unreliable for non-trivial files. fileName defaults to the file's name.
fileBase64NoBase64-encoded file to attach (receipt, invoice, screenshot — PDF, PNG, JPEG, etc.)
contentTypeNoMIME type of the file (e.g. 'application/pdf', 'image/jpeg', 'image/png'). Inferred from fileName/filePath if omitted.
descriptionNoHuman-readable description for the transaction (e.g. 'IONOS — Monthly cloud hosting')
explanationIdYesNumeric FreeAgent bank transaction explanation ID (from explanation_id in list_transactions)
markExplainedNoSet true to approve/reconcile the transaction. Only do this when evidence is attached or confirmed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv3.0.1
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / category
      Added value: +{
      +  "description": "FreeAgent category path (e.g. '/v2/categories/285'). Use freeagent_list_categories to find the right one.",
      +  "pattern": "^\\/v2\\/categories\\/\\d+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / contentType
      Added value: +{
      +  "description": "MIME type of the file (e.g. 'application/pdf', 'image/jpeg', 'image/png'). Inferred from fileName/filePath if omitted.",
      +  "type": "string"
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "Human-readable description for the transaction (e.g. 'IONOS — Monthly cloud hosting')",
      +  "type": "string"
      +}
    • addedInput schema / properties / explanationId
      Added value: +{
      +  "description": "Numeric FreeAgent bank transaction explanation ID (from explanation_id in list_transactions)",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / fileBase64
      Added value: +{
      +  "description": "Base64-encoded file to attach (receipt, invoice, screenshot — PDF, PNG, JPEG, etc.)",
      +  "maxLength": 10000000,
      +  "type": "string"
      +}
    • addedInput schema / properties / fileName
      Added value: +{
      +  "description": "File name for the attachment (e.g. 'ionos-invoice-apr-2026.pdf')",
      +  "type": "string"
      +}
    • addedInput schema / properties / filePath
      Added value: +{
      +  "description": "Absolute path to a local file to attach (e.g. '/Users/you/Downloads/invoice.pdf'). The SERVER reads and base64-encodes it — PREFER THIS over fileBase64, which is unreliable for non-trivial files. fileName defaults to the file's name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / fileUrl
      Added value: +{
      +  "description": "URL of a receipt to download and attach (e.g. a Stripe 'Download invoice' link). The server fetches and encodes it — no need to handle bytes.",
      +  "format": "uri",
      +  "type": "string"
      +}
    • addedInput schema / properties / markExplained
      Added value: +{
      +  "default": false,
      +  "description": "Set true to approve/reconcile the transaction. Only do this when evidence is attached or confirmed.",
      +  "type": "boolean"
      +}
    • addedInput schema / required
      Added value: +[
      +  "explanationId"
      +]
  2. Changed12 schema fields changedv3.0.0
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / category
      Removed value: -{
      -  "description": "FreeAgent category path (e.g. '/v2/categories/285'). Use freeagent_list_categories to find the right one.",
      -  "pattern": "^\\/v2\\/categories\\/\\d+$",
      -  "type": "string"
      -}
    • removedInput schema / properties / contentType
      Removed value: -{
      -  "description": "MIME type of the file (e.g. 'application/pdf', 'image/jpeg', 'image/png'). Inferred from fileName/filePath if omitted.",
      -  "type": "string"
      -}
    • removedInput schema / properties / description
      Removed value: -{
      -  "description": "Human-readable description for the transaction (e.g. 'IONOS — Monthly cloud hosting')",
      -  "type": "string"
      -}
    • removedInput schema / properties / explanationId
      Removed value: -{
      -  "description": "Numeric FreeAgent bank transaction explanation ID (from explanation_id in list_transactions)",
      -  "minLength": 1,
      -  "type": "string"
      -}
    • removedInput schema / properties / fileBase64
      Removed value: -{
      -  "description": "Base64-encoded file to attach (receipt, invoice, screenshot — PDF, PNG, JPEG, etc.)",
      -  "maxLength": 10000000,
      -  "type": "string"
      -}
    • removedInput schema / properties / fileName
      Removed value: -{
      -  "description": "File name for the attachment (e.g. 'ionos-invoice-apr-2026.pdf')",
      -  "type": "string"
      -}
    • removedInput schema / properties / filePath
      Removed value: -{
      -  "description": "Absolute path to a local file to attach (e.g. '/Users/you/Downloads/invoice.pdf'). The SERVER reads and base64-encodes it — PREFER THIS over fileBase64, which is unreliable for non-trivial files. fileName defaults to the file's name.",
      -  "type": "string"
      -}
    • removedInput schema / properties / fileUrl
      Removed value: -{
      -  "description": "URL of a receipt to download and attach (e.g. a Stripe 'Download invoice' link). The server fetches and encodes it — no need to handle bytes.",
      -  "format": "uri",
      -  "type": "string"
      -}
    • removedInput schema / properties / markExplained
      Removed value: -{
      -  "default": false,
      -  "description": "Set true to approve/reconcile the transaction. Only do this when evidence is attached or confirmed.",
      -  "type": "boolean"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "explanationId"
      -]
  3. Changed3 schema fields changedv2.2.0
    • changedInput schema / properties / contentType / description
      Previous value: -"MIME type of the file (e.g. 'application/pdf', 'image/jpeg', 'image/png'). Inferred from fileName if omitted."New value: +"MIME type of the file (e.g. 'application/pdf', 'image/jpeg', 'image/png'). Inferred from fileName/filePath if omitted."
    • addedInput schema / properties / filePath
      Added value: +{
      +  "description": "Absolute path to a local file to attach (e.g. '/Users/you/Downloads/invoice.pdf'). The SERVER reads and base64-encodes it — PREFER THIS over fileBase64, which is unreliable for non-trivial files. fileName defaults to the file's name.",
      +  "type": "string"
      +}
    • addedInput schema / properties / fileUrl
      Added value: +{
      +  "description": "URL of a receipt to download and attach (e.g. a Stripe 'Download invoice' link). The server fetches and encodes it — no need to handle bytes.",
      +  "format": "uri",
      +  "type": "string"
      +}
  4. First observedv2.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Discloses key behavioral traits beyond the annotations: re-attaching replaces an existing attachment, the server reads/encodes filePath or fileUrl, large fileBase64 payloads are unreliable, and markExplained should be set only with confirmation. These details match the idempotentHint and readOnlyHint=false annotations, with no contradictions.

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 uses clear sections (main actions, RECEIPTS, SAFETY) and bullet, front-loading the primary purpose before digging into attachment workflow. Every sentence serves a distinct purpose—no filler—and the structure lets the agent rapidly locate the relevant guidance.

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 9-parameter mutation tool with no output schema, the description covers everything an agent needs: how to resolve the required explanationId, how to handle file options, how to source receipts, and when it is safe to approve. It also directs to relevant sibling tools where appropriate. The lack of explicit return-value documentation is acceptable because no output schema exists and the primary responsibility is to perform the mutation.

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 every parameter already has meaning. The description enriches that meaning with prioritizing filePath/fileUrl over fileBase64, explaining how fileName defaults when using filePath, and clarifying the safety condition on markExplained. This is above baseline but some repetition of schema text exists.

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 opens with a specific verb-resource pair: 'Approve or update a FreeAgent bank transaction explanation' and immediately lists the three core actions it supports. It clearly distinguishes this tool from siblings like freeagent_list_transactions by directing the agent to obtain explanationId from that list tool.

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 explicit when-to-use workflows: approving marked-for-review transactions, changing categories/descriptions, and attaching receipts. It also gives conditional guidance ('Only set markExplained=true when you have a confirmed receipt attached or the user has approved it') and cross-tool references, such as using freeagent_list_categories for the category path.

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