Skip to main content
Glama

x402-path-validator

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoBase to process
pathNoPath to process

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations present, the description bears the full behavioral burden. It does disclose meaningful behavior — the rejection rules and the normalized-relative-path return — but never states what a rejection actually looks like (thrown error, error string, or null/false), nor whether inputs are mutated. For a mutation-free validator this is acceptable but incomplete.

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 sentences, front-loaded with the security purpose before the usage hint. Slightly redundant in re-prefixing the tool name, but there is no filler or wasted sentence.

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, no-annotation, no-output-schema validator, the description covers the core: what it rejects and what it returns. Gaps remain around the 'base' parameter's role and the failure/return contract on rejection, which an agent needs to invoke and interpret results reliably.

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 nominally 100%, so the baseline is 3 even without description-side param detail. The description explains what 'path' is used for (traversal/NUL/absolute-escape checks, normalization) but never clarifies the relationship between 'base' and 'path', whose schema descriptions are tautological ('Base to process').

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?

The description states a specific verb and resource — it validates/sanitizes a path for security — and names the exact threat classes it rejects (traversal '..', NUL bytes, absolute-path escape) plus the output (a normalized relative path). An agent knows precisely what this tool does and what it returns without opening the schema. No sibling tool overlaps this security-pathing purpose.

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 phrase '防护工具' before filesystem operations (a guard tool used before filesystem operations) gives implied usage context, so the agent can infer when it should be called. However, there is no explicit when/when-not statement and no named alternative, so the guidance stays at the implied level.

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