get_project_services
Retrieve services and items associated with a specific project to access detailed project information and manage project-related activities.
Instructions
Get services/items for a specific project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID |
Input Schema (JSON Schema)
{
"properties": {
"project_id": {
"description": "Project ID",
"type": "string"
}
},
"required": [
"project_id"
],
"type": "object"
}
Implementation Reference
- src/mcp/server-full.ts:420-424 (handler)Main MCP tool handler for 'get_project_services'. Validates project_id input, delegates to SimplicateServiceExtended.getProjectServices(), formats JSON response.case 'get_project_services': { if (!toolArgs.project_id) throw new Error('project_id is required'); const data = await this.simplicateService.getProjectServices(toolArgs.project_id); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; }
- src/mcp/server-full.ts:100-108 (registration)Tool registration in ListTools handler: defines name, description, and input schema for get_project_services.{ name: 'get_project_services', description: 'Get services/items for a specific project', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'Project ID' } }, required: ['project_id'], }, },
- TypeScript interface defining the structure of project services returned by the tool.export interface SimplicateProjectService { id: string; project_id: string; name: string; price: number; amount: number; }
- Helper method that performs the actual API call to retrieve services for a given project from Simplicate backend.async getProjectServices(projectId: string): Promise<SimplicateProjectService[]> { const response = await this.client.get(`/projects/service`, { project_id: projectId }); return response.data || []; }