get_service
Retrieve detailed service information by ID from the Simplicate business platform, enabling access to specific service records for project management and client operations.
Instructions
Get specific service by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service_id | Yes |
Input Schema (JSON Schema)
{
"properties": {
"service_id": {
"type": "string"
}
},
"required": [
"service_id"
],
"type": "object"
}
Implementation Reference
- src/mcp/server-full.ts:485-488 (handler)MCP CallToolRequest handler case for 'get_service': validates service_id parameter and delegates to simplicateService.getServiceById, returning JSON stringified response.case 'get_service': { if (!toolArgs.service_id) throw new Error('service_id is required'); const data = await this.simplicateService.getServiceById(toolArgs.service_id); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
- src/mcp/server-full.ts:231-239 (registration)Tool registration in ListToolsRequest handler: defines name, description, and input schema for 'get_service'.{ name: 'get_service', description: 'Get specific service by ID', inputSchema: { type: 'object', properties: { service_id: { type: 'string' } }, required: ['service_id'], }, },
- TypeScript interface defining the shape of SimplicateService returned by getServiceById.export interface SimplicateService { id: string; name: string; price: number; cost_price?: number; invoice_method?: string; }
- Core helper method getServiceById: performs HTTP GET to Simplicate API endpoint `/services/service/{serviceId}` and returns the service data.async getServiceById(serviceId: string): Promise<SimplicateService> { const response = await this.client.get(`/services/service/${serviceId}`); return response.data; }