Skip to main content
Glama

Set document classification

set_classification

Update an existing document's free-text classification frontmatter field for supported spec types, bump its updated timestamp, and leave the body and other fields unchanged. Blank clears it.

Instructions

Replace the free-text classification frontmatter field of an existing document across the whole-body domains (type is one of req, uc, tsk, qa, prb, gol, rsk, dec, sop, feat, vcr, sysrs; adr is not supported), also bumping updated and leaving the body and every other frontmatter field untouched. classification is fully free-text -- no closed vocabulary; a blank or whitespace-only value clears it back to None/absent. No create_* tool accepts a classification argument at all -- this is the sole classification-change entry point. A document that exists but fails to parse returns a ParseFailureResult (error/path/id) instead of raising the domain's not-found error (a truly-absent id still raises) -- its error text is byte-identical to the domain's list_<d> failed row's error for the same file (identical field path and cause, including the trailing pydantic documentation line; ADR 9080b37c-82b3-4f63-81f1-79641d0bf14c; ADR b8c9bfea-6dcf-4158-bfc5-4ec17abb842f, GitHub issue #170 -- case 4 of the ADR 519d1206 non-raising-structured-result workaround chain). An invalid id (path-injection attempt or wrong format for type) or an unknown type is a ValueError raised before any file access; type="adr" passes the id validation (a well-formed UUID id) and raises the plain KeyError inherited from the dispatch-table lookup instead. Returns the updated frontmatter only (no body) on success; use the corresponding get_<d> tool to fetch the full document afterward.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
typeYes
classificationYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: `updated` is bumped while the body and all other frontmatter are untouched, blank/whitespace clears to None, parse failures return a ParseFailureResult instead of raising while a truly-absent id raises, and ID/type validation errors surface as ValueError (or a KeyError for type='adr'). This is exactly the behavioral disclosure a mutation tool needs.

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

Conciseness3/5

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

The core behavioral facts are front-loaded and useful, but the middle sprawls with ADR UUIDs, GitHub issue numbers, and a workaround-chain aside that add little for an agent trying to call the tool. Sentences are long and nested rather than scannable.

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?

An output schema exists (so return-value shape need not be explained), and the description still covers success return ('updated frontmatter only, no body'), failure modes, and side effects. Nothing an agent needs to call it correctly is missing.

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 0%, so the description must compensate, and it does: it defines `classification` as fully free-text with blank-valued clearing semantics, lists the supported `type` domains and the unsupported 'adr', and characterizes `id` validation (path-injection or wrong format raises). Only the concrete id format is left implicit.

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 (replace) and resource (the free-text `classification` frontmatter field of an existing document), scoped to the whole-body domains. The agent can distinguish it from update_frontmatter and set_status, which are the nearest siblings.

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?

Explicitly claims to be 'the sole classification-change entry point' since no create_* tool accepts a classification argument, and routes the agent to get_<d> to fetch the full document afterward. It stops short of contrasting with update_frontmatter, which one might otherwise reach for to edit frontmatter.

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