Skip to main content
Glama

pathchk

Read-only

Validate path name components for portability by checking length, character set, and existence. Use before creating or accessing paths.

Instructions

Validate path name components for portability (length, character set, existence). Read-only, no side effects. Returns JSON with validation result. Use to verify paths before creating or using them. Not for path resolution — use 'realpath' to resolve to absolute canonical form. See also 'realpath'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rawNoWrite validation rows without a JSON envelope.
pathsYesPath strings to validate.
portableNoRequire portable POSIX filename characters.
exit_codeNoReturn exit code 1 when any path is invalid.
max_path_lengthNoMaximum path string length.
max_component_lengthNoMaximum path component length.
Behavior4/5

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

Annotations already declare readOnlyHint=true, and description adds 'Read-only, no side effects' and 'Returns JSON with validation result'. Does not detail error handling or output structure, but sufficient for a read-only validation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each serving a distinct purpose: purpose, characteristics, and usage guidance. No redundant or extraneous text.

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?

Given 6 parameters and no output schema, the description provides an overview and usage context. Lacks details on the structure of the JSON result, but the tool's simplicity and schema coverage compensate.

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 baseline is 3. Description mentions validation aspects (length, character set, existence) which loosely align with parameters, but adds no new parameter-level details beyond the schema.

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 clearly states the tool validates path name components for portability (length, character set, existence). It distinguishes from the sibling 'realpath' by noting it is not for path resolution but for validation.

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

Usage Guidelines5/5

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

Explicitly advises using to verify paths before creating or using them, and directs to 'realpath' for path resolution. Provides clear when-to-use and when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/caseSHY/AI-CLI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server