Skip to main content
Glama

get_ontology_metrics

Retrieve usage statistics and quality metrics for biological ontologies to assess their reliability and application scope.

Instructions

Get usage statistics and quality metrics for an ontology

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ontologyYesOntology acronym

Implementation Reference

  • The main handler function for the 'get_ontology_metrics' tool. It validates the ontology parameter, makes an API call to the BioOntology /ontologies/{ontology}/metrics endpoint, and returns the metrics as JSON 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 for the tool, specifying the required 'ontology' string parameter.
    inputSchema: { type: 'object', properties: { ontology: { type: 'string', description: 'Ontology acronym' }, }, required: ['ontology'], },
  • src/index.ts:669-679 (registration)
    Registration of the 'get_ontology_metrics' tool in the MCP server's tools list, including name, description, and input 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'], }, },
  • src/index.ts:720-721 (registration)
    Switch case in the tool dispatcher that routes calls to 'get_ontology_metrics' to the specific handler method.
    case 'get_ontology_metrics': return this.handleGetOntologyMetrics(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