Skip to main content
Glama

localnest_project_tree

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

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
      )
    );

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