remove_fact
Remove specific facts from GO-CAM models by specifying exact subject-predicate-object triples to maintain accurate biological knowledge representation.
Instructions
Remove a fact from a GO-CAM model.
You must specify the exact triple (subject, predicate, object) to remove.
Args: model_id: The GO-CAM model identifier subject_id: Subject of the fact object_id: Object of the fact predicate_id: Predicate of the fact
Returns: Barista API response
Examples: # Remove an enabled_by relationship remove_fact( "gomodel:12345", "gomodel:12345/mf_123", "gomodel:12345/gp_456", "RO:0002333" )
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| subject_id | Yes | ||
| object_id | Yes | ||
| predicate_id | Yes |
Input Schema (JSON Schema)
Implementation Reference
- src/noctua_mcp/mcp_server.py:751-833 (handler)The main handler function for the 'remove_fact' MCP tool. It takes model_id, subject_id, object_id, and predicate_id as inputs, calls BaristaClient.remove_fact to perform the removal, handles validation and error responses, and returns a success or error dictionary.async def remove_fact( model_id: str, subject_id: str, object_id: str, predicate_id: str ) -> Dict[str, Any]: """ Remove a fact from a GO-CAM model. You must specify the exact triple (subject, predicate, object) to remove. Args: model_id: The GO-CAM model identifier subject_id: Subject of the fact object_id: Object of the fact predicate_id: Predicate of the fact Returns: Barista API response Examples: # Remove an enabled_by relationship remove_fact( "gomodel:12345", "gomodel:12345/mf_123", "gomodel:12345/gp_456", "RO:0002333" ) # Remove a causal relationship remove_fact( "gomodel:12345", "gomodel:12345/activity1", "gomodel:12345/activity2", "RO:0002413" # provides input for ) # Remove occurs_in relationship remove_fact( "gomodel:12345", "gomodel:12345/mf_123", "gomodel:12345/cc_789", "BFO:0000066" # occurs_in ) # Remove using variable references (within same batch) remove_fact("gomodel:12345", "mf1", "gp1", "RO:0002333") """ client = get_client() resp = client.remove_fact(model_id, subject_id, object_id, predicate_id) if resp.validation_failed: return { "success": False, "error": "Validation failed", "reason": resp.validation_reason, "rolled_back": True, "fact": { "subject": subject_id, "predicate": predicate_id, "object": object_id }, "model_id": model_id } if resp.error: return { "success": False, "error": resp.error, "fact": { "subject": subject_id, "predicate": predicate_id, "object": object_id }, "model_id": model_id } # Return minimal success response return { "success": True, "removed": True }