Skip to main content
Glama

get_ontology_info

Retrieve detailed information about a specific biological ontology, including optional views, using the BioOntology MCP Server. Input the ontology acronym to explore its structure and entries.

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 handler function that validates arguments, calls the BioOntology API to retrieve ontology information by acronym (optionally including views), and returns the JSON response or error message.
    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 in the ListTools response, defining 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'], }, },
  • Runtime validation function (type guard) for get_ontology_info input arguments.
    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)
    Dispatch case in the CallToolRequest handler that routes to the specific handler function.
    case 'get_ontology_info': return this.handleGetOntologyInfo(args);

Other Tools

Related 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