Skip to main content
Glama
x402-preflight-mcp

x402-preflight-mcp

by animus3d

dependency_typosquat_audit

Scans npm package.json and Python requirements.txt for typosquatting, unpinned versions, git/tarball URLs, and risky install hooks to catch dependency supply-chain risks before install.

Instructions

[x402 $0.03 USDC on Base/Solana] Scans npm package.json and Python requirements.txt for Levenshtein typosquats, unpinned ranges, git/tarball URLs, and risky install hooks.

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

Input Schema

NameRequiredDescriptionDefault
ecosystemNonpm or pypi
packageJsonNoRaw package.json string
dependenciesNoMap of package name to version spec
requirementsTxtNoRaw requirements.txt string
_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

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load; it does add genuinely non-obvious context by disclosing the x402 payment cost and settlement chains, which an agent would otherwise not anticipate. However, it omits whether payment is mandatory, whether the scan is purely read-only, and what happens on missing or malformed input — meaningful gaps for a tool with zero annotation coverage.

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 dense sentence that front-loads the payment tag ahead of the actual purpose, which is slightly unfortunate ordering but still compact. Every clause (detection classes) earns its place; only the bracketed cost banner is arguably better placed at the end.

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

Completeness2/5

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

No output schema exists, yet the description says nothing about what a scan returns, so an agent cannot anticipate the result shape. With five all-optional parameters and three alternative input modes, the definition also fails to explain which inputs to supply or how they combine — a significant omission for a tool of this complexity.

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 coverage is 100%, so the schema already defines all five parameters, including the payment-signature field. The description's mention of npm and Python ecosystems reinforces the ecosystem parameter but adds no format or precedence guidance (e.g., packageJson vs. dependencies map). Baseline 3 applies when the schema does the heavy lifting.

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 ("Scans") plus precise resources (npm package.json, Python requirements.txt) and enumerates exactly what it detects: Levenshtein typosquats, unpinned ranges, git/tarball URLs, risky install hooks. That level of specificity distinguishes it cleanly from every sibling in the list, none of which perform dependency-manifest typosquat analysis.

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

Usage Guidelines3/5

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

The description implies the appropriate context (auditing npm/PyPI manifests before install) and names the two supported ecosystems, but never states when to prefer this over alternatives such as github_actions_supplychain_pin, nor any prerequisites. Usage is inferred from the scan targets rather than stated.

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