Skip to main content
Glama
x402-preflight-mcp

x402-preflight-mcp

by animus3d

json_config_preflight

Validate JSON or config data deterministically to catch syntax errors, missing required keys, secret leaks, and environment drift before deployment.

Instructions

[x402 $0.01 USDC on Base/Solana] Deterministic JSON/config preflight validator detecting syntax errors, missing required keys, secret leaks, and env drift.

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

Input Schema

NameRequiredDescriptionDefault
configNoParsed JSON object to validate
jsonTextNoRaw JSON text to parse and audit
requiredKeysNoRequired top-level or dot-path keys
_paymentSignatureNoOptional base64-encoded x402 v2 payment-signature header (overrides X402_PAYMENT_SIGNATURE env var).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the detection categories and the paid x402 model ($0.01 USDC on Base/Solana), which is genuinely useful context, but it says nothing about output shape, severity levels, or what happens when validation fails. 'Env drift' is asserted as a capability with no explanation of what environment it compares against.

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?

A single front-loaded sentence with the payment notice bracketed first and the capability list following. Nothing is redundant, though the price tag consumes a meaningful share of an already short description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-parameter tool with a nested object, zero required parameters, and no output schema, the definition leaves two real ambiguities: whether config or jsonText is the expected input, and what 'env drift' means given that no environment parameter exists. It is adequate to identify the tool but not fully sufficient to call it correctly.

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%, so each of the four parameters is already documented in the schema and the baseline of 3 applies. The description's mention of 'missing required keys' loosely maps to requiredKeys, but it adds no syntax, format, or precedence detail beyond the schema, and notably does not resolve when to use config vs jsonText.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Deterministic JSON/config preflight validator') and enumerates the four checks it performs (syntax, missing required keys, secret leaks, env drift). This is enough to separate it from siblings like mcp_tool_schema_validator or csv_json_reconcile, though no sibling is named explicitly.

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

Usage Guidelines2/5

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

The word 'preflight' implies use before deployment, but there is no explicit when-to-use statement, no when-not-to-use, and no named alternative. Nothing tells the agent whether to prefer this over mcp_tool_schema_validator or i18n_json_qa for overlapping JSON checks.

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