Skip to main content
Glama

Check payload

check_payload
Read-onlyIdempotent

Test a synthetic request against guard-core's detection engine to confirm attack payloads are caught or diagnose why benign requests are flagged.

Instructions

Run one synthetic request through guard-core's real penetration-detection engine.

Use this to confirm that an attack payload is caught, or to explain why a benign request was flagged. Use validate_config instead to check a config, not a request.

Returns is_threat (bool), trigger_info (the matched parameter and pattern, empty when clean), threat_categories (for example sqli or xss), threat_scores (a score per category) and elapsed_ms. Verdicts come from the same detection path a live adapter runs. Read-only and sandboxed: the request is never sent anywhere and enable_redis is forced off so Redis is never touched. If guard-core is not installed, returns an object with an error key and a hint instead of raising.

This is the detection stage alone, not the whole middleware pipeline. A real request also passes IP rules, rate limiting, user-agent and cloud-provider checks, any of which can block it before detection runs, and a whitelisted IP skips detection entirely. A clean verdict here does not promise the request reaches the route, and a threat verdict does not promise a running app would block it.

The scan is bounded, so a payload past a cap is judged on the scanned prefix only: detection_max_scan_values caps values inspected (default 512), detection_max_scan_chars caps total characters scanned (default 65536), and detection_max_json_depth (default 32) caps how deep a JSON body is walked before the rest is scanned as one serialized value. These caps and the enhanced detection path apply from guard-core 3.15.0; versions reports what is installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body as a raw string, or a JSON object or array, which is serialized for you. Omit for a bodyless request
pathNoRequest path of the request to test/
queryNoQuery-string parameters as a JSON object of names to string values
configNoSecurityConfig fields to override guard-core's defaults, as a JSON object, to see how a setting changes the verdict. enable_redis is always forced off
methodNoHTTP method of the request to testGET
headersNoRequest headers as a JSON object of names to values. Names are matched case-insensitively

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, non-destructive, idempotent, closed-world), but the description adds substantial context beyond them: sandboxed execution, request never sent, enable_redis forced off, graceful error-object behavior when guard-core is missing, and the crucial scope caveat that this is detection alone and a clean verdict does not guarantee the request reaches the route.

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?

It is on the longer side, but it is front-loaded with the core action, and the warning paragraph about pipeline scope and the cap paragraph each carry distinct, non-redundant information an agent needs to interpret a verdict. Only the version-availability detail feels slightly peripheral.

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?

With annotations, a full input schema, and an output schema present, the description still proactively explains the return shape (is_threat, trigger_info, threat_categories, threat_scores, elapsed_ms) and the error path, so nothing needed to call or interpret the tool correctly 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?

Schema coverage is 100%, so the baseline is 3; the description adds real meaning on top by explaining that config overrides force enable_redis off and by naming the detection_max_scan_values/chars/json_depth caps that govern how payloads are judged. It stops short of walking each parameter, but the added semantic layer exceeds the schema.

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?

The first sentence states a specific verb and resource: run one synthetic request through guard-core's real penetration-detection engine. It is unambiguous and immediately distinguishable from the config-checking sibling it names.

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 two explicit use cases ('confirm that an attack payload is caught' or 'explain why a benign request was flagged') and routes the agent away from this tool with 'Use validate_config instead to check a config, not a request.' When-to-use and the alternative are both stated.

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