Skip to main content
Glama

PG1 Sovereign Threat Intelligence

check_agent_message

PG1 Sovereign Threat Intelligence: a pre-read check for a message from another agent or a seller's skill.md. Call it BEFORE your own model reads the content, to catch prompt injection and wallet or payment manipulation. Give exactly one of text (up to 64 KB) or url (https only; fetched once with the same private-address and no-redirect rules as check_x402_endpoint, 6 s timeout, text/markdown or text/plain only, up to 64 KB), and optionally kind (skill_md, message or other). PG1's own deterministic rules, no AI model: instruction override and role hijack (ignore previous instructions, "you are now", developer or jailbreak modes, claims to come from a system, an admin, an AI company or the wallet's developer); hidden content (zero-width and bidirectional control characters, Unicode tag characters, instructions in HTML comments, mixed-script look-alike words, long base64 or hex blobs, data: URIs; base64, hex and tag-character text is decoded and checked too); exfiltration (requests to reveal or send environment variables, keys, seed phrases, .env or ~/.ssh; image or link URLs carrying templated or secret-like values; curl | sh); wallet and payment manipulation (sign, approve, transfer or bridge instructions, unlimited allowances, a changed payTo or recipient, raised spending limits, presign-guard or other checks turned off); tool hijack (use your own tools or shell, install packages). Then, within 4 s, up to 5 domains and 5 wallet addresses named in the content go through check_domain_age, check_hostname_reputation, check_wallet_sanctions and check_wallet_age; if that does not finish, the rule results come back anyway (AGENT_MESSAGE_ENRICHMENT_INCOMPLETE). Returns verdict malicious (any high-severity finding: hidden tag characters, a secret-exfiltration instruction, a payment redirect, a sanctioned address), suspicious (medium findings only) or no_findings ("checked: no findings"), each finding with its reason code, severity, line and a masked excerpt (120 characters at most; keys, tokens and seed phrases masked), plus the URLs, domains and wallet addresses found and the sha256 and byte length of what was checked. No findings does not prove the content is harmless. The content is never stored; only its sha256, length, kind, verdict and reason codes are logged. Always free (60/hour per caller).

Input Schema

NameRequiredDescriptionDefault
urlNoAn https URL serving the content as text/markdown or text/plain (up to 65536 bytes). Give this or text, not both.
kindNoWhat the content is: skill_md, message or other. Recorded and echoed; the rules are the same for every kind.other
textNoThe message or skill.md content, up to 65536 bytes of UTF-8. Give this or url, not both.

Output Schema

NameRequiredDescriptionDefault
urlNo
kindYes
noteNo
urlsYes
bytesYes
checksNoWhich underlying sources were checked for this result and whether each one completed.
sha256YesLowercase hex SHA-256 of the UTF-8 content checked.
sourceYes
statusNo"unknown" whenever a source needed for this answer timed out, errored, or was skipped - never "no_flags" in that case.
domainsYes
reasonsNoMachine-readable reason codes for anything flagged in this result. Empty when nothing was flagged.
summaryYes"checked: no findings", or the number of findings by severity.
verdictYes
findingsYes
enrichmentNoResults of PG1's domain and wallet checks on what the content names: ran, budget_ms, timed_out, note, domains[], wallets[].
request_idNoUUID for this request, also sent as the X-Request-Id response header.
content_typeNo
rules_versionNo
wallet_addressesYes
findings_truncatedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: deterministic rules (no AI model), the 4 s enrichment window with an explicit fallback code AGENT_MESSAGE_ENRICHMENT_INCOMPLETE, verdict tiers, data retention (content never stored, only sha256/length/kind/verdict logged), and a rate limit (60/hour, free). Fetch policy (https only, private-address blocking, no redirects, 6 s timeout) is also disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and the long rule enumeration is at least parenthetically organized, but the description runs several hundred words for a 3-parameter tool. Much of the exhaustive detection taxonomy (zero-width chars, data: URIs, curl | sh, presign-guard) does not help an agent decide to call the tool and bloats the scan.

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?

Output schema exists, yet the description still summarizes verdicts, finding fields (reason code, severity, line, masked excerpt) and the caveat that no_findings is not proof of safety. Coupled with logging and rate-limit disclosures, an agent has everything needed to call and interpret it.

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 already 100%, so the baseline is 3, but the description reinforces the exactly-one-of text/url constraint and adds fetch semantics (private-address/no-redirect, 6 s timeout, allowed MIME types) beyond the schema. It clarifies the kind enum is recorded only and does not change the rules.

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: a pre-read injection/manipulation check for a message from another agent or a seller's skill.md. The scope (content inspection, not URL/domain/wallet reputation) separates it cleanly from siblings like check_agent_card, check_x402_endpoint and the check_* reputation tools.

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

Usage Guidelines4/5

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

"Call it BEFORE your own model reads the content" gives an explicit timing rule, and the reference to check_x402_endpoint's fetch rules anchors it against a sibling. It does not explicitly say when to skip it (e.g. vs check_agent_card for agent cards), so usage is clear but not fully exclusionary.

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.