remove_individual
Delete an individual from a GO-CAM model, including all connected facts and edges, to maintain accurate biological knowledge representation.
Instructions
Remove an individual from a GO-CAM model.
Note: This will also remove all facts (edges) connected to this individual.
Args: model_id: The GO-CAM model identifier individual_id: The individual to remove
Returns: Barista API response
Examples: # Remove using a variable reference (within same batch) remove_individual("gomodel:12345", "mf1")
# Remove using full individual ID
remove_individual("gomodel:12345", "gomodel:12345/5fce9b7300001215")
# Remove an evidence individual
remove_individual("gomodel:12345", "gomodel:12345/evidence_123")
# Clean up after testing
for ind_id in ["test1", "test2", "test3"]:
remove_individual("gomodel:12345", ind_id)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| individual_id | Yes |
Implementation Reference
- src/noctua_mcp/mcp_server.py:690-747 (handler)The main handler function for the 'remove_individual' MCP tool. It calls BaristaClient.remove_individual to delete the specified individual from the GO-CAM model, handling validation errors and rollbacks, and returns a success/error response.@mcp.tool() async def remove_individual( model_id: str, individual_id: str ) -> Dict[str, Any]: """ Remove an individual from a GO-CAM model. Note: This will also remove all facts (edges) connected to this individual. Args: model_id: The GO-CAM model identifier individual_id: The individual to remove Returns: Barista API response Examples: # Remove using a variable reference (within same batch) remove_individual("gomodel:12345", "mf1") # Remove using full individual ID remove_individual("gomodel:12345", "gomodel:12345/5fce9b7300001215") # Remove an evidence individual remove_individual("gomodel:12345", "gomodel:12345/evidence_123") # Clean up after testing for ind_id in ["test1", "test2", "test3"]: remove_individual("gomodel:12345", ind_id) """ client = get_client() resp = client.remove_individual(model_id, individual_id) if resp.validation_failed: return { "success": False, "error": "Validation failed", "reason": resp.validation_reason, "rolled_back": True, "individual_id": individual_id, "model_id": model_id } if resp.error: return { "success": False, "error": resp.error, "individual_id": individual_id, "model_id": model_id } # Return minimal success response return { "success": True, "removed": True, "individual_id": individual_id }