Skip to main content
Glama
seandavi

OLS MCP Server

by seandavi

get_ontology_info

Retrieve detailed information about a specific biological or medical ontology from the Ontology Lookup Service to understand its structure and content.

Instructions

Get detailed information about a specific ontology.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ontology_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the get_ontology_info tool. It makes an API request to the OLS API using the ontology_id parameter, parses the response, validates it against the OntologyInfo Pydantic model, and returns the validated data or an error message.
    @mcp.tool()
    async def get_ontology_info(
        ontology_id: Annotated[str, "Ontology identifier (e.g., 'efo', 'go', 'mondo')"]
    ) -> OntologyInfo | str:
        """Get detailed information about a specific ontology."""
        url = f"{OLS_BASE_URL}/api/v2/ontologies/{ontology_id}"
        
        try:
            response = await client.get(url)
            response.raise_for_status()
            data = response.json()
            return OntologyInfo.model_validate(data)
            
        except httpx.HTTPError as e:
            return f"Error getting ontology info: {str(e)}"
  • Pydantic BaseModel defining the structure and validation for the OntologyInfo response returned by the get_ontology_info tool.
    class OntologyInfo(BaseModel):
        id: str = Field(..., description="Unique identifier for the ontology", alias="ontologyId")
        title: str = Field(..., description="Name of the ontology")
        version: Optional[str] = Field(None, description="Version of the ontology")
        description: Optional[str] = Field(None, description="Description of the ontology")
        domain: Optional[str] = Field(None, description="Domain of the ontology")
        homepage: Optional[HttpUrl] = Field(None, description="URL for the ontology")
        preferred_prefix: Optional[str] = Field(None, description="Preferred prefix for the ontology", alias="preferredPrefix")
        number_of_terms: Optional[int] = Field(None, description="Number of terms in the ontology")
        number_of_classes: Optional[int] = Field(None, description="Number of classes in the ontology", alias="numberOfClasses")
        repository: Optional[HttpUrl] = Field(None, description="Repository URL for the ontology")
Behavior2/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 of behavioral disclosure. It only states what the tool does ('Get detailed information'), without explaining what 'detailed information' entails, whether it's a read-only operation, if there are rate limits, authentication requirements, or how results are returned. For a tool with no annotations, this leaves significant behavioral gaps.

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

Conciseness5/5

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

The description is extremely concise and front-loaded in a single sentence ('Get detailed information about a specific ontology'). There is zero wasted language, and it directly states the core function without unnecessary elaboration, making it efficient for quick comprehension.

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

Completeness3/5

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

Given the tool has an output schema, the description doesn't need to explain return values. However, with no annotations, 0% schema coverage, and sibling tools present, the description is incomplete. It lacks context on usage differentiation, parameter details, and behavioral traits, making it minimally adequate but with clear gaps in guiding the agent effectively.

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

Parameters2/5

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

The description adds minimal meaning beyond the input schema. With 0% schema description coverage and one parameter ('ontology_id'), the description doesn't clarify what an 'ontology_id' is, its format, or examples. It merely restates the tool's purpose without enriching parameter understanding, failing to compensate for the low schema coverage.

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

Purpose3/5

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

The description states the tool's purpose ('Get detailed information about a specific ontology'), which is clear but vague. It specifies the verb ('Get') and resource ('ontology'), but doesn't differentiate it from sibling tools like 'get_term_info' or 'search_ontologies', leaving ambiguity about what distinguishes this tool from others that also retrieve ontology-related data.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'search_ontologies' and 'get_term_info', there's no indication of whether this tool is for high-level ontology metadata, detailed structural information, or something else. No explicit when/when-not instructions or alternative tool references are provided.

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/seandavi/ols-mcp-server'

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