Skip to main content
Glama
mackerelio-labs

Mackerel MCP Server

Official

Get Service Metrics

get_service_metrics
Read-only

Retrieve custom metrics data for a specific Mackerel service, such as response times, page views, or sales counts, to monitor business KPIs and performance.

Instructions

Retrieve metrics data for a specific service from Mackerel.

šŸ” USE THIS TOOL WHEN USERS:

  • "Service metrics" are metrics that correspond to a service that consists of multiple hosts and their collective roles

  • The following can be visualized and monitored.

    • The total number of registered users in a service

    • The number of PVs for a website

    • Business related KPIs such as sales or the number of orders received from EC sites

šŸ“Š AVAILABLE METRIC NAMES:

  • Custom metrics: http.response_time, sales.count, analytics.page_view, etc.

Get service page views

get_service_metrics(serviceName="web", name="analytics.page_view", 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., __externalhttp.responsetime.<monitorId>, sales.count, analytics.page_view, etc.)
serviceNameYesService name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A3.9/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a safe read, so the description's main job is to add beyond that. It clarifies the metric namespace and gives concrete call examples, but says nothing about pagination, rate limits, or the shape of returned series data.

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?

Front-loaded with purpose and usage guidance, and the examples are genuinely useful for the tricky metric-name format. The emoji-headed bullet lists add some visual bulk but each section earns its place.

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

Completeness4/5

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

For a read-only query tool with no output schema, the description supplies what the agent needs to pick it and form a valid metric name. Only the return-format and empty-result behavior remain unspecified, which is a minor gap given the annotations.

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?

Schema coverage is 100%, so all four parameters are already documented and the 'name' param already carries the same example metric names. The description reinforces the metric-name formats and shows them in context, but does not add syntax or format meaning beyond the schema, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Retrieve metrics data for a specific service') and disambiguates from the sibling get_host_metrics by explaining that service metrics aggregate multiple hosts and their collective roles. An agent can distinguish this tool's scope without opening the schema.

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

Usage Guidelines4/5

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

The explicit 'USE THIS TOOL WHEN USERS' block and the definition of what a service metric is provide clear context for selection. However, it never names alternatives such as get_host_metrics or list_http_server_stats, so exclusions are left to inference.

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