remove_fact
Delete specific facts from GO-CAM biological models by specifying exact subject-predicate-object triples to maintain accurate 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" )
# 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")
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_id | Yes | ||
| subject_id | Yes | ||
| object_id | Yes | ||
| predicate_id | Yes |
Implementation Reference
- src/noctua_mcp/mcp_server.py:750-833 (handler)The handler function for the 'remove_fact' MCP tool. It validates the removal of a specific fact (subject-predicate-object triple) from a GO-CAM model using the BaristaClient and returns success/error status with details.@mcp.tool() 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 }