Skip to main content
Glama

create_attachment_upload_url

Get a short-lived upload URL for attaching receipt/invoice files (JPEG, PNG, WebP, PDF) to a transaction. File bytes cannot be sent through MCP: POST each file as the raw request body to the returned url with the returned headers, plus the header named by filenameHeader set to the URI-encoded original filename of that file (e.g. via curl --data-binary). The URL works for multiple files until it expires. Requires a client that can make HTTP requests with local files. Requires finance:write scope.

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": {
      "transactionId": "<transactionId>"
    },
    "name": "create_attachment_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
transactionIdYesID of the transaction to attach files to

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / transactionId / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false, so the description carries the real burden and delivers: the URL is short-lived, reusable across multiple files until expiry, and accepts specific MIME types. It also discloses the auth scope and the client capability requirement, which are exactly the operational traits an agent needs before calling.

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?

Four tight sentences, front-loaded with the outcome and immediately followed by the constraint that shapes the whole workflow. Every clause adds operational information (protocol, header, reuse window, scope) with no filler.

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?

There is no output schema, so the description compensates by explaining what is returned (url, headers, filenameHeader) and how to use it. Combined with the scope and client prerequisites, an agent has everything needed to invoke this correctly.

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

Parameters3/5

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

Schema coverage is 100% for the single transactionId parameter, so the schema already carries its meaning. The description adds context about the returned URL and filenameHeader rather than elaborating on the input parameter itself, which is acceptable at the baseline for fully documented schemas.

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?

Names a specific verb and resource ('Get a short-lived upload URL for attaching receipt/invoice files to a transaction') and immediately scopes it to a transaction ID. It is clearly distinguishable from sibling tools like list_transaction_attachments and delete_attachment, which operate on already-attached files rather than producing an upload endpoint.

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 and when-not-to-use guidance: file bytes cannot be sent through MCP, so the agent must POST raw bytes to the returned URL with specific headers. It also states prerequisites (an HTTP-capable client with local file access) and the required finance:write scope, which prevents misuse attempts.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.