# HACS Tools
**42+ Hacs Tools for AI agents via Model Context Protocol**
Production-ready tools for clinical workflows, resource management, and healthcare AI operations.
## 🛠️ **Tool Categories**
### 🔍 **Resource Discovery & Development** (5+ tools)
- `discover_hacs_resources` - Explore healthcare resource schemas with metadata
- `analyze_resource_fields` - Field analysis with validation rules
- `compare_resource_schemas` - Schema comparison and integration
- `create_clinical_template` - Generate clinical workflow templates
- `create_model_stack` - Compose complex data structures
### 📋 **Record Management** (8+ tools)
- `create_hacs_record` / `get_hacs_record_by_id` / `update_hacs_record` / `delete_hacs_record` - Full CRUD
- `validate_hacs_record_data` - Comprehensive validation
- `list_available_hacs_resources` - Resource schema catalog
- `find_hacs_records` - Advanced semantic search
- `search_hacs_records` - Filtered record search
### 🧠 **Memory Management** (5+ tools)
- `create_hacs_memory` - Store episodic/procedural/executive memories
- `search_hacs_memories` - Semantic memory retrieval
- `consolidate_memories` - Merge related memories
- `retrieve_context` - Context-aware memory access
- `analyze_memory_patterns` - Usage pattern analysis
### ✅ **Validation & Schema** (3+ tools)
- `get_hacs_resource_schema` - JSON schema exploration
- `create_view_resource_schema` - Custom view creation
- `suggest_view_fields` - Intelligent field suggestions
### 🎨 **Advanced Tools** (Multiple tools)
- `optimize_resource_for_llm` - LLM-specific optimizations
- `version_hacs_resource` - Resource versioning and tracking
- `execute_clinical_workflow` - Clinical protocol execution
### 📚 **Knowledge Management** (Multiple tools)
- `create_knowledge_item` - Clinical guidelines and protocols
- `search_knowledge_base` - Medical knowledge retrieval
## 📦 **Installation**
```bash
pip install hacs-tools
```
## 🚀 **Quick Start**
```python
import requests
def use_hacs_tool(tool_name, arguments):
"""Call HACS MCP tools"""
response = requests.post('http://localhost:8000/', json={
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": tool_name,
"arguments": arguments
},
"id": 1
})
return response.json()
# Create patient record
patient_result = use_hacs_tool("create_hacs_record", {
"resource_type": "Patient",
"resource_data": {
"full_name": "John Smith",
"birth_date": "1980-05-15",
"gender": "male"
}
})
# Store clinical memory
memory_result = use_hacs_tool("create_memory", {
"content": "Patient reports improved symptoms after treatment",
"memory_type": "episodic",
"importance_score": 0.8
})
# Search for related memories
search_result = use_hacs_tool("search_memories", {
"query": "treatment response",
"limit": 5
})
```
## 🏥 **Healthcare Workflows**
### **Clinical Assessment**
```python
# Generate assessment template
template = use_hacs_tool("create_clinical_template", {
"template_type": "assessment",
"focus_area": "cardiology",
"complexity_level": "standard"
})
# Create knowledge item
knowledge = use_hacs_tool("create_knowledge_item", {
"title": "AHA Guidelines 2024",
"content": "New recommendations for hypertension management",
"knowledge_type": "guideline"
})
```
### **Resource Discovery**
```python
# Discover available models
models = use_hacs_tool("discover_hacs_resources", {
"category_filter": "clinical",
"include_examples": True
})
# Get schema for specific model
schema = use_hacs_tool("get_hacs_resource_schema", {
"resource_type": "Patient",
"include_validation_rules": True
})
```
## 🔗 **Integration**
HACS Tools integrate with:
- **MCP Protocol** - Standard tool calling interface
- **LangGraph** - AI agent workflows
- **PostgreSQL** - Persistent healthcare data storage
- **Healthcare Systems** - FHIR-compliant data exchange
## 📊 **Performance**
- **Tool Execution**: <200ms average response time
- **Memory Search**: <100ms for semantic queries
- **Resource Creation**: <50ms for standard resources
- **Validation**: <10ms for schema validation
## 📄 **License**
Apache-2.0 License - see [LICENSE](../../LICENSE) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "hacs-tools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "Solano Todeschini <solanovisitor@gmail.com>",
"keywords": "crud, evidence, healthcare, memory, search, tools, validation",
"author": null,
"author_email": "Solano Todeschini <solanovisitor@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/40/84/12626813c385280ffde81d8f0d68e3106b48865edcb0db2d68c9599490db/hacs_tools-0.4.3.tar.gz",
"platform": null,
"description": "# HACS Tools\n\n**42+ Hacs Tools for AI agents via Model Context Protocol**\n\nProduction-ready tools for clinical workflows, resource management, and healthcare AI operations.\n\n## \ud83d\udee0\ufe0f **Tool Categories**\n\n### \ud83d\udd0d **Resource Discovery & Development** (5+ tools)\n- `discover_hacs_resources` - Explore healthcare resource schemas with metadata\n- `analyze_resource_fields` - Field analysis with validation rules\n- `compare_resource_schemas` - Schema comparison and integration\n- `create_clinical_template` - Generate clinical workflow templates\n- `create_model_stack` - Compose complex data structures\n\n### \ud83d\udccb **Record Management** (8+ tools)\n- `create_hacs_record` / `get_hacs_record_by_id` / `update_hacs_record` / `delete_hacs_record` - Full CRUD\n- `validate_hacs_record_data` - Comprehensive validation\n- `list_available_hacs_resources` - Resource schema catalog\n- `find_hacs_records` - Advanced semantic search\n- `search_hacs_records` - Filtered record search\n\n### \ud83e\udde0 **Memory Management** (5+ tools)\n- `create_hacs_memory` - Store episodic/procedural/executive memories\n- `search_hacs_memories` - Semantic memory retrieval\n- `consolidate_memories` - Merge related memories\n- `retrieve_context` - Context-aware memory access\n- `analyze_memory_patterns` - Usage pattern analysis\n\n### \u2705 **Validation & Schema** (3+ tools)\n- `get_hacs_resource_schema` - JSON schema exploration\n- `create_view_resource_schema` - Custom view creation\n- `suggest_view_fields` - Intelligent field suggestions\n\n### \ud83c\udfa8 **Advanced Tools** (Multiple tools)\n- `optimize_resource_for_llm` - LLM-specific optimizations\n- `version_hacs_resource` - Resource versioning and tracking\n- `execute_clinical_workflow` - Clinical protocol execution\n\n### \ud83d\udcda **Knowledge Management** (Multiple tools)\n- `create_knowledge_item` - Clinical guidelines and protocols\n- `search_knowledge_base` - Medical knowledge retrieval\n\n## \ud83d\udce6 **Installation**\n\n```bash\npip install hacs-tools\n```\n\n## \ud83d\ude80 **Quick Start**\n\n```python\nimport requests\n\ndef use_hacs_tool(tool_name, arguments):\n \"\"\"Call HACS MCP tools\"\"\"\n response = requests.post('http://localhost:8000/', json={\n \"jsonrpc\": \"2.0\",\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": tool_name,\n \"arguments\": arguments\n },\n \"id\": 1\n })\n return response.json()\n\n# Create patient record\npatient_result = use_hacs_tool(\"create_hacs_record\", {\n \"resource_type\": \"Patient\",\n \"resource_data\": {\n \"full_name\": \"John Smith\",\n \"birth_date\": \"1980-05-15\",\n \"gender\": \"male\"\n }\n})\n\n# Store clinical memory\nmemory_result = use_hacs_tool(\"create_memory\", {\n \"content\": \"Patient reports improved symptoms after treatment\",\n \"memory_type\": \"episodic\",\n \"importance_score\": 0.8\n})\n\n# Search for related memories\nsearch_result = use_hacs_tool(\"search_memories\", {\n \"query\": \"treatment response\",\n \"limit\": 5\n})\n```\n\n## \ud83c\udfe5 **Healthcare Workflows**\n\n### **Clinical Assessment**\n```python\n# Generate assessment template\ntemplate = use_hacs_tool(\"create_clinical_template\", {\n \"template_type\": \"assessment\",\n \"focus_area\": \"cardiology\",\n \"complexity_level\": \"standard\"\n})\n\n# Create knowledge item\nknowledge = use_hacs_tool(\"create_knowledge_item\", {\n \"title\": \"AHA Guidelines 2024\",\n \"content\": \"New recommendations for hypertension management\",\n \"knowledge_type\": \"guideline\"\n})\n```\n\n### **Resource Discovery**\n```python\n# Discover available models\nmodels = use_hacs_tool(\"discover_hacs_resources\", {\n \"category_filter\": \"clinical\",\n \"include_examples\": True\n})\n\n# Get schema for specific model\nschema = use_hacs_tool(\"get_hacs_resource_schema\", {\n \"resource_type\": \"Patient\",\n \"include_validation_rules\": True\n})\n```\n\n## \ud83d\udd17 **Integration**\n\nHACS Tools integrate with:\n- **MCP Protocol** - Standard tool calling interface\n- **LangGraph** - AI agent workflows\n- **PostgreSQL** - Persistent healthcare data storage\n- **Healthcare Systems** - FHIR-compliant data exchange\n\n## \ud83d\udcca **Performance**\n\n- **Tool Execution**: <200ms average response time\n- **Memory Search**: <100ms for semantic queries\n- **Resource Creation**: <50ms for standard resources\n- **Validation**: <10ms for schema validation\n\n## \ud83d\udcc4 **License**\n\nApache-2.0 License - see [LICENSE](../../LICENSE) for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Core tools and utilities for HACS (Healthcare Agent Communication Standard)",
"version": "0.4.3",
"project_urls": {
"Changelog": "https://github.com/solanovisitor/hacs-ai/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/solanovisitor/hacs-ai/blob/main/docs/",
"Homepage": "https://github.com/solanovisitor/hacs-ai",
"Issues": "https://github.com/solanovisitor/hacs-ai/issues",
"Repository": "https://github.com/solanovisitor/hacs-ai"
},
"split_keywords": [
"crud",
" evidence",
" healthcare",
" memory",
" search",
" tools",
" validation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "aef57e9a3a62d1d1ef232adf1b53209c55303742d3718d7603c3264626568a51",
"md5": "9ba3140491dbcbaf4f967918e289a411",
"sha256": "eaa08f3036f5e113682bd78ff6f2e1c45cbc9fe7d2cd7b9c3fcaf5e14cf4c2c7"
},
"downloads": -1,
"filename": "hacs_tools-0.4.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9ba3140491dbcbaf4f967918e289a411",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 66062,
"upload_time": "2025-08-12T14:27:52",
"upload_time_iso_8601": "2025-08-12T14:27:52.947260Z",
"url": "https://files.pythonhosted.org/packages/ae/f5/7e9a3a62d1d1ef232adf1b53209c55303742d3718d7603c3264626568a51/hacs_tools-0.4.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "408412626813c385280ffde81d8f0d68e3106b48865edcb0db2d68c9599490db",
"md5": "70875c0f17001370c43d33d30bf6bb09",
"sha256": "2e6e7532f5e4e3b068dd484d26ab30945350b716267406b440176ea2284c367e"
},
"downloads": -1,
"filename": "hacs_tools-0.4.3.tar.gz",
"has_sig": false,
"md5_digest": "70875c0f17001370c43d33d30bf6bb09",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 54361,
"upload_time": "2025-08-12T14:28:02",
"upload_time_iso_8601": "2025-08-12T14:28:02.700843Z",
"url": "https://files.pythonhosted.org/packages/40/84/12626813c385280ffde81d8f0d68e3106b48865edcb0db2d68c9599490db/hacs_tools-0.4.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-12 14:28:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "solanovisitor",
"github_project": "hacs-ai",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hacs-tools"
}