Skip to main content
Glama

verify_safety

Read-onlyIdempotent

[PURPOSE] Independent Execution Safety Gate for destructive commands, SQLi/shell injection detection, and mathematical logic evaluation (1D Wasserstein distance for context/hallucination drift, Shannon entropy gain, symbolic/numerical matrix solver, groundedness check). [CALL] Prior to executing proposed bash/DB commands or verifying math/distributions. [SKIP] Benign natural text conversation or memory delivery gating (handled by vault_access Output Gate). [VS] Pre-execution guard; does not execute target command. [RETURN] {isCertified:bool,riskLevel:number,violations:string[]}. [SIDE] None (read-only).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "verify_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNoOperation parameters. For wasserstein: { distributionA (or u, p, a, distA): number[], distributionB (or v, q, b, distB): number[], supports?: number[], u_weights?: number[], v_weights?: number[] }. For matrix_solve: { matrixA (or matrix, A): number[][], vectorB (or vector, b)?: number[], operation?: "solve"|"determinant"|"inverse"|"eigenvalues"|"svd" }. For entropy: { probabilities (or p, probs): number[] }. For groundedness: { output_text: string }.
operationNoVerification or math operation.safety_check
actionProposalNoCommand, script, or action proposal to verify.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / operation / enum
      Previous value: -[
      -  "safety_check",
      -  "wasserstein",
      -  "entropy",
      -  "matrix_solve",
      -  "groundedness"
      -]New value: +[
      +  "safety_check",
      +  "wasserstein",
      +  "entropy",
      +  "matrix_solve",
      +  "groundedness",
      +  "unblock"
      +]
    • changedInput schema / properties / params / description
      Previous value: -"Optional operation-specific math or safety parameters."New value: +"Operation parameters. For wasserstein: { distributionA (or u, p, a, distA): number[], distributionB (or v, q, b, distB): number[], supports?: number[], u_weights?: number[], v_weights?: number[] }. For matrix_solve: { matrixA (or matrix, A): number[][], vectorB (or vector, b)?: number[], operation?: \"solve\"|\"determinant\"|\"inverse\"|\"eigenvalues\"|\"svd\" }. For entropy: { probabilities (or p, probs): number[] }. For groundedness: { output_text: string }."
    • addedInput schema / properties / params / properties
      Added value: +{
      +  "distributionA": {
      +    "description": "First 1D distribution or sample array (aliases: u, p, a, distA, source).",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "distributionB": {
      +    "description": "Second 1D distribution or sample array (aliases: v, q, b, distB, target).",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "matrixA": {
      +    "description": "2D numeric matrix A (aliases: matrix, A).",
      +    "items": {
      +      "items": {
      +        "type": "number"
      +      },
      +      "type": "array"
      +    },
      +    "type": "array"
      +  },
      +  "output_text": {
      +    "description": "Text to evaluate for citation groundedness.",
      +    "type": "string"
      +  },
      +  "p": {
      +    "description": "Alias for distributionA or entropy probabilities.",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "probabilities": {
      +    "description": "Probability distribution array for Shannon entropy calculation.",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "q": {
      +    "description": "Alias for distributionB.",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "supports": {
      +    "description": "Optional 1D support coordinates for Wasserstein distance.",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "u": {
      +    "description": "Alias for distributionA (first 1D distribution or sample values).",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "v": {
      +    "description": "Alias for distributionB (second 1D distribution or sample values).",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  },
      +  "vectorB": {
      +    "description": "Right-hand side vector B for linear system A*x = B (aliases: vector, b).",
      +    "items": {
      +      "type": "number"
      +    },
      +    "type": "array"
      +  }
      +}
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description confirms and extends this with [SIDE] None (read-only) plus [VS] does not execute the target command and a concrete return shape. It stops short of covering failure behavior, what riskLevel thresholds mean, or the semantics of the 'unblock' operation, so it is strong but not exhaustive.

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?

Bracketed section tags make it scannable and front-loaded, with no filler sentences. The parenthetical catalog of math operations is dense and slightly crammed, but each clause carries routing or behavioral information.

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?

For a 3-parameter tool with a nested params object, the definition covers purpose, timing, side effects, and return shape even without an output schema. The main gap is that one enum value ('unblock') has no explanation of what it does or when to use it.

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?

Schema description coverage is 100%, including per-operation parameter shapes and aliases, so the baseline is 3. The description adds little beyond restating the operation families, and notably never explains the 'unblock' operation or 'safety_check' semantics, leaving those to the enum name alone.

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 — an independent pre-execution safety gate — and enumerates exactly what it checks: destructive commands, SQLi/shell injection, Wasserstein drift, Shannon entropy, matrix solving, and groundedness. The [VS] tag explicitly distinguishes it from the output-gating sibling vault_access, so an agent can route without opening the schema.

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?

The [CALL] tag gives the trigger condition (before executing bash/DB commands or verifying math/distributions) and [SKIP] names both the exclusion and the alternative handler (benign conversation, memory delivery via vault_access Output Gate). [VS] further clarifies it is a guard, not an executor, which prevents misuse.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources