Skip to main content
Glama

Attach media to notes

attach-media-to-notes
Idempotent

Appends or prepends media references to existing Anki note fields without overwriting unrelated HTML, with dry-run preview enabled by default.

Instructions

Safely appends or prepends references to existing Anki media without replacing unrelated note-field HTML. Defaults to dry-run mode.

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": {
      "attachments": "<attachments>"
    },
    "name": "attach-media-to-notes"
  }
}

Input Schema

NameRequiredDescriptionDefault
dryRunNoPreview exact field hashes and references without modifying Anki
attachmentsYes

Output Schema

NameRequiredDescriptionDefault
dryRunYes
errorsYes
appliedYes
changesYes
changedFieldCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=true, so the safety framing is partly redundant. The description does add genuine value by promising unrelated note-field HTML is preserved, and it flags the dry-run default, but it says nothing about the expectedFieldHash concurrency guard that governs a real apply, nor about how repeated appends interact with the declared idempotency.

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?

Two short sentences with the core behavior front-loaded and the non-clobbering guarantee right behind it. The adverb "Safely" is soft filler whose content is better carried by the concrete "without replacing unrelated note-field HTML" clause.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema and annotations present, the description needn't cover return values, and the dry-run default is conveyed. The gap is the two-step protocol: an agent reading only this description would not know that applying requires an expectedFieldHash captured from the dry run, which is essential to using the tool correctly on the first call.

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?

At 50% schema coverage the description must compensate, and it does partially: "appends or prepends" gives the meaning of the placement enum even though the schema omits an enum list, and "Defaults to dry-run mode" reinforces the dryRun parameter's purpose. It adds nothing about noteId, fieldName, altText, or the hash-based apply check, leaving the most consequential nested parameters to the schema alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Appends or prepends references to existing Anki media" gives a specific verb (append/prepend) and a specific object (media references inside note fields), which is far more precise than the title's restatement. It implicitly separates itself from media-storage tools by specifying media that already exists, but it never names detach-media-from-notes or store-media-file explicitly, so sibling separation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase "existing Anki media" communicates a precondition (the file must already be in the collection, so store-media-file presumably comes first), and "Defaults to dry-run mode" hints at the intended preview-then-apply flow. However, there is no explicit statement of when to choose this over detach-media-from-notes or over editing note fields directly, and no guidance on when to set dryRun to false.

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