Skip to main content
Glama

x402-path-validator

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

Input Schema

NameRequiredDescriptionDefault
baseNo
pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / base / description
      Removed value: -"Base to process"
    • removedInput schema / properties / path / description
      Removed value: -"Path to process"
  2. 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"
      +}
  3. Added

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations the description carries the full burden, and it does disclose real behavior: which inputs are rejected and that a normalized relative path is returned. It omits how rejection is signalled (thrown error vs. error return) and whether the operation is pure/read-only, which keeps it out of 5 territory.

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 tightly packed sentences, front-loaded with the tool name and core purpose, then the guard-tool context. Efficient overall, with only minor waste in repeating the tool name as a prefix already present in the name field.

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 2-parameter tool with no annotations, no output schema, and no schema descriptions, the description covers purpose, rejection rules, and output shape, but leaves 'base' semantics and the failure mode unspecified. Adequate as a minimum-viable definition, not complete.

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 and the description never defines them. 'path' can be inferred from the context, but 'base' — clearly the containment root the escape check resolves against — is entirely unexplained, leaving the caller to guess its role relative to the returned normalized path.

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?

The description states a specific verb+resource ('path safety validation') and enumerates the exact threat classes it rejects — traversal (..), NUL bytes, absolute-path escape — plus its output ('normalized relative path'). That is far more concrete than a name restatement, though it does not explicitly distinguish itself from other validator-family siblings in the catalog.

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 a clear usage context: 'a guard tool before filesystem operations' tells the agent when to call it. It stops short of naming alternatives or stating when it should be skipped (e.g., for already-trusted paths), so it does not reach the explicit when/when-not bar of a 5.

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