Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as minia2a — hosted x402 API marketplace (HTTP). If you published it, claim ownership there.

x402-path-validator

x402-path-validator: 路径安全校验——拒绝 traversal(..)/NUL/绝对路径逃逸,返回规范化相对路径。文件系统操作前的防护工具。

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": "x402-path-validator"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNo
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / required
      Added value: +[
      +  "path"
      +]
  2. Changed2 schema fields changed
    • removedInput schema / properties / base / description
      Removed value: -"Base to process"
    • removedInput schema / properties / path / description
      Removed value: -"Path to process"
  3. Changed2 schema fields changed
    • addedInput schema / properties / base
      Added value: +{
      +  "description": "Base to process",
      +  "type": "string"
      +}
    • addedInput schema / properties / path
      Added value: +{
      +  "description": "Path to process",
      +  "type": "string"
      +}
  4. Added

TDQS

B3.4/5.0
Behavior3/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 disclose the rejection rules (traversal, NUL, absolute escape) and that output is a normalized relative path. It leaves the critical failure mode unstated: whether an invalid path throws, returns an error object, or returns a boolean, and whether the check is pure or has side effects.

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?

Two compact clauses, front-loaded with the rejection rules and followed by the use case; no filler. Repeating the tool name as a prefix is mildly redundant but harmless.

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 two-parameter validator with no annotations and no output schema, the description covers the threat model and return shape but omits error behavior and the meaning of `base`. An agent could invoke it, but could not confidently handle a rejection or know how `base` affects the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for both parameters, so the description must compensate and does not. It never explains the `base` parameter at all, even though base is what determines whether a path counts as an 'absolute escape' and what the normalized relative path is relative to.

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 and resource: validates paths for security, rejecting traversal (..), NUL bytes, and absolute-path escapes, returning a normalized relative path. The 'before filesystem operations' framing implicitly separates it from path-querying siblings like x402-json-path or x402-xml-path, 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 Guidelines4/5

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

Gives clear usage context: it is a guard to run before filesystem operations, which tells an agent when to reach for it. It stops short of stating what to do on validation failure, when the tool is unnecessary, or which alternative to use for non-filesystem paths.

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.

Resources