Skip to main content
Glama

arai_add_guard

Register a persistent rule to enforce on AI tool calls, preventing actions like writing to restricted paths or skipping tests. Rules take effect immediately and are logged.

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/'.
Behavior3/5

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

With no annotations, the description carries the burden. It explains that rules are parsed like CLAUDE.md instructions, stored locally, and take effect on the next PreToolUse hook. However, it does not disclose conflict resolution behavior (e.g., if a rule already exists) or any side effects beyond audit logging for the reason field.

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 with no wasted words. It front-loads the purpose and immediately provides usage context and behavioral details.

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?

The tool has no output schema and no annotations. The description covers purpose, usage, and behavioral details (parsing, storage, timing). However, it omits what the tool returns (e.g., success message or guardrail ID) and does not mention any error conditions.

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?

Since schema description coverage is 100%, the baseline is 3. The tool description includes example rules that overlap with the parameter description's examples, adding no new semantic information beyond what the input schema already provides.

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 verb 'Register' and resource 'guardrail', and the phrasing 'that Δ€rai will enforce on subsequent tool calls' specifies the scope and effect. It also implicitly distinguishes from siblings like arai_list_guards (list) and arai_check_action (check).

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 for the rest of this project' and provides examples. It does not explicitly state when not to use or mention alternatives, but the context is clear enough for a mid-session rule addition.

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