Skip to main content
Glama
OurFamilyWizard MCP

OurFamilyWizard MCP

by chrischall

ofw_download_attachment

Destructive

Download an OurFamilyWizard message attachment by fileId and return readable content: extracted text from PDFs, documents and spreadsheets, inline images, or a saved file path.

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).

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.8/5.0
Behavior5/5

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

Goes well beyond the annotations by documenting a three-rung delivery ladder, the 10 MiB inline cap, maxChars clipping, normalized MIME types, disk path defaults, and overwrite/no-op semantics. The destructiveHint=true annotation is consistent with disk writes and force replacement.

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 description is long and dense, but it is front-loaded and organized around a numbered delivery ladder. Some sentences repeat schema details, though most earn their place for a tool with many modes.

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?

No output schema exists, yet the description explains concrete return shapes (ImageContent, extracted JSON, EmbeddedResource, deliveredVia/deliveryAttempts) and failure modes. Complete enough for an agent to invoke it confidently.

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 descriptions already cover every parameter at 100%, so the description mainly reinforces defaults and interactions such as the env-var inline default, saveTo confinement, and no-op on re-download. It adds some cross-parameter value but little that is not already in the schema.

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 an OFW message attachment'), names the required fileId, and explains the returned content modes. An agent can distinguish it from ofw_get_message, which only supplies fileId metadata.

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?

Explicitly covers when inline versus disk delivery is used, when disk is forced to inline on hosted deployments, when to use link for oversized files, and when extract:true is needed. It gives no alternative sibling tool for downloading, but none exists.

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