get_projects
Retrieve a list of all projects from the Simplicate business management system. Use this tool to access project data for tracking, reporting, and management purposes.
Instructions
Retrieve a list of all projects
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number to return (default: 10) | |
| offset | No | Number to skip for pagination |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"description": "Maximum number to return (default: 10)",
"type": "number"
},
"offset": {
"description": "Number to skip for pagination",
"type": "number"
}
},
"type": "object"
}
Implementation Reference
- src/mcp/server-full.ts:45-54 (registration)Registration of the 'get_projects' tool including input schema definitionname: 'get_projects', description: 'Retrieve a list of all projects', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number to return (default: 10)' }, offset: { type: 'number', description: 'Number to skip for pagination' }, }, }, },
- src/mcp/server-full.ts:394-400 (handler)Handler logic for executing the 'get_projects' tool, delegates to SimplicateServiceExtended.getProjects and formats response as MCP contentcase 'get_projects': { const data = await this.simplicateService.getProjects({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }
- Core helper function that performs the API call to retrieve projects from Simplicate backendasync getProjects(params?: { limit?: number; offset?: number }): Promise<SimplicateProject[]> { const response = await this.client.get('/projects/project', params); return response.data || []; }
- TypeScript interface defining the structure of a SimplicateProject, used for type safety in getProjects responseexport interface SimplicateProject { id: string; name: string; project_number: string; organization?: { id: string; name: string }; project_manager?: { id: string; name: string }; start_date?: string; end_date?: string; budget?: number; status?: string; }
- src/mcp/server.ts:193-206 (handler)Alternative handler in basic server variant, identical logic delegating to SimplicateService.getProjectscase 'get_projects': { const projects = await this.simplicateService.getProjects({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [ { type: 'text', text: JSON.stringify(projects, null, 2), }, ], }; }