Skip to main content
Glama

set_document_tag

Destructive

Add or remove a single tag assignment on one document. Use it to organize or unlabel a document with existing tags; removing an assignment keeps the tag itself intact.

Instructions

Add or remove an existing tag assignment on one document. Use batch_documents for the same tag action across multiple explicit IDs. Requires edit access to each document; action=remove preserves the tag itself.

Input Schema

NameRequiredDescriptionDefault
tagIdYesUUID returned by the corresponding list or read operation.
actionYesAdd or remove exactly one tag assignment.
documentIdYesUUID returned by the corresponding list or read operation.
workspaceIdNoWorkspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.0.4
    • addedInput schema / properties / workspaceId
      Added value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "description": "Workspace UUID from list_workspace_structure(kind=workspaces). Required for ambiguous creates and structure changes; omit to search all granted scopes.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  2. Addedv0.1.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and non-idempotency, so the description's key contribution is scoping the destruction: 'action=remove preserves the tag itself' reassures that only the assignment is removed, not the tag entity. It also discloses the edit-access requirement, valuable auth context absent from annotations, but does not address what happens if the assignment already exists despite idempotentHint=false.

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?

Three short sentences, zero filler, with the core operation front-loaded and the alternative routing and permission note following in priority order. Every clause carries information an agent needs.

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?

Output schema exists so return values need no explanation, and the description covers the operation, the alternative, permissions, and the remove semantics. The one residual gap is behavior on a duplicate add, which matters given idempotentHint=false but is left implicit.

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 100%, so the baseline is 3; the description exceeds that by explaining the semantic effect of the action enum ('remove preserves the tag itself') and by qualifying tagId as an 'existing tag assignment.' It adds real meaning rather than restating field names.

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 pair and resource ('Add or remove an existing tag assignment') with explicit cardinality scope ('on one document'), which cleanly separates it from batch_documents. An agent knows exactly what operation this performs without opening the schema.

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?

Names the sibling alternative explicitly and gives the condition that selects it: 'Use batch_documents for the same tag action across multiple explicit IDs.' It also states the prerequisite ('Requires edit access to each document'), though it doesn't clarify when to use save_tag vs. this for a tag that doesn't yet exist.

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