Skip to main content
Glama

Project Tree

localnest_project_tree
Read-onlyIdempotent

Generate a compact file and directory tree structure for any project path to visualize codebase organization and navigate local development environments efficiently.

Instructions

Return a compact tree of files/directories for a project path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
max_depthNo
max_entriesNo
response_formatNojson

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
metaNo

Implementation Reference

  • The 'localnest_project_tree' tool is registered and implemented here, using 'workspace.projectTree' and 'normalizeProjectTreeResult'.
    registerJsonTool(
      'localnest_project_tree',
      {
        title: 'Project Tree',
        description: 'Return a compact tree of files/directories for a project path.',
        inputSchema: {
          project_path: z.string(),
          max_depth: z.number().int().min(1).max(8).default(3),
          max_entries: z.number().int().min(1).max(10000).default(1500)
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: false
        }
      },
      async ({ project_path, max_depth, max_entries }) => normalizeProjectTreeResult(
        workspace.projectTree(project_path, max_depth, max_entries),
        project_path
      )
    );
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. Description adds 'compact' qualifier, hinting at the output style, but doesn't explain the limiting behavior (truncation, depth handling) implied by max_depth and max_entries parameters, nor does it mention symlink handling.

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?

Single sentence with zero redundancy. Front-loaded with verb and object. However, given the 4-parameter complexity and zero schema documentation, the extreme brevity leaves significant gaps, suggesting it is under-specified rather than optimally concise.

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?

Despite having an output schema (reducing the need to describe return values), the description is incomplete due to 0% parameter schema coverage. It fails to explain how 'compact' relates to the limiting parameters (max_depth/max_entries) or what the 'tree' structure looks like in different response formats.

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?

With 0% schema description coverage, the description fails to compensate adequately. While it implicitly references 'project path', it omits explanation of the three optional behavioral parameters: max_depth (limits hierarchy levels), max_entries (truncation threshold), and response_format (json vs markdown output choices), which are crucial for proper invocation.

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?

Clear verb 'Return' and resource 'tree of files/directories'. Specifies scope 'for a project path'. The term 'tree' distinguishes it from sibling tools like localnest_list_projects (flat list) or localnest_read_file (single file content), though it doesn't explicitly contrast with localnest_list_roots.

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?

No guidance on when to use this versus alternatives like localnest_list_projects (for lightweight project listing), localnest_search_files (for targeted finding), or localnest_list_roots. No mention of prerequisites like the project needing to be indexed first.

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/wmt-mobile/localnest'

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