Skip to main content
Glama

tags.search

Run a full-text search and append specified tags to all matching files in one call. Use files.search first to confirm the match set, as there is no dry-run.

Instructions

Bulk-tag — run an FTS search and append add_tags to every matching file in one call. Side effect: each match gets addTags applied (additive, idempotent per tag); the matched files themselves are NOT modified beyond their tag links. Per-file failures isolated to errors[]. No external auth or rate limits. There is NO dry-run flag, so ALWAYS run files.search with the same query first to verify the match set before tagging. The tags[] filter requires existing tags to ALL match (it scopes the search; it does not control which tags get added). Returns {matched_count, tagged_count, tags_applied, tagged_ids, errors}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoFilter — only matches that already carry ALL of these tags
queryYesFull-text search query
add_tagsYesTags to add to every matching file
favoriteNoIf true, restrict to favorited files only.
project_idNoScope search to a specific project. Pass null for KB-only results.

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 present, the description takes full responsibility for behavioral disclosure. It explains side effects (additive, idempotent per tag), scopes of modification, per-file error isolation, lack of external auth/rate limits, absence of dry-run, and the exact return shape. This is exemplary.

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?

Every sentence earns its place. The description front-loads the core action ('Bulk-tag'), then covers side effects, error handling, safety caveats, parameter nuance, and return format without repetition or filler.

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?

For a mutating tool with five parametersaint, no output schema, and no annotations, the description is remarkably complete. It explains the return fields, warns about the lack of dry-run, directs the agent to use files.search as a preflight, and clarifies filter semantics, leaving no critical gap for correct invocation.

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 coverage is 100%, so the baseline is 3. The description adds valuable parameter meaning beyond the schema: tags[] acts as an ALL-match filter scoping the search, not controlling which tags get added, and add_tags is applied to every matching file. This resolves ambiguity that the schema alone leaves open.

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 clearly states a specific action: run an FTS search and append tags to every matching file. It frames the tool as 'Bulk-tag', which distinguishes it from sibling tags.add and files.search, and the resource (tag links on matching files) is explicit.

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?

The intended use case—bulk-tagging by query—is clearaski, and the no-dry-run warning explicitly instructs the agent to preflight with files.search. It does not formally enumerate alternatives like tags.add, but the bulk vs. single-tag distinction is strongly implied by the description and sibling context.

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