Skip to main content
Glama

get_ontology_info

Retrieve detailed information about biological ontologies using their acronyms, enabling access to structured biomedical terminology and classification systems.

Instructions

Get detailed information about a specific ontology

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
acronymYesOntology acronym (e.g., NCIT, GO, MESH)
include_viewsNoInclude ontology views (default: false)

Implementation Reference

  • The main handler function that validates input, calls the BioOntology API to fetch ontology information for the given acronym (optionally including views), and returns the JSON response or error.
    private async handleGetOntologyInfo(args: any) {
      if (!isValidGetOntologyInfoArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid ontology info arguments');
      }
    
      try {
        const params: any = {
          apikey: this.apiKey,
        };
    
        if (args.include_views !== undefined) params.include_views = args.include_views;
    
        const response = await this.apiClient.get(`/ontologies/${args.acronym}`, { params });
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(response.data, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching ontology info: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
  • src/index.ts:585-596 (registration)
    Tool registration definition in the ListToolsRequestSchema handler, specifying the tool name, description, and input schema.
    {
      name: 'get_ontology_info',
      description: 'Get detailed information about a specific ontology',
      inputSchema: {
        type: 'object',
        properties: {
          acronym: { type: 'string', description: 'Ontology acronym (e.g., NCIT, GO, MESH)' },
          include_views: { type: 'boolean', description: 'Include ontology views (default: false)' },
        },
        required: ['acronym'],
      },
    },
  • Type guard function used in the handler to validate input arguments match the expected schema: acronym (required string) and optional include_views (boolean).
    const isValidGetOntologyInfoArgs = (
      args: any
    ): args is { acronym: string; include_views?: boolean } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.acronym === 'string' &&
        args.acronym.length > 0 &&
        (args.include_views === undefined || typeof args.include_views === 'boolean')
      );
    };
  • src/index.ts:707-708 (registration)
    Switch case dispatcher in the CallToolRequestSchema handler that routes calls to the get_ontology_info tool to its handler function.
    case 'get_ontology_info':
      return this.handleGetOntologyInfo(args);
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. It states the tool retrieves information, implying a read-only operation, but doesn't disclose behavioral traits such as whether it requires authentication, has rate limits, returns structured data, or handles errors. This is inadequate for a tool with no annotation coverage.

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 a single, clear sentence with zero waste. It's appropriately sized and front-loaded, efficiently conveying the core purpose without unnecessary elaboration.

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's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks context on usage, behavior, or output, leaving gaps that could hinder an AI agent's understanding, especially with multiple sibling tools.

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

Parameters3/5

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

The input schema has 100% description coverage, so the schema already documents both parameters ('acronym' and 'include_views') thoroughly. The description adds no additional meaning beyond what the schema provides, such as examples of acronym usage beyond the schema's list or implications of including views. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('detailed information about a specific ontology'), making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'get_class_info' or 'get_ontology_metrics', which might also retrieve ontology-related information, so it doesn't reach the highest score.

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 siblings like 'get_class_info' and 'get_ontology_metrics', there's no indication of what distinguishes this tool (e.g., general metadata vs. specific metrics or class details), leaving usage unclear.

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/Augmented-Nature/BioOntology-MCP-Server'

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