Skip to main content
Glama

Add standing rule

purch_add_rule

Remember something ahead of time ("the next five days are the Texas conference, book it to travel"): matching rows get a suggested category until someone reviews them. When the person tells you about spending before it shows up on a statement (a trip, an event, a project, "everything from this shop is office supplies"), record it as a standing rule. Turn relative dates into real ones from today ("the next five days" from 2026-10-05 is 2026-10-05 to 2026-10-09) and say them back. A rule needs a window, words the statement line will contain, or a vendor; the category is the person's word. A rule SUGGESTS: it never books a row. Rows it matches show the suggestion and stay unreviewed until the person confirms them, in review or with purch_accept_suggestions. Effects: rule recorded; matching unreviewed rows carry its suggestion.

Input Schema

NameRequiredDescriptionDefault
toNoLast day it applies, inclusive. ISO date, YYYY-MM-DD.
fromNoFirst day it applies. ISO date, YYYY-MM-DD.
labelYesThe person's name for it: "Texas conference", "Q4 office move".
matchNoWords the statement line contains, any case (UBER, MARRIOTT). Optional.
reasonNoWhat the person said, in their words.
statusNoWhat matching rows are suggested as. Defaults to purchase.
vendorNoOnly rows already named to this vendor. Optional.
categoryYesThe category matching rows are suggested as, in the person's words (travel, office supplies).
currencyNoOnly rows in this currency (ISO 4217). Optional.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover the safety envelope (readOnlyHint=false, destructiveHint=false, idempotentHint=false). The description goes well beyond them with a non-obvious state effect: "A rule SUGGESTS: it never books a row" and matched rows "stay unreviewed until the person confirms them", plus an explicit Effects block. For a non-idempotent write, the "never books / stays unreviewed" side-effect profile is exactly the context annotations cannot convey.

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

Conciseness4/5

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

Intent and the when-to-use trigger are front-loaded, then constraints, then the Effects line — good ordering with no filler. It is on the long side, with the date-conversion example taking a full sentence, but each sentence contributes a distinct rule the agent needs.

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 9-parameter write tool with no output schema, the description covers the full picture: triggering situation, required inputs, date handling, the fact that the result is a suggestion rather than a booking, and the confirmation path. Nothing an agent needs to call this 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 coverage is 100%, so baseline is 3, but the description earns more by adding a cross-field constraint absent from the schema: "A rule needs a window, words the statement line will contain, or a vendor" (from/to, match, vendor are all optional individually). The date-normalization instruction ("the next five days" from 2026-10-05 is 2026-10-05 to 2026-10-09) adds real semantics for from/to beyond "ISO date, YYYY-MM-DD".

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 uses a concrete verb-and-resource framing ("record it as a standing rule" / "remember something ahead of time") with two worked examples (Texas conference, shop supplies), so the agent knows this creates a forward-looking matching rule, not a transaction edit. It implicitly contrasts with purch_accept_suggestions (the confirming action) but never names purch_end_rule or purch_rules as the sibling pair, so differentiation is inferred rather than stated.

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

Usage Guidelines5/5

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

It states exactly when to call it: "When the person tells you about spending before it shows up on a statement (a trip, an event, a project...)". It also hands off the alternative path explicitly: matched rows are confirmed "in review or with purch_accept_suggestions", which tells the agent what this tool must not be used to do.

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.