Skip to main content
Glama

Create rule

create_rule

Store a standing rule: a condition and the conclusion or action that applies when it holds (e.g. a project constraint or a convention).

The rule is saved as active in NEXUS's rule registry and returned by
list_rules. Its confidence decreases over time unless it is re-verified
with affirm_rule.

Args:
    name: Short descriptive name for the rule.
    condition: When the rule applies, in natural language.
    action: The conclusion or action that applies when the condition
        holds, in natural language.
    domain: Optional category for the rule (default 'general').
    confidence: Initial confidence weight in [0.0, 1.0] (default 1.0).

Input Schema

NameRequiredDescriptionDefault
nameYes
actionYes
domainNo
conditionYes
confidenceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false), so the bar is lower. The description still adds substantive behavior: the rule is persisted as active in NEXUS's rule registry, is retrievable via list_rules, and its confidence decays over time unless re-verified — none of which the annotations 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?

Front-loaded with the concept and lifecycle, then a clean Args block; each line earns its place. It is slightly longer than strictly needed, but there is no filler or repetition.

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 5-parameter mutation tool with no output schema, the description covers what the tool does, where the result lives, and how it ages. It omits any mention of authorization or failure modes, but nothing essential for calling it correctly is missing.

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 carries the full burden, and it does: it explains each of the five parameters semantically (condition = when the rule applies, action = the conclusion when it holds, confidence as a weight in [0.0, 1.0]). The only blemish is that it says domain defaults to 'general' while the schema declares a null default.

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 (Store) and a precisely defined resource: 'a standing rule: a condition and the conclusion or action that applies when it holds.' The definitional gloss (condition + action) distinguishes it from sibling writers like store_fact and store_procedure, and it explicitly ties the result to list_rules and affirm_rule.

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?

It gives examples of when this applies ('a project constraint or a convention') and points to affirm_rule for re-verification, which is real routing guidance. It stops short of explicitly saying when to prefer create_rule over store_fact or store_procedure, so there is no true when-not clause.

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