Skip to main content
Glama

Compare Report With Baseline

get_diff
Read-onlyIdempotent

Compare a report with its baseline, as the PR comment does: regressions, improvements and broken budgets. Read the top-level verdict first.

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": {
      "repo": "<repo>",
      "benchmark": "<benchmark>"
    },
    "name": "get_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoA report id as the head.
prNoPull request number: the PR's newest report is the head. One of `pr`, `commit`, `id`.
repoYesThe repository as `owner/name`, as `list_repos` prints it.
rowsNo`findings` (default without `select`): the rows the PR comment lists. `advisory`: plus the findings of unjudged families. `all` (default with `select`): every row, cell and total.
eventNoNarrows `pr` / `commit` to one event; not with `id`.
commitNoFull 40-character commit sha: the newest report measuring it or headed at it is the head.
selectNoKeep only the rows and omissions of these entities, as in get_report: per resource exact `keys`; an io label keeps every op row of it. A section left without any is dropped. Combines with `rows`.
preciseNo`true`: values, changes and budget figures unrounded, durations in `ns`, sizes in `B`. Default `false`: rounded for reading.
benchmarkYesThe benchmark name, as `list_benchmarks` prints it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / precise
      Added value: +{
      +  "description": "`true`: values, changes and budget figures unrounded, durations in\n`ns`, sizes in `B`. Default `false`: rounded for reading.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. Changed5 schema fields changed
    • changedInput schema / $defs / ResourceSelect / properties / keys / description
      Previous value: -"Exact, case-sensitive entity keys, as the diff's rows name them."New value: +"Exact, case-sensitive entity keys. Their format depends on the\nresource and is given by its field of `Select`; mostly a diff row's\n`key`, but io takes the value's label and keeps every operation of it."
    • changedInput schema / $defs / Select / properties / io / description
      Previous value: -"I/O keys: `label | operation | -`."New value: +"I/O keys: the value's label (`sock`), never `label | operation | -`;\nit keeps the value's whole payload entry and every op row of it in a\ndiff."
    • changedInput schema / $defs / Select / properties / threads / description
      Previous value: -"Thread keys: the thread name (threads sharing one are summed)."New value: +"Thread keys: the thread name; keeps every thread of that name in a\npayload and the diff's row summing them."
    • changedInput schema / properties / rows / description
      Previous value: -"`findings` (default): the rows the PR comment lists. `advisory`: plus\nthe findings of unjudged families. `all`: every row, cell and total.\nNot with `select`."New value: +"`findings` (default without `select`): the rows the PR comment lists.\n`advisory`: plus the findings of unjudged families. `all` (default\nwith `select`): every row, cell and total."
    • changedInput schema / properties / select / description
      Previous value: -"Named entities to compare, as in `list_reports`: per resource, exact\n`keys`, each with every value of every section. Answers `rows: selected`, no\nsection rows, and a `metrics` object with `base`, `head` and\n`change_percent` per value, whatever the policy lists or ignores and\nwhatever moved. Not with `rows`."New value: +"Keep only the rows and omissions of these entities, as in get_report:\nper resource exact `keys`; an io label keeps every op row of it. A\nsection left without any is dropped. Combines with `rows`."
  3. Changed6 schema fields changed
    • addedInput schema / $defs / ResourceSelect
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "One resource of a `Select`: the entities to read, each with every\nsection and value the report has of it.",
      +  "properties": {
      +    "keys": {
      +      "description": "Exact, case-sensitive entity keys, as the diff's rows name them.",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "keys"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / $defs / Select
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "`select=` as sent: per resource, exact entity keys.\nShared by the REST query and the MCP tools, whose schema it is.",
      +  "properties": {
      +    "channels": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Channel keys: the label."
      +    },
      +    "functions": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Function keys: the function name (`crate::module::fn`)."
      +    },
      +    "http": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "HTTP call keys: `name | route | source`, `-` for a part the entry lacks."
      +    },
      +    "io": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "I/O keys: `label | operation | -`."
      +    },
      +    "mutexes": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Mutex keys: the label."
      +    },
      +    "rw_locks": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "RwLock keys: the label."
      +    },
      +    "server": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Route keys: the route (`GET /users/{id}`)."
      +    },
      +    "sql": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "SQL keys: `query | route | source`, `-` for a part the entry lacks."
      +    },
      +    "threads": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ResourceSelect"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Thread keys: the thread name (threads sharing one are summed)."
      +    }
      +  },
      +  "type": "object"
      +}
    • removedInput schema / properties / rows / $ref
      Removed value: -"#/$defs/Rows"
    • addedInput schema / properties / rows / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/Rows"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / rows / description
      Previous value: -"`findings` (default): the rows the PR comment lists. `advisory`: plus\nthe findings of unjudged families. `all`: every row, cell and total."New value: +"`findings` (default): the rows the PR comment lists. `advisory`: plus\nthe findings of unjudged families. `all`: every row, cell and total.\nNot with `select`."
    • addedInput schema / properties / select
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/Select"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Named entities to compare, as in `list_reports`: per resource, exact\n`keys`, each with every value of every section. Answers `rows: selected`, no\nsection rows, and a `metrics` object with `base`, `head` and\n`change_percent` per value, whatever the policy lists or ignores and\nwhatever moved. Not with `rows`."
      +}
  4. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the description only needs to add behavioral context. It does so by disclosing the shape of the comparison result (regressions, improvements, broken budgets) and advising the agent to read the top-level `verdict` first, which is real value beyond the annotations. It stops short of discussing missing baselines or truncation of large diffs.

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?

Two short sentences, front-loaded with the comparison purpose before the read-order tip. The PR-comment analogy is compact and useful, though slightly opaque to an agent unfamiliar with the product's comment format.

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 nine-parameter tool with a rich nested `select` schema and no output schema, the description gives enough about what comes back (verdict plus regressions/improvements/budget breaks) to orient an agent. Remaining details — no-baseline behavior, result size — are modest gaps rather than blockers.

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 description coverage is 100%, with each of the nine parameters documented in the schema, including head selection via pr/commit/id, rows modes and select semantics. The description adds no parameter-level meaning at all, so the baseline 3 applies.

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 uses a specific verb+resource pair ("Compare a report with its baseline") and enumerates what the comparison yields: regressions, improvements and broken budgets. It is clearly distinct from get_report, the sibling that reads a single report, though it never names that sibling explicitly.

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 phrase "as the PR comment does" implies the context where this tool is the right choice (CI/PR review), and "Read the top-level `verdict` first" gives post-call guidance. However, there is no explicit when-to-use vs. get_report routing and no stated preconditions (e.g., whether a baseline must exist, what happens when there is none).

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.