Skip to main content
Glama

arai_add_guard

Add a guardrail to enforce a new rule on subsequent tool calls. Useful for persistent constraints like 'never edit /etc' or 'always run tests before push'.

Instructions

Register a new guardrail that Δ€rai will enforce on subsequent tool calls. Use when you discover a rule mid-session that should persist for the rest of this project (e.g. 'never write to /etc', 'always run tests before push'). The rule is parsed the same way CLAUDE.md instructions are and stored locally β€” it takes effect on the very next PreToolUse hook.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoOptional rationale β€” why this rule is being added. Recorded in the audit log so a human reviewer can see the agent's justification.
ruleYesThe rule, phrased as an imperative. Examples: 'Never force-push to main', 'Always run pytest before committing', 'Never edit files in vendor/'.
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the rule is parsed like CLAUDE.md instructions, stored locally, and takes effect on the next PreToolUse hook, providing important behavioral context.

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 three sentences, front-loaded with the core purpose, and every sentence adds necessary information without redundancy.

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 simple 2-param tool with no output schema, the description covers purpose, usage, and behavior adequately. It could mention error handling or limits, but overall it is 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 100% with descriptions, but the description adds value by giving examples for 'rule' and explaining that 'reason' is for audit log, enhancing understanding beyond the schema.

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 description clearly states the tool registers a new guardrail for enforcement, using a specific verb ('register') and resource ('guardrail'). It distinguishes itself from siblings like arai_list_guards (listing) and arai_check_action (checking).

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 explicitly says 'Use when you discover a rule mid-session that should persist' and provides examples, giving clear context. It does not explicitly state when not to use, but the purpose is well-defined.

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

Install Server

Other Tools

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/taniwhaai/arai'

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