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);

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