Skip to main content
Glama

get_attachment

Read-only

Downloads one attachment from a Skolemelding message and returns it as an image, extracted PDF text, or a saved file path when large.

Instructions

Download one attachment of a message and return it (image, PDF with extracted text, or a saved file path when large). Get message_id and thread_id from list_messages and attachment_id from get_message. Opening a message marks it as read in the Skolemelding app. child is required when several children are linked.

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": {
      "message_id": "<message_id>",
      "thread_id": "<thread_id>",
      "attachment_id": "<attachment_id>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
childNo
thread_idYes
message_idYes
attachment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.9/5.0
Behavior2/5

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

The description discloses a real side effect beyond the annotations: opening a message marks it as read in the Skolemelding app. That disclosure is valuable, but it conflicts with readOnlyHint=true, which promises no state modification. Aside from that, it does not cover size thresholds, failure modes, or auth expectations, and openWorldHint is left unexpanded.

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?

Three tight sentences with the core action front-loaded and no filler. The important read-marking caveat sits at the end, where an agent skimming could miss it.

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?

There is no output schema, and the description compensates by describing what comes back (image, extracted PDF text, or a file path for large files). Missing pieces are the large-file threshold, error behavior for missing attachments, and any auth requirements, but the essential calling information is present.

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?

With 0% schema description coverage, the description must carry the parameter burden and largely does: it names the source tool for each of the three required IDs and explains the conditional `child` parameter. It does not give ID formats or examples, so some inference remains.

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 one attachment of a message) and even enumerates the return forms: image, PDF with extracted text, or a saved file path when large. That is enough to distinguish it from get_message, which supplies the attachment_id rather than the content.

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 a concrete prerequisite chain: message_id and thread_id come from list_messages, attachment_id comes from get_message. It also states the conditional rule for `child` (required when several children are linked). It stops short of an explicit 'do not use this to read the message body – use get_message' exclusion.

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