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
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| max_depth | No | ||
| max_entries | No | ||
| response_format | No | json |
Implementation Reference
- src/mcp/tools/retrieval.js:117-138 (handler)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 ) );