Skip to main content
Glama

pathchk

Read-only

Validate path components for portable filename compliance, checking length, character set, and existence. Returns validation results to verify paths before use.

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
exit_codeNoReturn exit code 1 when any path is invalid.
max_component_lengthNoMaximum path component length.
max_path_lengthNoMaximum path string length.
pathsYesPath strings to validate.
portableNoRequire portable POSIX filename characters.
rawNoWrite validation rows without a JSON envelope.
Behavior4/5

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

Annotations indicate readOnlyHint=true, and the description reinforces this with 'Read-only, no side effects.' It also mentions the return format (JSON). However, it doesn't elaborate on how invalid paths are reported beyond the exit_code parameter, leaving some ambiguity about the JSON structure.

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?

The description is concise, with four focused sentences. It front-loads the primary action and constraints, then provides usage guidance and sibling references. No redundant information.

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 covers the core purpose, result format, and relationship to siblings. It could be more specific about the JSON structure (e.g., per-path results), but overall it provides sufficient context for an agent to use the tool correctly.

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 the schema already documents all parameters. The description adds no additional parameter-level details beyond confirming general behavior, meeting the baseline expectation.

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 names for portability, specifying three aspects (length, character set, existence). It distinguishes itself from 'realpath' by stating it's not for path resolution, making the purpose unambiguous.

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 says when to use ('before creating or using paths') and when not to use ('not for path resolution'), with a direct reference to the sibling tool 'realpath' for the alternative use case.

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