Skip to main content
Glama

Letters File

letters_file

Retrieve a letter’s rendered PDF file reference without following the redirect; returns the redirect URL and status code so the caller can download the binary.

Instructions

Get file of letter. GET /organisations/{organisationId}/deliveries/letters/{letterId}/file

Answers 302 to the rendered PDF; the redirect is NOT followed. Returns {"redirect_url": ..., "status_code": 302} so the caller can fetch the binary themselves.

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": {
      "organisation_id": "<organisation_id>",
      "letter_id": "<letter_id>"
    },
    "name": "letters_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
letter_idYes
organisation_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a non-obvious behavioral trait: the 302 is not followed and a JSON envelope with redirect_url and status_code is returned instead of bytes. It omits auth/permission requirements and whether the redirect URL expires or is single-use.

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?

The core behavior is front-loaded in the first sentence, followed by the return contract. The raw endpoint line is slightly technical-noise but earns its place by pinning scope; no filler sentences.

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?

No output schema exists, and the description compensates by spelling out the exact return object shape and status semantics, which is what an agent needs to avoid expecting binary content. Remaining gaps are auth requirements and ID sourcing rather than anything blocking correct invocation.

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 description coverage is 0% for two required parameters, so the description is the only source of meaning. The endpoint template maps organisation_id and letter_id to path positions, implying they are identifiers embedded in the URL, but it adds no format, sourcing, or validation detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Get file of letter") and anchors it to the concrete endpoint GET /organisations/{organisationId}/deliveries/letters/{letterId}/file, which pins the scope to letters rather than the ebills/emails file siblings. It does not name an alternative sibling, but the path makes the distinction inferable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description effectively tells the caller what to expect and what to do next (follow the returned redirect_url yourself), which is usage-relevant. It gives no explicit when-to-use framing versus letters_show or deliveries_ebills_file, and no prerequisite such as where letter_id comes from.

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