Skip to main content
Glama

check_file_exists

Check if a file or directory exists at any given path, including absolute, relative, and home directory references, to validate paths before performing development tasks.

Instructions

Checks if a file or directory exists at the specified path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to check. Can be absolute, relative to active directory, or use ~ for home directory.
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It correctly implies a read-only existence check but does not specify the return format (e.g., boolean vs exception), behavior on inaccessible paths, or symlink handling. It adds no detail about side effects, though none are expected.

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 one sentence, front-loaded with the action, and contains no unnecessary words. It is appropriately sized for a simple tool.

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?

The tool is simple with one well-documented parameter and no output schema. The description is largely complete, but the absence of an output schema means it should clarify the return behavior (e.g., boolean vs error), which it does not. Still, for a trivial existence check, the description provides sufficient context.

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?

The input schema already documents the single parameter 'path' with full coverage (100%), including accepted formats (absolute, relative, ~). The description adds no parameter-specific details beyond the schema, so the baseline of 3 applies.

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 function with a specific verb ('Checks') and resource ('file or directory'), and specifies the scope ('exists at the specified path'). It distinguishes itself from sibling file operations like read_file, get_file_info, and list_directory by focusing solely on existence.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as get_file_info or find_files. It does not mention exclusions, prerequisites, or context for decision-making, leaving the agent to infer appropriate usage.

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/r-huijts/xcode-mcp-server'

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