Skip to main content
Glama
ianderso
by ianderso

add_media

Upload a document as a standalone Media object, reusing an identical existing file by checksum to avoid duplicate uploads. Attach and cite it once per fact.

Instructions

Upload a document as a standalone Media object, reusing an identical file already in the tree.

One image, one Media object -- then attach it wherever it belongs with attach_media(media_ref=...) and cite it once per fact it proves. Uploading the same photograph once per person it depicts is the duplicate pattern that later has to be unpicked by hand.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesLocal path to the image, PDF, audio or video file to upload.
descriptionYesWhat the document IS -- archival identity, not the person it mentions ('1900 US census, Cedar Flat, Brannock Co., Ohio, ED 12 sheet 4A'). Files are stored under checksum names.
dedup_by_checksumNoReuse an existing Media object if the identical file is already in the tree. Leave True.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already disclose that this is a non-read-only, non-destructive, non-open-world operation. The description adds useful behavioral context beyond that: the upload is standalone, identical files are reused via checksum, and duplicate uploads create cleanup work later. It does not cover permissions or exact return behavior, but annotations lower the burden.

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 front-loaded with the core action and then gives workflow and anti-duplication context. Every sentence is relevant, though the second paragraph is slightly editorial in phrasing and could be marginally tighter.

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?

Given full schema coverage, annotations, and no output schema, the description provides enough context to call the tool correctly: it explains the upload-as-standalone-object model, the dedup behavior, and the follow-up attach/cite workflow. It stops short of describing return values or edge cases such as dedup_by_checksum=false, but nothing critical is missing.

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 100%, so the schema already fully documents file_path, description, and dedup_by_checksum. The description echoes the reuse/dedup concept but adds no parameter syntax or constraints beyond what the schema provides, making 3 the appropriate baseline.

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 states a specific verb and resource: upload a document as a standalone Media object. It distinguishes this tool from the sibling attach_media by explaining that add_media creates the Media object, which is then attached elsewhere.

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 gives explicit workflow guidance: create one Media object per image, then use attach_media(media_ref=...) to attach it, and cite it once per fact. It also warns against the duplicate pattern of uploading the same photograph repeatedly, which is an explicit misuse scenario.

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