Skip to main content
Glama

tags.add

Add tags to a file by file ID, preserving existing tags and auto-creating new tag names in the local SQLite database. Labels a single file for easier classification and retrieval.

Instructions

Append tags to ONE file. Additive — existing tags are preserved; re-adding an existing tag is a no-op (idempotent per tag). New tag names auto-create rows in the global tags table. Persists to local SQLite. No external auth or rate limits. Returns {success: true}; throws if file_id is unknown. Use to label a single file. To tag every file matching a query in one call use tags.search; to remove tags use tags.remove.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsYesArray of tag names to add
file_idYesFile ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.7.2

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations available, the description fully discloses behavior: additive (preserves existing tags), idempotent per tag, auto-creates rows in global table, persists to SQLite, no auth/rate limits, returns {success:true}, and throws on unknown file_id. This exceeds the burden placed on a description when annotations are absent.

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?

Description is front-loaded with the core action, then efficiency details, then persistence, then outcome/errors, then usage alternatives. Every sentence adds unique value with no redundancy; length is appropriate for the complexity.

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

Completeness5/5

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

Despite only 2 parameters and no output schema, the description specifies the return payload ({success:true}) and error behavior (throws on unknown file_id). It also clarifies side-effects (auto-create, persistence) and environmental constraints (no auth/rate limits). Nothing necessary for correct invocation 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 covers 100% of parameters (tags array and file_id), so baseline is 3. Description adds behavioral nuance (idempotency, auto-creation) but does not clarify the format or meaning of the parameters themselves beyond what the schema already states. It contributes modest value, but not enough to raise the score above 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?

Description states a specific verb ('Append') and resource ('tags to ONE file'), and immediately contrasts with siblings via 'To tag every file... use tags.search; to remove tags use tags.remove'. This makes the tool's purpose unmistakable and distinct from all 54 siblings.

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?

Explicit usage guidance is provided: 'Use to label a single file' and exact alternatives for mass-tagging (tags.search) and removal (tags.remove). The instruction is direct and leaves no ambiguity about when this tool should be selected.

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