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);
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 of behavioral disclosure. It states the tool retrieves metrics but does not describe any behavioral traits such as permissions needed, rate limits, response format, or whether it's a read-only operation. This is a significant gap 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 that efficiently conveys the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It does not address what the metrics include, how they are returned, or any operational context, which is insufficient for a tool that retrieves data without structured output documentation.

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, with the single parameter 'ontology' documented as 'Ontology acronym'. The description does not add any additional meaning beyond this, such as examples or constraints, so it meets the baseline of 3 where 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 action ('Get') and the target ('usage statistics and quality metrics for an ontology'), which is specific and informative. However, it does not explicitly differentiate this tool from its siblings like 'get_analytics_data' or 'get_ontology_info', which might also involve retrieving data about ontologies, leaving some ambiguity in sibling distinction.

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 such as 'get_analytics_data', 'get_ontology_info', and 'get_class_info', there is no indication of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names alone.

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