Skip to main content
Glama

Evaluate Proposed Action Policy

astrix_evaluate_policy
Read-onlyIdempotent

Evaluate a proposed ActionIntent against Astrixfile.ax policies in the opened repository to return allowed, denied, and requires_approval booleans with an optional reason before action execution.

Instructions

Evaluate a proposed ActionIntent against the Astrixfile.ax policies in the opened repository and return allowed, denied, and requires_approval booleans with an optional reason. Use this before carrying out a proposed action; it evaluates policy but does not execute the action. For changed-file impact use astrix_get_blast_radius, and for selected test execution use astrix_run_impacted_tests. The required intent object contains actor.type, target.env, modified_files, and diff.modifies_tests (the string "true" or "false"); set approved=true only when approval has already been recorded.

Input Schema

NameRequiredDescriptionDefault
intentYes

Output Schema

NameRequiredDescriptionDefault
deniedYesWhether an explicit policy rule denies the action.
reasonNoExplanation of the policy decision, when available.
allowedYesWhether policy permits the proposed action, including any approval requirement.
requires_approvalYesWhether policy requires approval before the action may proceed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.3.3
    • changedInput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedInput schema / properties / intent
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "actor": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "id": {
      +          "description": "Optional actor identifier.",
      +          "type": "string"
      +        },
      +        "type": {
      +          "description": "Actor category evaluated by policy, for example autonomous_llm or human.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "approved": {
      +      "description": "Whether the required human approval has already been recorded.",
      +      "type": "boolean"
      +    },
      +    "diff": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "modifies_tests": {
      +          "description": "Whether the proposed diff modifies test files, represented as the string true or false.",
      +          "enum": [
      +            "true",
      +            "false"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "modifies_tests"
      +      ],
      +      "type": "object"
      +    },
      +    "modified_files": {
      +      "description": "Repository-relative paths the proposed action would modify.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "target": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "env": {
      +          "description": "Target environment, for example staging or production.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "env"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "actor",
      +    "target",
      +    "modified_files",
      +    "diff"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / required
      Added value: +[
      +  "intent"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "allowed": {
      +      "description": "Whether policy permits the proposed action, including any approval requirement.",
      +      "type": "boolean"
      +    },
      +    "denied": {
      +      "description": "Whether an explicit policy rule denies the action.",
      +      "type": "boolean"
      +    },
      +    "reason": {
      +      "description": "Explanation of the policy decision, when available.",
      +      "type": "string"
      +    },
      +    "requires_approval": {
      +      "description": "Whether policy requires approval before the action may proceed.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "allowed",
      +    "denied",
      +    "requires_approval"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description still adds real value: it clarifies the tool evaluates but never executes, and that approved=true must only be set when approval is already recorded. It does not cover failure modes or error behavior, so it stops short of a 5.

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?

Three dense sentences that front-load the action and outputs, then prerequisites, then routing. No filler, though the intent-field enumeration makes the final sentence long and slightly hard to scan.

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?

A nested, single-parameter mutation-lookalike gate tool with an output schema present; the description supplies the intent shape, the approval precondition, and the non-execution guarantee. Return values are already in the output schema, so the remaining gaps are minor.

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?

Top-level schema description coverage is 0%, and the single nested intent object is the whole payload, so the description carries the burden well: it enumerates actor.type, target.env, modified_files, and diff.modifies_tests, and flags the counterintuitive string "true"/"false" enum that is easy to get wrong. Nested field descriptions in the schema duplicate some of this, keeping it from a 5.

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?

Specific verb (evaluate) plus resource (a proposed ActionIntent against Astrixfile.ax policies), and it names the exact outputs (allowed, denied, requires_approval with optional reason). It is cleanly differentiated from the two siblings by scoping itself to policy evaluation rather than impact analysis or test execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to call it ("Use this before carrying out a proposed action") and what it is not ("does not execute the action"). It also routes to the right alternatives by name: astrix_get_blast_radius for changed-file impact and astrix_run_impacted_tests for selected test execution.

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