Skip to main content
Glama

glob

Find files in a directory by matching a pattern. Returns a list of matching file paths.

Instructions

This function will return a list of files that match the given pattern. This function is useful for finding files in a directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
Behavior2/5

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

With no annotations, the description must carry the full burden of behavioral disclosure. It does not mention pattern syntax (glob vs regex), recursive behavior, hidden files, case sensitivity, or return format. The description is too vague to set accurate expectations for an AI agent.

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 description is reasonably concise at two sentences with no excessive detail. The first sentence states the core functionality, and the second adds a use case. Minor redundancy exists with 'This function' repeated, but it does not significantly impair clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter tool with no output schema or annotations, the description should explain pattern syntax, recursion behavior, and the nature of returned paths. These are all absent. The description is complete enough for a rough idea but too incomplete for reliable tool invocation in varied scenarios.

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

Parameters2/5

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

The schema provides no description for the pattern parameter (0% coverage), so the description must compensate. It only says 'match the given pattern,' which adds no meaningful detail about the required pattern syntax (e.g., wildcards, globbing rules). This is insufficient for an agent to construct a correct pattern.

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 returns a list of files matching a pattern, which is a specific verb+resource. It distinguishes itself from sibling tools like read_file, grep, and bash, none of which focus on listing files by pattern. The phrasing 'finding files in a directory' reinforces the purpose.

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?

The description gives a use case ('useful for finding files in a directory') but does not explicitly state when to use this tool over alternatives, nor any exclusions or prerequisites. It implies usage for file discovery but lacks the explicit guidance seen in stronger examples.

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/BilalCodePhoenix/smart_terminal_mcp'

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