Skip to main content
Glama

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" )

# 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

NameRequiredDescriptionDefault
model_idYes
subject_idYes
object_idYes
predicate_idYes

Input Schema (JSON Schema)

{ "properties": { "model_id": { "type": "string" }, "object_id": { "type": "string" }, "predicate_id": { "type": "string" }, "subject_id": { "type": "string" } }, "required": [ "model_id", "subject_id", "object_id", "predicate_id" ], "type": "object" }

Implementation Reference

  • 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 }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/geneontology/noctua-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server