Skip to main content
Glama
geneontology

Noctua MCP Server

Official
by geneontology

get_model

Retrieve complete GO-CAM model data including individuals, facts, and annotations using a model identifier to access biological knowledge representation.

Instructions

Retrieve the full JSON representation of a GO-CAM model.

Args: model_id: The GO-CAM model identifier

Returns: Full model data including individuals and facts

Examples: # Get a production model model = get_model("gomodel:5fce9b7300001215") # Returns complete model with: # - data.id: model ID # - data.individuals: list of all individuals # - data.facts: list of all relationships # - data.annotations: model-level annotations

# Extract specific information
model = get_model("gomodel:12345")
individuals = model["data"]["individuals"]
facts = model["data"]["facts"]

# Find all molecular functions
mfs = [i for i in individuals
       if any("GO:0003674" in str(e.id) for e in i.type if hasattr(e, 'id'))]

# Find all enabled_by relationships (facts are Pydantic objects)
enabled_by = [f for f in facts if f.property == "RO:0002333"]

# Check model state
state = model["data"].get("state")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_idYes

Implementation Reference

  • The primary handler function for the 'get_model' MCP tool. Decorated with @mcp.tool() for automatic registration with FastMCP. Retrieves the GO-CAM model data via BaristaClient.get_model() and formats the response with success status, model data (individuals, facts, annotations, state), and raw response.
    async def get_model(model_id: str) -> Dict[str, Any]:
        """
        Retrieve the full JSON representation of a GO-CAM model.
    
        Args:
            model_id: The GO-CAM model identifier
    
        Returns:
            Full model data including individuals and facts
    
        Examples:
            # Get a production model
            model = get_model("gomodel:5fce9b7300001215")
            # Returns complete model with:
            # - data.id: model ID
            # - data.individuals: list of all individuals
            # - data.facts: list of all relationships
            # - data.annotations: model-level annotations
    
            # Extract specific information
            model = get_model("gomodel:12345")
            individuals = model["data"]["individuals"]
            facts = model["data"]["facts"]
    
            # Find all molecular functions
            mfs = [i for i in individuals
                   if any("GO:0003674" in str(e.id) for e in i.type if hasattr(e, 'id'))]
    
            # Find all enabled_by relationships (facts are Pydantic objects)
            enabled_by = [f for f in facts if f.property == "RO:0002333"]
    
            # Check model state
            state = model["data"].get("state")
        """
        client = get_client()
        resp = client.get_model(model_id)
    
        if resp.error:
            return {
                "success": False,
                "error": resp.error,
                "model_id": model_id
            }
    
        # Return structured response with model data
        return {
            "success": True,
            "model_id": model_id,
            "data": {
                "individuals": resp.individuals,
                "facts": resp.facts,
                "annotations": resp.annotations if hasattr(resp, 'annotations') else [],
                "state": resp.model_state if hasattr(resp, 'model_state') else None
            },
            "raw": resp.raw  # Include raw for backward compatibility
        }

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