Skip to main content
Glama

action_guard

Read-only

Apply the Brain OS policy table to a risk assessment to determine if an action should be allowed, require confirmation, or be blocked.

Instructions

Apply the Brain OS policy table to a risk assessment. Takes the output of risk_assess plus the concrete action type and returns a policy decision: allow (proceed), ask (stop and get explicit user confirmation), or block (do not proceed). Pure TypeScript — no LLM call. Policies in order: private_to_public → block; critical risk → block; force-push → ask; npm publish → ask; security boundary → ask; irreversible → ask; high risk → ask; hard-to-reverse external → ask; medium + requires_confirmation → ask; else → allow. Always audit what was decided and why.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_idNoBrain OS entity this action is associated with.
assessmentYesThe full output of risk_assess.
action_typeYesThe concrete action being guarded, e.g. 'npm publish', 'git push origin main', 'force push', 'write ROADMAP.md'.
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses that the tool is 'Pure TypeScript — no LLM call,' lists the exact policy decision order, and explains the three possible outcomes. The 'Always audit what was decided and why' note adds behavioral context about expected follow-through, significantly enriching the annotation-only safety profile.

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 front-loaded with purpose, then efficiently enumerates the entire policy decision table in a compact colon-separated list. Every sentence contributes essential information—purpose, inputs, computational nature, and policy order—with 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?

The description covers the core decision logic, output values, and policy ordering, sufficient for an agent to invoke the tool. However, it does not specify the exact return JSON shape (e.g., fields beyond decision/reason), and the 'Always audit' statement is ambiguous as to whether the tool itself logs or the agent must do so. Given no output schema, slightly more explicit return-field documentation would make this 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?

With 100% schema description coverage, the schema already documents the parameters. The description adds meaning by clarifying that assessment must be the full output of risk_assess and by giving concrete examples for action_type ('npm publish', 'git push origin main'). It does not mention entity_id, but the schema covers it, so the incremental value is solid but not maximal.

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 opens with a specific action: 'Apply the Brain OS policy table to a risk assessment.' It clearly names the resource (policy table), the input (risk assessment), and the output (allow/ask/block decision). This distinguishes it from sibling risk_assess, which produces the assessment, and decision_check/review tools.

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 states it 'Takes the output of risk_assess plus the concrete action type,' establishing a clear pipeline context and when to use it. It does not explicitly name alternatives or when-not-to-use cases, but the dependency on risk_assess and the detailed policy ordering provide clear usage context.

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/brainOS-HQ/brain-os'

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