list_projects
Retrieve and filter projects by status, name, or description to manage project data efficiently 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 for the 'list_projects' tool. It validates input with ListProjectsSchema, logs the request, fetches projects using supabaseService.getProjects with optional filters and limit, and returns the projects list along 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 registration object for 'list_projects', providing the tool name, description, and structured input schema for the MCP 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' } } } }