Skip to main content
Glama

create_model

Create a new GO-CAM model for biological pathway representation. Build causal activity models to capture gene function relationships and biological processes.

Instructions

Create a new empty GO-CAM model.

Args: title: Optional title for the model

Returns: Barista API response containing the new model ID and editor URLs

Examples:

  • create_model("RAS-RAF signaling pathway")

Notes: - The returned model_id can be used with other tools like add_individual - Models are created in "development" state by default - To add taxon information, use add_individual after creating the model

Input Schema

NameRequiredDescriptionDefault
titleNo

Input Schema (JSON Schema)

{ "properties": { "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null } }, "type": "object" }

Implementation Reference

  • The handler function for the 'create_model' MCP tool. Decorated with @mcp.tool(), it creates a new GO-CAM model via BaristaClient, handles errors and validation, constructs editor URLs, and returns the model ID and success status.
    @mcp.tool() async def create_model( title: Optional[str] = None ) -> Dict[str, Any]: """ Create a new empty GO-CAM model. Args: title: Optional title for the model Returns: Barista API response containing the new model ID and editor URLs Examples: - `create_model("RAS-RAF signaling pathway")` Notes: - The returned model_id can be used with other tools like add_individual - Models are created in "development" state by default - To add taxon information, use add_individual after creating the model """ client = get_client() resp = client.create_model(title=title) if resp.validation_failed: return { "success": False, "error": "Validation failed", "reason": resp.validation_reason, "rolled_back": True } if resp.error: return { "success": False, "error": "Operation failed", "reason": resp.error } # Build minimal response result = { "success": True, "model_id": resp.model_id, "created": True } # Add editor URLs if we have a model ID if resp.model_id: import os token = os.environ.get("BARISTA_TOKEN", "") # Graph editor with token result["graph_editor_url"] = f"http://noctua-dev.berkeleybop.org/editor/graph/{resp.model_id}?barista_token={token}" # Pathway editor without token (URL encoded model ID) from urllib.parse import quote encoded_id = quote(resp.model_id, safe="") result["pathway_editor_url"] = f"http://noctua-dev.berkeleybop.org/workbench/noctua-visual-pathway-editor/?model_id={encoded_id}" return result

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