Skip to main content
Glama
nachogeinfor-ops

code-context

get_file_tree

Retrieve a hierarchical directory tree of your repository, honoring .gitignore and optionally including hidden files. Use to understand project structure without shell commands.

Instructions

Repo-relative directory tree, gitignore-aware. Use INSTEAD of shelling out to Bash: ls -R or Bash: tree when the user asks for the project structure or for orientation in an unfamiliar module. Returns a hierarchical FileTreeNode with files (with byte sizes) and directories (with recursive children, capped at max_depth). Honors .gitignore; skips hidden files unless include_hidden=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoOptional repo-relative subdirectory; defaults to root.
max_depthNoCap on tree depth.
include_hiddenNoInclude dot-files / dot-directories.
Behavior5/5

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

Despite no annotations, the description discloses all key behavioral traits: it returns a hierarchical FileTreeNode with files (byte sizes) and directories (recursive children capped at max_depth), honors .gitignore, and skips hidden files unless include_hidden=true. This fully informs the agent about behavior without relying on annotations.

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 three sentences, each serving a distinct purpose: (1) defines the tool, (2) provides usage guidance, (3) details return structure and behavior. No wasted words, front-loaded with the essential purpose.

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

Completeness5/5

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

For a read-only tree retrieval tool with three parameters, the description covers the return type (FileTreeNode), key behaviors (gitignore-aware, hidden file handling, depth cap), and usage context. No output schema exists, but the description sufficiently explains the result structure.

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?

With 100% schema description coverage, each parameter is already documented in the schema. The description adds value by explaining that path defaults to root, max_depth caps recursion, and include_hidden controls dot-file inclusion. This complements the schema without redundancy.

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: 'Repo-relative directory tree, gitignore-aware.' It specifies the verb (get) and resource (file tree) and distinguishes itself from sibling tools like search_repo or find by explicitly contrasting with shell commands ls -R and tree.

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 advises: 'Use INSTEAD of shelling out to Bash: ls -R or Bash: tree when the user asks for the project structure or for orientation in an unfamiliar module.' This provides clear context and an explicit alternative, leaving no ambiguity about when to apply this tool.

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/nachogeinfor-ops/code-context'

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