Skip to main content
Glama
mackerelio-labs

Mackerel MCP Server

Official

Get Host Metrics

get_host_metrics
Read-only

Retrieve metrics data for a specific host from Mackerel to analyze performance over time across standard, custom, and cloud integration metrics.

Instructions

Retrieve metrics data for a specific host from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • Get metrics data for a specific host

  • Analyze host performance over time

šŸ“Š AVAILABLE METRIC NAMES:

  • Standard metrics (mackerel-agent): loadavg5, cpu.user, memory.used, disk.sda1.reads, network.eth0.rxBytes, etc.

  • Custom metrics: custom.myapp.* (user-defined metrics)

  • AWS integration: ec2.cpu.used, rds.database_connections.used, etc.

  • Azure integration: azure.virtual_machine.cpu.percent, azure.sql_database.cpu.percent, etc.

  • GCP integration: gce.instance.cpu.used, etc.

Get custom metric

get_host_metrics(hostId="host123", name="custom.myapp.response_time", from=1609459200, to=1609462800)

Get AWS EC2 CPU utilization

get_host_metrics(hostId="host123", name="ec2.cpu.used", from=1609459200, to=1609462800)

Input Schema

NameRequiredDescriptionDefault
toYesThe end of the time period you want metrics for (unix time)
fromYesThe start of the time period you want metrics for (unix time)
nameYesMetric name (e.g., loadavg5, cpu.user, memory.used, custom.myapp.*, ec2.cpu.used, etc.)
hostIdYesHost ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The readOnlyHint annotation already establishes that this is a safe read operation. The description adds useful metric-name categories, but does not disclose return format, time-series granularity, rate limits, or constraints on the time range.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is front-loaded and organized into purpose, usage, metric names, and examples. It is somewhat lengthy with emoji headings and repetitive examples, but the content is generally purposeful for metric selection.

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

Completeness3/5

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

The description explains how to call the tool and which metric names are available. However, with no output schema, it does not describe the return shape or time-series format, and it omits constraints such as maximum time range or data resolution.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all four required parameters. The description adds meaningful guidance for the name parameter by enumerating standard, custom, AWS, Azure, and GCP metric naming conventions, plus concrete examples.

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?

States a specific verb and resource: retrieve metrics data for a specific host from Mackerel. It does not explicitly differentiate from the sibling get_service_metrics, but the host-specific scope makes the purpose clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'USE THIS TOOL WHEN USERS' section gives a clear context for host metrics and performance analysis, but it largely restates the purpose. It provides no when-not conditions or explicit alternatives such as get_service_metrics.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.