Skip to main content
Glama

Find Unused Attachments

find_unused_attachments
Read-onlyIdempotent

Locates attachments that no note references through embeds or markdown links, helping identify files for cleanup before archiving or syncing.

Instructions

Locate attachments that no note references — neither via ![[file]] embeds nor [text](file) markdown links. Useful for vault hygiene before archiving or before running a sync. Pair the output with delete operations from your shell, since this tool deliberately doesn't unlink files.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of unused-attachment paths to return (1-10000, default: 200). Total counts are still reported.
includeBytesNoIf true, also stat each unused attachment and report total reclaimable bytes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv4.1.1
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv2.0.0
  3. Removedv1.9.0
  4. Addedv1.8.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false. The description adds key behavioral context beyond that: it deliberately does not unlink files and must be paired with external delete operations, which prevents destructive assumptions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is three focused sentences with zero waste. The core purpose is front-loaded, followed by use cases and the important non-destructive behavioral caveat.

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?

The description is complete enough to call the tool correctly: it defines unused attachments, explains the intended workflow, and clarifies that deletion is external. It does not describe the return shape in detail, but the schema covers both parameters and no output schema exists.

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 both limit and includeBytes are already documented in the schema. The description adds no additional parameter semantics, so the baseline score of 3 is appropriate.

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: 'Locate attachments that no note references.' It also defines 'unused' precisely via two reference forms, which distinguishes this from sibling list_attachments, get_attachment, and find_broken_links.

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?

It gives clear usage contexts ('vault hygiene before archiving or before running a sync') and explicitly routes deletion to shell operations rather than this tool. It lacks explicit when-not-to-use guidance, but the practical workflow is clear.

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