Skip to main content
Glama

file_exists

Verify a path exists and is a regular file within the workspace root, enabling safe checks before file operations.

Instructions

Check whether a given path exists and is a regular file.

Args: path: Path to check, relative to the workspace root.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden. It does imply a non-mutating boolean check and clarifies that directories do not count as 'exists', which is real behavioral value, but it says nothing about error conditions (permissions, invalid paths, non-existent workspace root) or the return value shape.

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

Conciseness4/5

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

The defining sentence is front-loaded and zero-waste. The trailing 'Args:' block marginally restates the same path information already given, but the overall structure is appropriately sized for a one-parameter predicate.

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?

With no output schema, the description should sketch the result, and 'whether a given path exists and is a regular file' effectively communicates the boolean predicate and the directory edge case. Only the explicit return type and failure behavior are left unstated, a minor gap for a tool this simple.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% for the single required parameter, so the description must compensate, and it does: 'Path to check, relative to the workspace root' establishes the resolution base, which the bare 'type: string' schema does not. That is meaningful semantics 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?

States a specific verb ('Check whether') and a precise resource ('a given path... is a regular file'). The 'regular file' qualifier cleanly distinguishes it from the sibling directory_exists and from read_file/write_file, so an agent can select it without opening any schema.

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

Usage Guidelines3/5

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

There is no explicit when-to-use statement, no exclusions, and no named alternatives. The predicate nature implies it is a pre-flight guard for read_file/write_file/copy_file, but that usage is left to inference rather than stated.

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