Skip to main content
Glama

get_histogram

Read-only

What is the shape of one metric? Returns histogram buckets (count + share) plus summary stats.

Metric: one of lcp, inp, cls, fcp, ttfb (field CWV), or a scalar technique path when available.

Filter: same as get_metrics (device, cms, framework, cdn, provider). No group_by — call get_metrics with group_by to compare segments, then get_histogram per segment if needed.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "metric": "<metric>"
    },
    "name": "get_histogram"
  }
}

Input Schema

NameRequiredDescriptionDefault
filterNoAND filters. Omit for all sites in the dataset. Keys: device (all|phone|desktop; mobile = phone), cms, framework, cdn, provider (key), provider_category (e.g. analytics — use with provider or alone is not enough; prefer group_by for rankings).
metricYeslcp | inp | cls | fcp | ttfb, or a contract scalar path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / filter / description
      Previous value: -"AND filters. Omit for all sites in the dataset. Keys: device (all|phone|desktop), cms, framework, cdn, provider (key), provider_category (e.g. analytics — use with provider or alone is not enough; prefer group_by for rankings)."New value: +"AND filters. Omit for all sites in the dataset. Keys: device (all|phone|desktop; mobile = phone), cms, framework, cdn, provider (key), provider_category (e.g. analytics — use with provider or alone is not enough; prefer group_by for rankings)."
    • changedInput schema / properties / filter / properties / device / description
      Previous value: -"CrUX device slice. Default: all."New value: +"CrUX device slice: phone (mobile and smartphone are the same), desktop or all. Default: all. Any other value is refused (there is no tablet slice)."
    • changedInput schema / properties / filter / properties / device / enum
      Previous value: -[
      -  "all",
      -  "phone",
      -  "desktop"
      -]New value: +[
      +  "all",
      +  "phone",
      +  "mobile",
      +  "smartphone",
      +  "desktop"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds real behavioral value by describing the return shape (buckets with count and share, plus summary stats) and by disclosing the deliberate absence of segment grouping. It doesn't mention cost, sampling, or bucket boundaries, but nothing material is missing for a read-only query.

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-loads the purpose in a single question, then gives two tight paragraphs for metric and filter. Slight redundancy between the filter paragraph and the already-documented schema, but there is no filler and every line orients the caller.

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?

There is no output schema, and the description compensates by explaining that buckets carry count and share plus summary stats. It also clarifies the filter/grouping contract relative to get_metrics. Minor gaps remain — no statement of bucket granularity or result limits — but the definition is sufficient to invoke the tool correctly.

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% and the nested filter object already documents device/cms/framework/cdn/provider, so the description only reinforces what the schema provides ('same as get_metrics'). Its one genuine addition is the metric enumeration, though that also appears in the schema's metric description. Baseline 3 is appropriate.

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 capability in the opening line: returns a distribution (histogram buckets with count and share) plus summary stats for exactly one metric. It also scopes what a metric can be (lcp, inp, cls, fcp, ttfb, or a scalar technique path), which separates it cleanly from get_metrics.

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

Usage Guidelines5/5

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

Explicitly states when not to use it — no group_by here — and names the alternative workflow: 'call get_metrics with group_by to compare segments, then get_histogram per segment if needed.' That is a concrete routing rule an agent can act on without inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.