Skip to main content
Glama

Check an action against inline policy

trust_check_action
Read-onlyIdempotent

Evaluate a proposed action against evidence, source allowlists, data constraints and payment limits, returning ALLOW/BLOCK with reason codes. All enabled checks must pass: evidence cannot override an over-budget payment. Set action.type to payment to activate spending checks and pass its amount with remaining_budget; contract applies to data, not action. Use this gate before execution, trust_check_spend for budget alone, or trust_validate_data for structure alone. Enforce BLOCK and fail closed on errors. Source labels are unauthenticated; instruction scanning is a limited phrase heuristic. No action execution, wallet access, policy storage or decision history. Free, unauthenticated, stateless pilot: rules apply only to this call. Usage metadata is recorded; request bodies are not stored.

Input Schema

NameRequiredDescriptionDefault
dataNoJSON object to inspect; do not submit secrets or personal data.
actionYesProposed action; payment additionally requires amount and remaining_budget.
contractNoMap of dot-separated field paths to constraints, e.g. {"order.total":{"type":"number","min":0,"required":true}}. Inline rules apply only to this request.
evidenceNoCaller-supplied evidence labels. Presence is required by default; content and authenticity are not verified.
allow_extraNoWith a contract, false rejects top-level data keys not present in the contract. For nested dot paths keep true and enumerate leaf constraints.
trusted_sourcesNoOptional exact source allowlist. Every evidence source must be listed.
remaining_budgetNoCaller-supplied remaining budget; never read from a wallet or persisted by this service.
require_evidenceNoRequire at least one evidence item. Setting false intentionally skips the presence check.
allowed_merchantsNoOptional exact, case-sensitive merchant allowlist. An empty list blocks every merchant.
detect_instructionsNoScan JSON-serialized data for a small fixed phrase heuristic, with possible false positives and negatives.
per_transaction_limitNoOptional inclusive maximum amount per transaction.

Output Schema

NameRequiredDescriptionDefault
okYesThe operation completed; does not imply the verdict is ALLOW.
checksYesNames of the check families supported by this gate; optional checks run only when their inputs are present.
reasonsYesAll failed checks; empty when ALLOW.
serviceYesService that evaluated the request.
verdictYesAdvisory verdict. The integrator must prevent execution on BLOCK or any error.
versionYesDeployed implementation version.
warningYesSecurity and enforcement limitations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/non-destructive, and the description adds substantial context beyond them: no action execution, wallet access, policy storage or decision history; stateless per-call rules; unauthenticated source labels; a limited phrase heuristic with false positives/negatives; and that usage metadata but not request bodies is recorded. These are exactly the caveats an agent needs before relying on an ALLOW result.

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 with the core behavior and return values, then routing, then limits — a sensible order. It is a dense single paragraph, though, and a couple of points (contract scope, payment activation) could be split for scanability rather than compressed into the same block.

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 an 11-parameter, nested-object tool with an output schema, the definition covers activation conditions, precedence, failure mode, trust boundaries and statelessness. Nothing an agent needs in order to call it correctly or interpret the verdict is missing.

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 coverage the baseline is 3, but the description adds cross-parameter semantics the schema states only locally: action.type=payment activates spending checks and requires amount with remaining_budget, and contract governs data rather than action. It doesn't restate the merchant/allowlist coupling, which is already in the schema, so this sits just above baseline.

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: evaluate a proposed action against evidence, source allowlists, data constraints and payment limits, returning ALLOW/BLOCK with reason codes. The enumerated inputs and the return contract make it unmistakable against the sibling validation/spend tools 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?

Gives an explicit routing rule set: 'Use this gate before execution, trust_check_spend for budget alone, or trust_validate_data for structure alone', plus the operational directive to enforce BLOCK and fail closed. It also states a precedence constraint (evidence cannot override an over-budget payment), so the agent knows how the checks combine rather than just which tool to pick.

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