Skip to main content
Glama

get_ontology_metrics

Analyze usage statistics and assess quality metrics for a specific ontology to evaluate its performance and relevance in biological research.

Instructions

Get usage statistics and quality metrics for an ontology

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ontologyYesOntology acronym

Implementation Reference

  • The handler function that validates input, fetches ontology metrics from the BioPortal API endpoint `/ontologies/{ontology}/metrics`, and returns the JSON response or an error message.
    private async handleGetOntologyMetrics(args: any) { if (!args.ontology) { throw new McpError(ErrorCode.InvalidParams, 'Invalid ontology metrics arguments'); } try { const params: any = { apikey: this.apiKey, }; const response = await this.apiClient.get(`/ontologies/${args.ontology}/metrics`, { params }); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error fetching ontology metrics: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Input schema defining the required 'ontology' parameter as a string.
    inputSchema: { type: 'object', properties: { ontology: { type: 'string', description: 'Ontology acronym' }, }, required: ['ontology'], },
  • src/index.ts:720-721 (registration)
    Registration in the tool request handler switch statement dispatching to the handler function.
    case 'get_ontology_metrics': return this.handleGetOntologyMetrics(args);
  • src/index.ts:669-679 (registration)
    Tool registration in the tools list provided to MCP server, including name, description, and schema.
    { name: 'get_ontology_metrics', description: 'Get usage statistics and quality metrics for an ontology', inputSchema: { type: 'object', properties: { ontology: { type: 'string', description: 'Ontology acronym' }, }, required: ['ontology'], }, },

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