list_projects
Retrieve and filter projects by status, name, or description to manage project visibility and organization within the Helios-9 MCP Server.
Instructions
List all projects with optional filtering by status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter projects by status | |
| search | No | Search projects by name or description | |
| limit | No | Maximum number of projects to return |
Implementation Reference
- src/tools/projects.ts:67-83 (handler)The main handler function that executes the list_projects tool logic. Parses input using the schema, logs the action, fetches projects from Supabase service with filters (status, search) and pagination (limit), sorts by updated_at desc, and returns projects list with total count and applied filters.export const listProjects = requireAuth(async (args: any) => { const { status, search, limit } = ListProjectsSchema.parse(args) logger.info('Listing projects', { status, search, limit }) const projects = await supabaseService.getProjects( { status, search }, { limit }, { field: 'updated_at', order: 'desc' } ) return { projects, total: projects.length, filters_applied: { status, search } } })
- src/tools/projects.ts:13-17 (schema)Zod input validation schema for the list_projects tool defining optional status filter, search term, and limit (default 20, max 100).const ListProjectsSchema = z.object({ status: z.enum(['active', 'completed', 'archived']).optional(), search: z.string().optional(), limit: z.number().int().positive().max(100).default(20) })
- src/tools/projects.ts:41-65 (registration)MCPTool object registering the list_projects tool with name, description, and structured input schema for the protocol.export const listProjectsTool: MCPTool = { name: 'list_projects', description: 'List all projects with optional filtering by status', inputSchema: { type: 'object', properties: { status: { type: 'string', enum: ['active', 'completed', 'archived'], description: 'Filter projects by status' }, search: { type: 'string', description: 'Search projects by name or description' }, limit: { type: 'number', minimum: 1, maximum: 100, default: 20, description: 'Maximum number of projects to return' } } } }
- src/tools/projects.ts:778-788 (registration)Export object mapping tool names to their handler functions, serving as a registry for all project-related tools including list_projects.export const projectHandlers = { list_projects: listProjects, get_project: getProject, create_project: createProject, update_project: updateProject, get_project_context: getProjectContext, archive_project: archiveProject, duplicate_project: duplicateProject, get_project_timeline: getProjectTimeline, bulk_update_projects: bulkUpdateProjects }
- src/tools/projects.ts:766-776 (registration)Export object collecting all project tool definitions (MCPTool objects) including listProjectsTool for centralized registration.export const projectTools = { listProjectsTool, getProjectTool, createProjectTool, updateProjectTool, getProjectContextTool, archiveProjectTool, duplicateProjectTool, getProjectTimelineTool, bulkUpdateProjectsTool }