Skip to main content
Glama

[

Read-only

Check file path predicates including existence, type, and permissions. Returns JSON with result and exit code for script conditions.

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

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

The description adds that the tool is 'Read-only, no side effects' and 'Returns JSON with predicate result and success/failure exit code', which complements the readOnlyHint annotation without contradiction.

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, consisting of three sentences. It front-loads the core purpose, then adds usage guidance and references, with no superfluous information.

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?

While the description covers purpose and usage, it omits how the file path is specified. The 'tokens' parameter is not explained in context, and there is no required path parameter. An AI agent might be uncertain how to construct a valid invocation. Additional details on path input would improve completeness.

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?

All parameters are fully described in the input schema (100% coverage). The description does not add details beyond summarizing the predicate types (existence, type, permissions). The schema already defines each boolean flag, so the description provides minimal additional parameter semantics.

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's purpose: 'Evaluate path predicates (file existence, type, permissions)' and identifies it as an alias for 'test'. It distinguishes from siblings by mentioning 'stat' for detailed inspection, and notes it is read-only with no side effects.

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?

The description explicitly says to use this tool 'in scripts for conditional file checks' and advises 'Not for detailed file inspection — use stat for full metadata'. It also references 'test' and 'stat' as alternatives.

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