Skip to main content
Glama

media

List attachments and embedded images archived for a Discord channel, with local paths, CDN URLs, and download status to spot missing files.

Instructions

List attachments AND embed images archived for a channel.

Downloaded files live under DMINE_MEDIA (default ~/.config/dmine/media//, embed images in /embeds/). Entries without local_path only carry the CDN URL, which may already be expired. Use remedia() to (re-)download while the links are valid.

Args: channel: channel ID or full URL. limit: max messages to scan (default 200). message_since: only messages with id > this message ID. Returns: Dict: {"media_dir": str, "count": int, "attachments": [ ... ]} with per-entry kind ("attachment"|"embed_image"), message_id, ts, author, filename, downloaded, local_path, url.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
channelYes
message_sinceNo

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?

With no annotations, the description carries the full burden and does disclose meaningful traits: where files are stored under DMINE_MEDIA, that some entries are URL-only and may already be expired, and how to re-fetch them. It omits auth/permission requirements and any rate/scope caveats, keeping it just shy of a 5.

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?

Front-loaded purpose sentence, then storage/expiry context, then a clean Args/Returns block. The structured layout is efficient, though it is slightly verbose for a simple listing tool.

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?

Documents all arguments and describes the return dict shape (media_dir, count, attachments with per-entry fields), which compensates for the absent output schema. Only missing element is any note on permissions or error behavior, but the definition is otherwise complete for a read-only listing tool.

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 description coverage is 0%, so the description must compensate, and it does: channel is a 'channel ID or full URL', limit is 'max messages to scan (default 200)', and message_since restricts to 'messages with id > this message ID'. All three params gain clear meaning beyond the bare 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 (list) and two distinct resource types (attachments AND embed images) scoped to a channel. This distinguishes it from siblings like remedia, which it explicitly references for downloading, so an agent can route confidently.

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?

Clearly points to remedia() as the alternative for (re-)downloading while links are valid, and notes that entries without local_path only hold an expirable CDN URL. That gives strong contextual guidance, though it stops short of explicit when-not-to-use conditions.

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