Skip to main content
Glama
ianderso
by ianderso

add_media

Upload a document as a standalone Media object, reusing identical files by checksum to prevent duplicates. Attach and cite it once per fact it proves.

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.1/5.0
Behavior4/5

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

Annotations already declare the safety profile (not read-only, not destructive, not idempotent). The description adds genuine behavioral context beyond them: identical files are reused rather than duplicated, files are stored under checksum names, and a Media object is meant to be cited once but attached in many places. It does not describe auth requirements or the returned reference explicitly.

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 purpose is front-loaded in the first sentence, followed by workflow guidance. The closing sentence about re-uploading the same photograph is slightly editorial but earns its place by motivating the dedup/citation model, so it is not wasted.

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?

For a simple 3-parameter creation tool with full annotation coverage and no output schema, the description covers purpose, dedup behavior, and the downstream attach/cite workflow. The only gap is that the return value (the media reference used by attach_media) is only implied, not stated.

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 coverage is 100%, so the schema already documents all three parameters, including the dedup_by_checksum default. The description reinforces the dedup semantics ('reusing an identical file already in the tree') but adds no syntax or format detail beyond the schema, so the baseline of 3 applies.

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 ('Upload a document as a standalone Media object') plus the dedup behavior, and implicitly distinguishes itself from attach_media and update_media by framing itself as the creation step. An agent can tell it apart from its siblings without opening the schema.

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?

Explicitly routes the agent to the follow-up step ('attach it wherever it belongs with attach_media(media_ref=...)') and warns against the duplicate-per-person upload pattern, giving a clear context of use. It stops short of an explicit when-not-to-use rule (e.g., when to use update_media instead), so not a 5.

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