Skip to main content
Glama

Set category rule

set_category_rule
Destructive

Teach the categoriser: merchants matching a pattern get this category from now on (on the phone too). Optionally re-categorise the existing transactions that match.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesRegex tested against the merchant, case-insensitive, e.g. '^arabia taxi' or 'talabat'
category_idYes
apply_to_existingNoAlso update unreviewed past transactions whose merchant matches. Default false

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

It adds useful behavioral context beyond annotations: the rule persists ('from now on'), syncs ('on the phone too'), and can re-categorise existing transactions. This complements the destructiveHint=true annotation without contradiction, though it does not cover permissions or failure modes.

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 a single compact, front-loaded statement. It states the core behavior first, then adds the optional mass-update effect, with no filler or redundant detail.

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?

Given an output schema exists and annotations already signal destructiveness, the description covers the main agent-relevant behavior: persistence, cross-device effect, and optional re-categorisation. It does not explain whether an identical pattern overwrites an existing rule or how category_id is validated, but these are secondary for basic invocation.

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 coverage is 67%: pattern and apply_to_existing are well-described. The description reinforces these but adds little new meaning, and category_id remains undocumented in both schema and description—an agent must infer the value type from sibling tools like list_categories.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb and resource: 'Teach the categoriser' so matching merchants get a category from now on. It distinguishes itself from category-creation tools like add_category by framing the action as pattern-to-category rule, though it does not explicitly name sibling alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use it: when you want persistent, pattern-based merchant categorization. However, it does not explicitly say when not to use it or point to alternatives like save_parse_rule or update_category, leaving some inference to the agent.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.