List Skippr Projects
skippr_list_projectsLists all available project IDs from the projects directory to help you select a project for issue management.
Instructions
Lists all available project IDs from the .skippr/projects directory
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projects | Yes | ||
| totalCount | Yes |
Implementation Reference
- src/tools/list-projects.ts:23-51 (handler)The main handler function for the skippr_list_projects tool. Reads the .skippr/projects directory, collects all subdirectory names as project IDs, and returns them in a structured output.
export async function listProjects(): Promise<ListProjectsOutput> { const skipprProjectsDir = join(getWorkingDirectory(), '.skippr', 'projects'); const projects: string[] = []; try { // Check if .skippr/projects exists await stat(skipprProjectsDir); } catch { // .skippr/projects directory doesn't exist return { projects: [], totalCount: 0, }; } // Read all project directories const projectDirs = await readdir(skipprProjectsDir, { withFileTypes: true }); for (const projectDir of projectDirs) { if (projectDir.isDirectory()) { projects.push(projectDir.name); } } return { projects, totalCount: projects.length, }; } - src/tools/list-projects.ts:12-15 (schema)Zod output schema validating the shape: projects (string array) and totalCount (number).
export const ListProjectsOutputSchema = z.object({ projects: z.array(z.string()), totalCount: z.number(), }); - src/servers/mcp.ts:75-90 (registration)Registration of the 'skippr_list_projects' tool on the MCP server with title, description, empty input schema, and output schema.
mcpServer.registerTool( 'skippr_list_projects', { title: 'List Skippr Projects', description: 'Lists all available project IDs from the .skippr/projects directory', inputSchema: {}, outputSchema: z.object({ projects: z.array(z.string()), totalCount: z.number() }).shape }, async () => { const result = await listProjects(); return createStructuredResponse(result); } ); - src/utils/working-directory.ts:12-14 (helper)Helper utility that returns the user's home directory as the base path for finding .skippr/projects.
export function getWorkingDirectory(): string { return homedir(); }