list_projects
Retrieve all registered projects with their current status to manage development workflows across Claude interfaces.
Instructions
List all registered projects with status
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_projects"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeInactive | No | Include inactive projects |
Implementation Reference
- src/tools/list_projects.ts:4-28 (handler)The core handler function that executes the list_projects tool logic: instantiates ProjectManager, fetches all projects, optionally filters inactive ones, maps to simplified output format including id, name, rootPath, active, lastAccessed, and hasClaudeState.
export async function listProjects(args: ListProjectsArgs): Promise<{ projects: any[]; // Returning simplified project objects }> { const projectManager = new ProjectManager(); const allProjects = await projectManager.getAllProjects(); let projects = allProjects; // Filter inactive projects unless requested if (!args.includeInactive) { projects = projects.filter(p => p.active); } // Map to output format return { projects: projects.map(p => ({ id: p.id, name: p.name, rootPath: p.rootPath, active: p.active, lastAccessed: p.lastAccessed, hasClaudeState: true // TODO: check actual state file existence })) }; } - src/models/types.ts:87-90 (schema)TypeScript interface defining the input schema for the list_projects tool, with optional includeInactive boolean flag.
*/ export interface ListProjectsArgs { includeInactive?: boolean; } - src/index.ts:70-79 (registration)Tool registration in the ListToolsRequestHandler, defining the name, description, and inputSchema for list_projects.
{ name: 'list_projects', description: 'List all registered projects with status', inputSchema: { type: 'object', properties: { includeInactive: { type: 'boolean', description: 'Include inactive projects' } } } }, - src/index.ts:125-128 (registration)Dispatch case in the CallToolRequestHandler switch statement that invokes the listProjects handler function.
case 'list_projects': return { content: [{ type: 'text', text: JSON.stringify(await listProjects(args as unknown as ListProjectsArgs), null, 2) }] }; - src/index.ts:28-28 (registration)Import statement for the listProjects handler function.
import { listProjects } from './tools/list_projects.js';