Skip to main content
Glama

categories_normalize

Rename and merge stored categories by re-keying fingerprints to canonical forms. Dry-run reports exact changes before you apply.

Instructions

Rename stored categories and re-key their fingerprints (CB-61).

TWO MODES, and the second is a working mode rather than a side effect. Without fold_map this folds every stored SPELLING to its canonical form, for rows filed before write-time canonicalization existed, whose stored auto:v1 fingerprint still carries the old spelling and therefore forks identity when the same defect is reported again. With a fold_map it MERGES CATEGORY NAMES: any stored name may be renamed to any canonical target, and the two need not be spellings of each other. That second mode is how a tracker's rare category names are collapsed into its common ones.

DRY RUN BY DEFAULT — without apply=true nothing is written and the report tells you exactly what would change. A key that matches no stored category is accepted and renames nothing, and unmatched_fold_keys names every one of them, so a typo on the left-hand side is stated rather than left to be spotted as a pair missing from the from -> to table. A typo in a TARGET is refused instead — see new_category. Matching is exact against the stored spelling, so a canonical key does not reach a stored Process Improvement and is reported unmatched. Take an export-csv backup before applying; restore-csv puts findings back verbatim into an EMPTY tracker, but milestone items and audit history are not in a CSV export and are not restored.

Each renamed row's fingerprint is handled by kind: a NULL or a caller-SUPPLIED fingerprint is left byte-identical, an auto:v1 one is re-derived with the new category after its stored inputs are verified to reproduce the stored hash. A row that fails that round trip is skipped WHOLE and reported under unverifiable. The occurrence ring (meta.occurrences) is never rewritten.

If the fold would put two LIVE findings on one fingerprint, the run writes NOTHING and reports the colliding pair by id — merging two cards is a decision, not a migration step. Any OTHER identity merge — two closed cards, or a closed card and a live one — is legal, so it is reported under merged_identities rather than refused: the run proceeds, and you are told which cards this fold fused. Both unmatched_fold_keys and merged_identities are always present; [] means "checked, none".

Args:

  • fold_map: Optional {stored category name: canonical target name} map, as an object or a JSON string. The key is matched exactly against the stored value and may be any name the table holds. Every target must already be canonical (casefold, hyphen/whitespace -> "_"). Omit it to fold every stored spelling to its own normalized form; {} is an explicit no-op.

  • apply: Write the changes. Default false (report only).

  • new_category: Permission to fold INTO a category this tracker does not hold yet, for the whole map at once. Without it such a target is refused, naming the nearest existing categories — an operation meant to REDUCE the number of category names must not invent one by typo. The refusal stops at the first bad target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNo
fold_mapNo
new_categoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.2.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries full behavioral burden and does so thoroughly. It discloses dry-run behavior, the exact effects of apply=true, per-kind fingerprint handling, collision safety (writes NOTHING on live-fingerprint collisions), refusal of typo targets, and that meta.occurrences is never rewritten.

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 description is long but densely informative, and every paragraph earns its place given the data-integrity stakes. It front-loads the core purpose and modes, then uses structured paragraphs and an Args list for details, keeping the material navigable.

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 complex migration tool with an output schema, no annotations, and zero schema parameter descriptions, this description is remarkably complete. It covers prerequisites, failure modes, collision behavior, skipped rows, report fields, and parameter semantics, leaving no critical decision point unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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 fully compensate. It does: fold_map is explained with exact-match semantics, accepted value forms, and {} as an explicit no-op; apply is tied to dry-run default; new_category is explained with its refusal behavior and purpose. All three parameters receive rich, actionable meaning.

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 opening line, 'Rename stored categories and re-key their fingerprints (CB-61)', states a specific verb, resource, and scope. It then distinguishes two modes (spelling normalization vs. category merging), making the tool's purpose precise and distinguishing it from sibling category and grouping tools.

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 description gives clear context for when each mode is appropriate: without fold_map for legacy spellings, with fold_map for collapsing rare categories into common ones. It also advises taking an export-csv backup before applying and warns about restore-csv limitations, though it does not explicitly name alternative sibling tools to use instead.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/faxik/codebugs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server