Skip to main content
Glama

Safety check before acting on a fact

check_before_act
Read-only

Verify stored memory is current, adequately confident, and conflict-free before an autonomous action; returns SAFE or BLOCKED with reasons to prevent irreversible mistakes.

Instructions

Ask whether it's SAFE to take an autonomous action based on what memory knows about subject. Returns SAFE, or BLOCKED with explicit reasons — an unresolved conflict, confidence below the bar, a value that's gone stale, or one that just changed. Call this before any irreversible action (a payment, an email, a config change) so the agent never silently acts on bad memory. Tune the policy via the params (e.g. min_confidence=0.9, max_staleness_days=90 for high-stakes actions).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "subject": "<subject>"
    },
    "name": "check_before_act"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idNo
subjectYes
user_idNodefault
agent_idNo
min_confidenceNo
require_activeNo
block_on_flaggedNo
max_staleness_daysNo
block_on_recent_change_daysNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover readOnlyHint and openWorldHint, and the description goes beyond them by enumerating the actual blocking causes (unresolved conflict, sub-threshold confidence, stale value, recent change) and the policy-tuning surface. It does not discuss latency, caching, or what the reasons payload contains in detail, but the behavioral picture is solid.

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?

Four sentences, front-loaded with the question the tool answers, then the return contract, then the trigger condition, then tuning. The policy-tuning example is attached to the most decision-relevant parameters, so nothing here is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is a bonus rather than a requirement, and the safety contract is well covered. The gap is the parameter story: for a 9-parameter, 0%-coverage schema, the agent still cannot tell what the identity parameters (user_id, agent_id, run_id) scope or what the boolean policy flags default-do without guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Nine parameters at 0% schema coverage, yet the description only illustrates two (min_confidence, max_staleness_days) via an example, and never explains require_active, block_on_flagged, block_on_recent_change_days, run_id, user_id, or agent_id. With no schema text to lean on, the majority of the parameter surface remains undefined for the agent.

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 and resource ('Ask whether it's SAFE to take an autonomous action') and names the memory-scoped subject it evaluates. The return contract (SAFE vs BLOCKED) and the four blocking conditions make it immediately distinguishable from recall-style siblings.

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?

Gives an explicit trigger ('Call this before any irreversible action') with three concrete examples (payment, email, config change) and the rationale. It stops short of naming sibling alternatives such as safe_recall or attest, or stating when-not to call it, so it is clear context without full routing guidance.

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