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. Free to start (60/hour per caller). Plans: 25 free checks a day without a key, 500 a day with a free key from https://pg1-ai-agent.vercel.app/keys, monthly plans and pay per check at https://pg1-ai-agent.vercel.app/pricing (check_agent_message and check_repo_trap share one quota).

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": "check_agent_message"
  }
}

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.6/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 so thoroughly: it lists the deterministic rule families checked, the 6 s fetch timeout and 4 s enrichment budget, the AGENT_MESSAGE_ENRICHMENT_INCOMPLETE fallback, verdict thresholds, excerpt masking, the no-storage privacy guarantee, and the 'no findings does not prove harmless' caveat. It also states rate limits (60/hour, 25/day, keyed plans) and quota sharing, which is exactly the behavioral context an agent needs before invoking.

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?

Purpose, timing and the input contract are front-loaded, and the dense rule enumeration contains no filler. The single-paragraph wall of semicolon-separated rule families is heavy to scan, but every clause carries substantive information.

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 security-check tool with three optional parameters and an output schema, the description covers everything an agent needs: inputs, fetch behavior, detection scope, verdict semantics, enrichment fallback, privacy, and cost/quota. Return-value detail can be left to the output schema, and it does not redundantly restate 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 100%, so the baseline is 3; the description earns extra by adding fetch semantics not in the schema — https-only, fetched once, private-address and no-redirect rules mirroring check_x402_endpoint, text/markdown or text/plain only, and the 64 KB cap. It also clarifies that kind is recorded and echoed but does not change which rules run, which is genuinely useful disambiguation.

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 description opens with a concrete verb and resource: a 'pre-read check for a message from another agent or a seller's skill.md' that catches prompt injection and wallet/payment manipulation. It distinguishes itself from siblings by referencing check_x402_endpoint for the URL-fetch rules and check_repo_trap for shared quota, so an agent can tell what this tool is and is not.

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?

It gives an explicit timing instruction ('Call it BEFORE your own model reads the content') and a clear parameter rule ('Give exactly one of text or url'), which is strong when-to-use guidance. It stops short of naming when to prefer a different sibling for other content types (e.g. check_agent_card, check_package), so alternatives are only partially covered.

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.