Skip to main content
Glama

check_compliance

Read-onlyIdempotent

Scans x402 code for high-severity compliance risks—hardcoded chain IDs, decimals, scaling, float amounts, and token addresses—and returns file:line severity findings for human review.

Instructions

Heuristically scan x402 code (a file or directory) for the high-severity classes: hardcoded chain id, hardcoded decimals, magic-number decimal scaling (10**N, 1eN, *1_000_000), human-decimal/float amounts, and literal asset/token addresses. Returns findings with file:line and severity. Heuristic — a documented default may be a false positive; every finding cites a location for human judgement. No network.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "check_compliance"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesA file or directory to scan.
maxFilesNoCap on files scanned (default 2000).
maxFindingsNoCap on findings returned (default 300).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful context beyond that: results are heuristic, documented defaults may be false positives, every finding carries file:line and severity, and 'No network' reinforces offline behavior.

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?

Front-loaded with the scan scope, then the finding classes, then the heuristic caveat. Dense but every clause carries information; the only mild redundancy is restating the offline nature already implied by openWorldHint=false.

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

Completeness4/5

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

With no output schema, the description does the work of explaining that findings include file:line and severity, which is enough for an agent to interpret results. For a three-parameter, single-path scanning tool this is close to complete, missing only volume/truncation behavior from the caps.

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 all three parameters are already documented, and the description adds only the clarification that the path may be a file or a directory. It says nothing about maxFiles or maxFindings, so baseline 3 is appropriate.

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 ('Heuristically scan') with a precisely bounded resource ('x402 code (a file or directory)') and enumerates the exact finding classes it looks for. The code-scanning focus is clearly separable from siblings like decode_402 or lint_scheme_spec, which operate on other artifacts.

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 enumerated finding classes implicitly tell the agent what the tool covers, and the heuristic caveat signals when results need human review. However, there is no explicit when-to-use/when-not guidance and no sibling is named as an alternative, so the agent must infer routing from the resource description alone.

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