Skip to main content
Glama
freeagent-mcp-server

freeagent-mcp-server

by samaxbytez

freeagent_download_attachment

Download a FreeAgent attachment by its URL-derived ID into FREEAGENT_ATTACHMENTS_DIR; clashing filenames get a ' (n)' suffix, and the saved path is returned.

Instructions

Download a FreeAgent attachment (e.g. an expense or bill receipt) into FREEAGENT_ATTACHMENTS_DIR. Takes the attachment ID from an attachment URL such as https://api.freeagent.com/v2/attachments/123. Never overwrites: a clashing name gets a ' (n)' suffix. Returns the saved path, not the download link.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "attachment_id": "<attachment_id>"
    },
    "name": "freeagent_download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
attachment_idYesThe ID of the attachment to download

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag this as a non-read, non-destructive, open-world operation; the description adds real value beyond that by naming the write target directory, stating the non-overwrite policy with the ' (n)' suffix rule, and disclosing that the return value is the saved path rather than the download link. It stops short of covering failure modes (invalid ID, unwritable directory) or whether the directory is created if absent.

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?

Three short sentences, front-loaded with the action and destination, followed by the ID source and the return/conflict behavior. No sentence is redundant or repeated from the schema.

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

Completeness4/5

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

For a single-parameter tool with no output schema, the description covers what is done, where output lands, and what is returned, which is nearly everything an agent needs. Minor gaps remain around error behavior and directory creation, but they do not block correct invocation.

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 baseline would be 3, but the description adds meaning the schema lacks: the ID is extracted from an attachment URL, not a full URL or a filename, and it shows the exact URL shape. This prevents the common mistake of passing the whole link.

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 and resource ('Download a FreeAgent attachment') plus the concrete destination ('into FREEAGENT_ATTACHMENTS_DIR') and example resource types (expense or bill receipt). No sibling in the tool list performs downloads, so the distinction from the many get_*/list_* tools is unambiguous.

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?

Gives practical context for invocation: the ID must come from an attachment URL, with a concrete example URL showing the trailing-ID format. It does not say when not to use it or what happens on a missing/expired attachment, but no real alternative exists among the siblings, so the guidance is adequate without being exhaustive.

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

Deploy Server

Other Tools