Skip to main content
Glama
geneontology

Noctua MCP Server

Official
by geneontology

get_model

Retrieve the complete JSON representation of a GO-CAM model, including all individuals and facts, for analysis or integration.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The get_model tool handler function: decorated with @mcp.tool(), it calls client.get_model(model_id) and returns a structured response with individuals, facts, annotations, state, and raw data.
    @mcp.tool()
    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
        }
  • The @mcp.tool() decorator on line 835 registers get_model as an MCP tool named 'get_model'.
    @mcp.tool()
    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
        }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It describes the return structure (individuals, facts, annotations) but does not disclose whether the operation is read-only, has side effects, requires authentication, or has rate limits. The examples imply idempotency, but this is not explicit. Additional behavioral context beyond the schema is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections (summary, Args, Returns, Examples) and front-loads the purpose. However, it is verbose with multiple lengthy code examples that repeat similar patterns. Some examples could be condensed without losing clarity, making it less concise than ideal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given only one parameter and no annotations, the description provides a thorough explanation of the return structure (individuals, facts, annotations) and usage patterns. It includes examples of extracting specific data. However, it lacks information about error handling, invalid model IDs, or any prerequisites. Overall, it is mostly complete for a retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates by providing a clear 'Args' section: 'model_id: The GO-CAM model identifier'. It also shows the expected format in examples ('gomodel:5fce9b7300001215'), adding meaning beyond the schema field name. The single parameter is well-documented with both purpose and format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Retrieve the full JSON representation of a GO-CAM model.' It specifies the verb (retrieve), resource (GO-CAM model), and format (full JSON). The examples further clarify the exact output structure. This distinguishes it from sibling tools like 'create_model' and 'model_summary' by being a pure retrieval operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes an 'Args' section and detailed examples, showing how to use the tool. However, it does not explicitly state when to use this tool versus alternatives like 'get_model_variables' or 'model_summary'. No when-not-to-use guidance or prerequisites are provided, leaving the agent to infer from context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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