Skip to main content
Glama

[

Read-only

Assess file path attributes including existence, type, and permissions. Provides JSON output with result and exit code for use in conditional script logic.

Instructions

Evaluate path predicates (file existence, type, permissions) — alias for 'test'. Read-only, no side effects. Returns JSON with predicate result and success/failure exit code. Use in scripts for conditional file checks. Not for detailed file inspection — use 'stat' for full metadata. See also 'test', 'stat'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokensNoExpression tokens, optionally ending with ']'.
exit_codeNoReturn exit code 1 when the expression is false.
bracket_fileNoPath is a file.
bracket_existsNoPath exists.
bracket_symlinkNoPath is a symlink.
bracket_readableNoPath is readable.
bracket_writableNoPath is writable.
bracket_directoryNoPath is a directory.
bracket_non_emptyNoPath is non-empty.
bracket_executableNoPath is executable.
Behavior5/5

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

Description notes 'Read-only, no side effects', matching annotations' readOnlyHint=true. It also discloses that output is JSON with predicate result and exit code, adding value beyond annotations.

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?

Two concise sentences. Front-loaded with purpose, includes usage guidelines and alternatives. No wasted words.

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?

No output schema, but description mentions return format (JSON with result and exit code). For a tool with 10 parameters, description is sufficient but could mention more about error handling.

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. The description does not add parameter-level details but clarifies the tool's general behavior. No additional semantic value needed.

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 evaluates path predicates (file existence, type, permissions) and identifies itself as an alias for 'test'. It distinguishes itself from 'stat', which is for detailed inspection.

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 states 'Use in scripts for conditional file checks' and advises 'Not for detailed file inspection — use 'stat' for full metadata'. Also references siblings 'test' and 'stat'.

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