Skip to main content
Glama
OurFamilyWizard MCP

OurFamilyWizard MCP

by chrischall

ofw_download_attachment

Destructive

Download an OurFamilyWizard message attachment by fileId and get readable content: images inline, spreadsheets/PDFs/Office/text as extracted text, or raw bytes saved to disk.

Instructions

Download an OFW message attachment by fileId and return content you can actually read. Inline delivery walks a ladder and returns the first rung that works: (1) host-renderable images (PNG/JPEG/GIF/WEBP) come back as ImageContent; (2) .xlsx/.csv/.tsv, .pdf, .docx, .pptx and text files come back as EXTRACTED CONTENT — per-sheet CSV, per-page/slide text, document text — in the response JSON under extracted; (3) anything else comes back as an EmbeddedResource blob of the raw bytes. Images and raw bytes are only returned inline up to 10 MiB; a larger file fails with a tool error that says how to get it instead (extracted text is unaffected — it is bounded by maxChars). The meta block names the rung as deliveredVia and, when it falls through to bytes, lists what was tried in deliveryAttempts. Reported mime types are always normalized to a bare media type (no charset/name parameters). In disk mode the bytes are saved to ~/Downloads/ofw-mcp/ and the response carries the absolute path; pass extract:true to ALSO get the extracted content in that response. The default for inline can be flipped server-side via the OFW_INLINE_ATTACHMENTS env var. On a hosted deployment with no filesystem, disk mode is unavailable, so inline is forced (forcedInline:true) rather than failing — a saveTo path never costs you the content. fileId comes from attachments[].fileId on ofw_get_message. Override disk destination with OFW_ATTACHMENTS_DIR or saveTo; saveTo must stay inside the attachments directory, and an existing file is never overwritten unless force:true. Re-downloading to the same path is a no-op (disk mode only). On a server-configured no-read day (OFW_READ_DAYS / OFW_NO_READ_DAYS) only attachments of unread inbox messages are withheld (READING_BLOCKED, with nextReadableDay), along with files the cache cannot place; attachments of sent, already-read and draft messages download as on any day.

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": {
      "fileId": "<fileId>"
    },
    "name": "ofw_download_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
linkNoHosted deployments: return a private, expiring download link to the file instead of its bytes — the way to hand the user a file too large to return inline. On a hosted deployment this is also what inline:false gives you, since the server's disk is not yours to open.
forceNoRe-download even if already on disk, replacing any existing file at the destination. Default false. Ignored when inline:true (inline always fetches fresh bytes, or reuses an on-disk copy if present).
partsNoWhich sheets / slides / pages to extract, e.g. "1-3,5" (1-based positions) or a sheet name like "2026". A bare number matches either a position or a name. Omit for everything. Unselected parts are listed in `extracted.omitted`.
fileIdYesAttachment file id (from ofw_get_message → attachments[].fileId)
inlineNoIf true, return content inline as MCP content blocks and skip the disk write. If false, write to disk and return the path — except on a hosted deployment with no filesystem, where inline is forced (forcedInline:true) so the content is still returned. If omitted, falls back to the OFW_INLINE_ATTACHMENTS env var (default: false = disk).
saveToNoPath or directory to write to, INSIDE the attachments directory (OFW_ATTACHMENTS_DIR, default ~/Downloads/ofw-mcp); a relative path is resolved against it and anything outside it is refused. If a directory (trailing /), the OFW filename is used. Default: <attachments dir>/<fileId>-<filename>. An existing file is not overwritten unless force:true. Ignored when inline is in effect.
extractNoWhether to extract readable content from the file. Default: on for inline delivery of any non-image type, off in disk mode. Set false to get the raw bytes inline instead of extracted text (e.g. to hash or re-upload the file); set true in disk mode to get both the saved path and the extracted content.
maxCharsNoCeiling on extracted characters (default 50000). Over it, content is clipped on a row/line boundary, `truncated` is set, and anything dropped whole is listed in `extracted.omitted`.
linkMinutesNoHow long a download link works, in minutes (default 60, max 1440).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.27.2
    • addedInput schema / properties / link
      Added value: +{
      +  "description": "Hosted deployments: return a private, expiring download link to the file instead of its bytes — the way to hand the user a file too large to return inline. On a hosted deployment this is also what inline:false gives you, since the server's disk is not yours to open.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / linkMinutes
      Added value: +{
      +  "description": "How long a download link works, in minutes (default 60, max 1440).",
      +  "maximum": 1440,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed2 schema fields changedv2.19.3
    • changedInput schema / properties / force / description
      Previous value: -"Re-download even if already on disk. Default false. Ignored when inline:true (inline always fetches fresh bytes, or reuses an on-disk copy if present)."New value: +"Re-download even if already on disk, replacing any existing file at the destination. Default false. Ignored when inline:true (inline always fetches fresh bytes, or reuses an on-disk copy if present)."
    • changedInput schema / properties / saveTo / description
      Previous value: -"Absolute path or directory to write to. If a directory, the OFW filename is used. Default: ~/Downloads/ofw-mcp/<fileId>-<filename>. Ignored when inline is in effect."New value: +"Path or directory to write to, INSIDE the attachments directory (OFW_ATTACHMENTS_DIR, default ~/Downloads/ofw-mcp); a relative path is resolved against it and anything outside it is refused. If a directory (trailing /), the OFW filename is used. Default: <attachments dir>/<fileId>-<filename>. An existing file is not overwritten unless force:true. Ignored when inline is in effect."
  3. Changed1 schema field changedv2.17.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  4. First observedv2.8.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only flag destructive/openWorld/not-readOnly; the description goes well beyond by disclosing the 10 MiB inline cap, the no-op on re-download to the same path, forced-inline fallback on hosted deployments, env-var-controlled defaults, and the READING_BLOCKED withholding rules with nextReadableDay. It also explains writing to ~/Downloads/ofw-mcp/ and the absolute-path return, which is exactly the destructive behavior the annotations hint at but do not explain.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core behavior is front-loaded in the first two sentences, which is good, but the remainder is a dense paragraph with em-dash asides and several forward references (env vars, hosted deployments, read days) that could be split or trimmed. Every clause carries information, yet the single wall of text costs readability on a first pass.

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 9-parameter tool with no output schema and destructive annotations, the description covers delivery modes, size limits, extraction behavior, truncation, path safety, idempotency, and the authorization withholding case. An agent can choose parameters and predict the response shape without additional sources.

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 cross-parameter interactions not in the schema: the inline/OFW_INLINE_ATTACHMENTS fallback, forcedInline on hosted deployments, saveTo being ignored when inline is in effect, and the meta fields (deliveredVia, deliveryAttempts, extracted.omitted) that interpret parameter effects. It stops short of restating linkMinutes/parts semantics in the prose, so not a full 5.

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 first sentence names a specific verb and resource (download an OFW message attachment by fileId) and the rest immediately qualifies the return shape, which no sibling provides. The delivery ladder (ImageContent / extracted / EmbeddedResource) makes it unmistakable versus ofw_get_message or ofw_upload_attachment.

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?

It states when to use inline versus disk, when to use link on hosted deployments, when to set extract:true or false, and when force is needed. It also names the failure mode (10 MiB limit) and the remedy ('a tool error that says how to get it instead', plus saveTo/link). Exclusions (saveTo must stay inside the attachments dir, existing files not overwritten) are explicit.

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