Skip to main content
Glama

directory_exists

Check whether a path exists and is a directory before reading or writing files. Resolves paths relative to the workspace root for safe filesystem validation.

Instructions

Check whether a given path exists and is a directory.

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.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the burden. 'Check' implies a non-mutating read, and it usefully discloses that the path is relative to the workspace root. It does not state the return value (boolean) or any failure behavior, leaving some behavioral gaps.

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?

Front-loaded with the core purpose in one sentence, followed by a brief Args block. The Args line is partly redundant with the schema but adds the workspace-root detail, so little is wasted.

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?

For a trivial single-parameter boolean check with no output schema and no annotations, the definition covers what the agent needs: what it does and how the path is interpreted. Only the return value is left implicit.

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 description coverage is 0%, so the schema documents nothing about 'path'. The description compensates by explaining that path is 'relative to the workspace root', which is meaningful semantics beyond the bare string type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb 'Check' and resource 'directory', plus the exact semantics (exists AND is a directory). This implicitly distinguishes it from the sibling file_exists. It is clear but does not name the sibling explicitly.

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?

No explicit when-to-use or when-not guidance, and no alternative (file_exists) is named. However, for a boolean existence check the use case is self-evident from the purpose statement, so usage is implied rather than documented.

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