Toolkits API
Toolkits provide pre-built tools and collections of related tools that AI Workers can use to interact with healthcare systems, analyze data, and perform specialized healthcare functions. This API allows you to discover available tools and toolkits.
Base URL
https://api.engine.boolbyte.com/api/tool
Get Available Toolkits
GET /api/tool/toolkits
Retrieves all available toolkits with their associated tools.
Using JavaScript SDK:
import { EngineClient } from '@boolbyte/engine';
const client = new EngineClient({ apiKey: 'YOUR_API_KEY' });
const toolkits = await client.toolkit.getToolkitsWithTools();
Response:
{
"success": true,
"message": "Toolkits retrieved successfully",
"data": [
{
"id": "medical-analysis",
"name": "Medical Analysis Toolkit",
"description": "Tools for analyzing medical data, lab results, and clinical information",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"tools": [
{
"id": "lab-analyzer",
"name": "Lab Results Analyzer",
"description": "Analyzes laboratory results and identifies abnormal values",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
{
"id": "vital-signs-monitor",
"name": "Vital Signs Monitor",
"description": "Monitors and analyzes vital signs data",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
]
},
{
"id": "fhir-integration",
"name": "FHIR Integration Toolkit",
"description": "Tools for interacting with FHIR servers and healthcare data",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"tools": [
{
"id": "fhir-reader",
"name": "FHIR Data Reader",
"description": "Reads patient data from FHIR servers",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
},
{
"id": "fhir-writer",
"name": "FHIR Data Writer",
"description": "Writes data to FHIR servers",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z"
}
]
}
]
}
Get Available Tools
GET /api/tool/tools
Retrieves all available individual tools.
Using JavaScript SDK:
const tools = await client.toolkit.getTools();
Response:
{
"success": true,
"message": "Tools retrieved successfully",
"data": [
{
"id": "lab-analyzer",
"name": "Lab Results Analyzer",
"description": "Analyzes laboratory results and identifies abnormal values",
"category": "medical-analysis",
"parameters": {
"type": "object",
"properties": {
"labResults": {
"type": "array",
"items": {
"type": "object",
"properties": {
"testName": { "type": "string" },
"value": { "type": "string" },
"unit": { "type": "string" },
"referenceRange": { "type": "string" }
}
}
}
},
"required": ["labResults"]
}
},
{
"id": "fhir-reader",
"name": "FHIR Data Reader",
"description": "Reads patient data from FHIR servers",
"category": "fhir-integration",
"parameters": {
"type": "object",
"properties": {
"resourceType": { "type": "string" },
"patientId": { "type": "string" },
"filters": { "type": "object" }
},
"required": ["resourceType", "patientId"]
}
}
]
}
Tool Configuration
Basic Tool Configuration
toolConfigs: {
tools: [
{
toolName: 'lab-analyzer',
config: {
alertThreshold: 0.8,
includeTrends: true
}
}
]
}
Toolkit Configuration
toolConfigs: {
toolkits: [
{
toolkitName: 'medical-analysis',
config: {
includeLabResults: true,
includeVitalSigns: true,
includeMedications: true
},
excludeToolIds: ['deprecated-tool']
}
]
}
Advanced Configuration
toolConfigs: {
tools: [
{
toolName: 'fhir-reader',
config: {
serverId: 'fhir-server-123',
permissions: ['read', 'write'],
resourceTypes: ['Patient', 'Observation', 'Condition'],
filters: {
active: true
}
}
}
],
toolkits: [
{
toolkitName: 'medical-analysis',
config: {
includeLabResults: true,
includeVitalSigns: true
}
}
]
}
Common Use Cases
Clinical Decision Support
const clinicalWorker = await client.worker.createWorker({
name: 'clinical-decision-support',
description: 'AI assistant for clinical decision support',
defaultModelName: 'openai/gpt-4',
toolConfigs: {
toolkits: [
{
toolkitName: 'medical-analysis',
config: {
includeLabResults: true,
includeVitalSigns: true,
includeMedications: true
}
}
],
tools: [
{
toolName: 'fhir-reader',
config: {
serverId: 'fhir-server-123',
permissions: ['read'],
resourceTypes: ['Patient', 'Observation', 'Condition']
}
}
]
}
});
Patient Monitoring
const monitoringWorker = await client.worker.createWorker({
name: 'patient-monitor',
description: 'AI assistant for patient monitoring',
defaultModelName: 'openai/gpt-4',
toolConfigs: {
tools: [
{
toolName: 'vital-signs-monitor',
config: {
alertThresholds: {
bloodPressure: { high: 140, low: 90 },
heartRate: { high: 100, low: 60 }
}
}
},
{
toolName: 'lab-analyzer',
config: {
alertThreshold: 0.8,
includeTrends: true
}
}
]
}
});
Documentation Assistant
const docWorker = await client.worker.createWorker({
name: 'documentation-assistant',
description: 'AI assistant for clinical documentation',
defaultModelName: 'openai/gpt-4',
toolConfigs: {
toolkits: [
{
toolkitName: 'clinical-documentation',
config: {
includeSOAPNotes: true,
includeProgressNotes: true,
includeDischargeSummaries: true
}
}
]
}
});
Error Handling
{
"success": false,
"message": "Tool not found",
"data": null,
"error": {
"code": "tool_not_found",
"details": "Tool 'invalid-tool' is not available"
}
}
Common Error Codes
tool_not_found: Specified tool is not availabletoolkit_not_found: Specified toolkit is not availableinvalid_tool_configuration: Tool configuration is invalidinsufficient_permissions: Missing required permissions for tool
Next Steps
- Workers - Create workers with specific tools and toolkits
- Sessions & Tasks - Use tools in conversations and tasks
- Health Data Store - Learn about FHIR-specific tools
- API Overview - Learn about the complete API