localnest_list_projects
List top-level project directories from a specified root path to organize and access local codebases efficiently.
Instructions
List first-level project directories under a root.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| root_path | No | ||
| max_entries | No | ||
| limit | No | ||
| offset | No | ||
| response_format | No | json |
Implementation Reference
- src/mcp/tools/retrieval.js:88-115 (handler)Registration and handler implementation for the 'localnest_list_projects' MCP tool. It delegates to workspace.listProjects and handles pagination.
registerJsonTool( 'localnest_list_projects', { title: 'List Projects', description: 'List first-level project directories under a root.', inputSchema: { root_path: z.string().optional(), max_entries: z.number().int().min(1).max(1000).optional(), limit: z.number().int().min(1).max(1000).default(100), offset: z.number().int().min(0).default(0) }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } }, async ({ root_path, max_entries, limit, offset }) => { const effectiveLimit = max_entries || limit; const projects = workspace.listProjects(root_path, 2000); const paged = paginateItems(projects, effectiveLimit, offset); return { ...paged, truncated_total: projects.length === 2000 }; } );