Skip to main content
Glama
MauroDruwel

Smartschool MCP Server

by MauroDruwel

download_attachment

Save a message attachment to your preferred directory; existing files get a numbered suffix instead of being overwritten.

Instructions

Download a specific attachment from a message.

Files are saved to save_path when provided, otherwise to ~/Downloads/smartschool/. The directory is created automatically. Existing files are never overwritten — a counter suffix is appended instead (e.g. report (1).pdf).

Args: message_id: The ID of the message containing the attachment. file_id: The file ID of the attachment to download (from get_attachments). save_path: Optional directory to save the file into.

Returns: Dictionary with the saved file path, filename, mime type, and bytes written.

Examples: - download_attachment(249184, 12345) -> Download to ~/Downloads/smartschool/ - download_attachment(249184, 12345, "/tmp") -> Download to /tmp/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_idYes
save_pathNo
message_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "title": "download_attachmentDictOutput",
      +  "type": "object"
      +}
  2. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the default save location, automatic directory creation, non-overwrite behavior with counter suffixes, and the return dictionary fields. It omits error handling and permission requirements, but the key side-effecting behaviors are clearly exposed.

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 is well-structured with a concise opening, a behavior paragraph, parameter list, return type, and two examples. Every section earns its place and the most important behavioral caveat (no overwriting) is front-loaded.

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 file-writing operation with no annotations, the description covers the default path, concurrency-safe file naming, return values, and example invocations. The reference to get_attachments supplies the necessary precondition, and the output schema exists to document return structure further.

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

Parameters5/5

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

Schema description coverage is 0%, so the description fully compensates. It explains message_id as the containing message, file_id as the attachment ID from get_attachments, and save_path as an optional target directory—adding meaningful semantics beyond the bare schema types.

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 and resource: "Download a specific attachment from a message." It clearly distinguishes this from sibling tools like download_homepage_image and get_attachments by scoping to message attachments and naming get_attachments as the source for file IDs.

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?

The description gives clear context for when to use the tool: downloading an attachment from a message. It also implicitly provides the workflow by stating file_id comes from get_attachments. However, it does not explicitly state when not to use this tool or name alternatives such as download_homepage_image, so it lacks formal exclusions.

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