Skip to main content
Glama

jev_gate_action

Read-only

Checks an action before execution to flag destructive, outward-facing, or credential-touching scope and mismatch with the user request, returning allow, confirm, or block.

Instructions

Advisory pre-flight check on an action you are about to take: judges whether it is destructive, outward-facing or credential-touching, how far it reaches, and how it relates to what the user asked for — then returns allow / confirm / block from a deterministic policy in code. NOT A SECURITY BOUNDARY. It is a judgment layer that catches plausible mistakes, and Jev is not hardened against adversarial text: an action or context written to argue for its own approval can shift the result. Never rely on it to contain untrusted input, and never let allow stand in for a real permission check. Use it just before something you cannot cheaply undo: deleting or overwriting files, git history rewrites, installs, deploys, messages, payments, anything touching an external system. Pass action as the concrete call, not a paraphrase: one line with the tool name and arguments, or the fields {tool, command, file_path, target_paths, …}, which scores scope better. Pass user_request in the user's own words, as a string or {latest, previous}. confirm means ask the user first. block means it looks both unrelated to the request and consequential; re-read the request rather than retrying.

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": {
      "action": "<action>",
      "user_request": "<user_request>"
    },
    "name": "jev_gate_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesExactly what you are about to do, including the tool name and its arguments.
contextNoOptional short context: the working directory, the task, the relevant prior step.
thresholdsNoOverride the server's configured gating thresholds for this call only.
user_requestYesWhat the user actually asked for, in their words.

Output Schema

NameRequiredDescriptionDefault
modelYesThe versioned model id that actually answered.
scopeYesWhat the scope reading was made of. `signals.in_scope` is `step + requested`.
usageYesToken usage. Jev charges for input tokens only.
reasonsYesWhich policy rules fired, in plain language.
signalsYesRaw P(yes) for each signal. Near 0.5 means the model is unsure.
decisionYesallow: proceed. confirm: ask the user first. block: do not run it.
latency_msYesWall-clock time for the underlying API call(s), including retries.
thresholdsYes
blast_radiusYesHow far the effects reach. 0 = read-only, 3 = production or other people.
signal_leansYesHow each signal was read: yes / no / uncertain, using the auto threshold.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed16 schema fields changedv0.7.0
    • addedInput schema / properties / action / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "description": "The action as fields. Preferred over a string: the scope questions compare its names against the prompts.",
      +    "properties": {
      +      "command": {
      +        "description": "Bash: the command as written.",
      +        "type": "string"
      +      },
      +      "content_chars": {
      +        "type": "number"
      +      },
      +      "content_head": {
      +        "description": "Write: the head of the content.",
      +        "type": "string"
      +      },
      +      "file_path": {
      +        "type": "string"
      +      },
      +      "input": {
      +        "additionalProperties": {},
      +        "description": "Anything else the tool was given.",
      +        "propertyNames": {
      +          "type": "string"
      +        },
      +        "type": "object"
      +      },
      +      "new_string": {
      +        "type": "string"
      +      },
      +      "old_string": {
      +        "type": "string"
      +      },
      +      "target_paths": {
      +        "default": [],
      +        "description": "Path-shaped arguments, relative to the working directory. Scope is judged against these.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "text": {
      +        "description": "The whole action as one line, when that is all you have.",
      +        "type": "string"
      +      },
      +      "tool": {
      +        "description": "The tool name, e.g. Bash, Write, or an mcp__ tool.",
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "tool"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / action / minLength
      Removed value: -1
    • removedInput schema / properties / action / type
      Removed value: -"string"
    • addedInput schema / properties / context / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "description": "Where the action is running.",
      +    "properties": {
      +      "cwd": {
      +        "type": "string"
      +      },
      +      "notes": {
      +        "description": "Anything else worth knowing: the task, the relevant prior step.",
      +        "type": "string"
      +      },
      +      "permission_mode": {
      +        "type": "string"
      +      },
      +      "subagent": {
      +        "description": "The subagent type, when this call is happening inside one.",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / context / description
      Previous value: -"Optional short context: the task, the relevant prior step."New value: +"Optional short context: the working directory, the task, the relevant prior step."
    • removedInput schema / properties / context / type
      Removed value: -"string"
    • addedInput schema / properties / user_request / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "description": "The user's request, as the current one plus what came before it.",
      +    "properties": {
      +      "latest": {
      +        "description": "The request that is current.",
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "previous": {
      +        "default": [],
      +        "description": "Earlier requests, oldest first. Context for the latest one.",
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "required": [
      +      "latest"
      +    ],
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / user_request / minLength
      Removed value: -1
    • removedInput schema / properties / user_request / type
      Removed value: -"string"
    • addedOutput schema / properties / blast_radius / properties / level
      Added value: +{
      +  "description": "The level the answer picked.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / blast_radius / properties / p_high
      Added value: +{
      +  "description": "P(level 2) + P(level 3). Absent when no probabilities came back.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / blast_radius / properties / p_level
      Added value: +{
      +  "description": "Probability of that level.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / blast_radius / properties / source
      Added value: +{
      +  "enum": [
      +    "probabilities",
      +    "expectation"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / blast_radius / required
      Previous value: -[
      -  "score",
      -  "confidence"
      -]New value: +[
      +  "score",
      +  "confidence",
      +  "level",
      +  "p_level",
      +  "source"
      +]
    • addedOutput schema / properties / scope
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What the scope reading was made of. `signals.in_scope` is `step + requested`.",
      +  "properties": {
      +    "mentions_target": {
      +      "description": "P(a request names what this action acts on).",
      +      "type": "number"
      +    },
      +    "requested": {
      +      "description": "P(a request asks for this action, or names its target and this operation).",
      +      "type": "number"
      +    },
      +    "same_task_area": {
      +      "description": "P(this action touches the part of the project the request is about).",
      +      "type": "number"
      +    },
      +    "source": {
      +      "enum": [
      +        "probabilities",
      +        "expectation"
      +      ],
      +      "type": "string"
      +    },
      +    "step": {
      +      "description": "P(an ordinary step of the requested work, not named in any request).",
      +      "type": "number"
      +    },
      +    "unrelated": {
      +      "description": "P(no request asks for this and the work does not need it).",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "unrelated",
      +    "step",
      +    "requested",
      +    "mentions_target",
      +    "same_task_area",
      +    "source"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "decision",
      -  "reasons",
      -  "signals",
      -  "signal_leans",
      -  "blast_radius",
      -  "thresholds",
      -  "model",
      -  "usage",
      -  "latency_ms"
      -]New value: +[
      +  "decision",
      +  "reasons",
      +  "signals",
      +  "signal_leans",
      +  "blast_radius",
      +  "scope",
      +  "thresholds",
      +  "model",
      +  "usage",
      +  "latency_ms"
      +]
  2. First observedv0.1.4

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint/openWorldHint), it discloses the decision mechanism (deterministic policy in code) and, unusually, its own limits: it is explicitly not a security boundary, is shiftable by text written to argue for its own approval, and must not substitute for a real permission check. That is exactly the adversarial-input caveat an agent needs before trusting an 'allow'.

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?

Front-loaded and dense: capability, scope limit, usage trigger, argument shape, and verdict meanings in that order, with no filler sentences. The security caveat runs three clauses and slightly overlaps with the usage section, but each clause adds a distinct failure mode rather than repeating.

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

Completeness5/5

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

For a four-parameter tool with nested objects and an output schema, everything an agent needs is present: when to invoke it, what to pass and in what form, how to read each verdict, and what the tool cannot be trusted to do. Return-value formatting is correctly left to the output schema.

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%, so the baseline is 3, but the description adds operative guidance the schema does not: pass the concrete call rather than a paraphrase, and prefer the field form {tool, command, file_path, target_paths} over a string because it scores scope better. It also specifies user_request should be in the user's own words, as a string or {latest, previous}.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and object: an advisory pre-flight check that judges destructiveness, outward reach, credential-touching, scope, and relation to the user's request, returning allow/confirm/block. That is far more precise than a restated name. It does not, however, distinguish itself from plausible siblings like jev_evaluate or jev_verify, so an agent must still infer which judgment tool applies when.

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?

It gives an explicit trigger ('just before something you cannot cheaply undo') with a concrete enumeration — deletes/overwrites, git history rewrites, installs, deploys, messages, payments, external systems — which implicitly excludes cheaply reversible actions. It also tells the agent what to do with each verdict: confirm means ask the user first, block means re-read the request rather than retrying.

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