Skip to main content
Glama

set_rules

Save the user's rules (needs an API key so they stay yours). Each rule: {name, when:{type:[...], max_usd, min_usd, reversible, target_ends_with:[...]}, verdict:"auto"|"ask"|"deny"}. First matching rule wins; anything unmatched needs approval. Call once without confirm to preview, then with confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesYes
confirmNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and handles most of it: API-key auth requirement, a preview/confirm safety flow, first-matching-rule-wins priority, and unmatched-rules-need-approval fallback. The one notable gap is whether saving replaces or appends to existing rules, which matters for a mutation.

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?

Front-loads the core action and packs the critical rule grammar, matching semantics, and confirm workflow into a few dense lines with no filler. The nested brace notation is slightly hard to parse but every sentence earns its place.

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?

For a mutation tool with no annotations and no output schema, it covers auth, rule format, evaluation semantics, and the confirm gate. The remaining ambiguity about replace-vs-merge behavior and error responses keeps it just short of fully complete.

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 0% and the rule object is an untyped generic object, yet the description decodes the full shape: the when-clause fields (type, max_usd, min_usd, reversible, target_ends_with) and the verdict enum (auto|ask|deny). The confirm parameter's purpose is also spelled out. This compensates well for the empty schema.

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?

States a specific verb+resource ('Save the user's rules'), which cleanly distinguishes it from the read-only sibling get_rules. It does not explicitly name a sibling alternative, but the write/read split is unambiguous from the description alone.

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?

Provides an explicit two-step workflow: 'Call once without confirm to preview, then with confirm=true,' which tells the agent exactly how to invoke it safely. It also flags the API-key prerequisite, though it gives no guidance on when to reach for this versus check_action or get_rules.

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.

Resources