Skip to main content
Glama

get_metrics

Read-onlyIdempotent

Retrieve runtime execution telemetry, tick duration percentiles, stuck events, category statistics, and 60Hz action outcome spool records for behavior tree performance analysis and spool inspection.

Instructions

Retrieve runtime execution telemetry, tick durations, stuck events, category statistics, and 60Hz action outcome spool entries (actions: current, history, aggregate, compare, spool, drain_spool). Use get_metrics instead of get_status when evaluating tick performance, reading spooled action outcomes, or inspecting aggregated statistics rather than active node traversal.

Returns telemetry metrics, duration percentiles, stuck event counts, spooled outcome records, or drained entry counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax records
actionYesMetrics query mode: current, history, aggregate, compare, spool, drain_spool
projectNoTarget project slug
trace_idNoDistributed trace ID
execution_idNoFilter metrics by execution ID
behavior_nameNoFilter metrics by behavior tree name
unsynced_onlyNoFilter only unsynced spool entries (action: spool)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.4.0
    • changedInput schema / properties / action / description
      Previous value: -"Metrics query mode: current, history, aggregate, compare"New value: +"Metrics query mode: current, history, aggregate, compare, spool, drain_spool"
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "current",
      -  "history",
      -  "aggregate",
      -  "compare"
      -]New value: +[
      +  "current",
      +  "history",
      +  "aggregate",
      +  "compare",
      +  "spool",
      +  "drain_spool"
      +]
    • addedInput schema / properties / unsynced_only
      Added value: +{
      +  "description": "Filter only unsynced spool entries (action: spool)",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changedv0.3.1
    • changedInput schema / properties / action / description
      Previous value: -"Metrics query mode"New value: +"Metrics query mode: current, history, aggregate, compare"
    • addedInput schema / properties / action / enum
      Added value: +[
      +  "current",
      +  "history",
      +  "aggregate",
      +  "compare"
      +]
  3. Changed9 schema fields changedv0.2.1
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / action / description
      Added value: +"Metrics query mode"
    • removedInput schema / properties / action / enum
      Removed value: -[
      -  "current",
      -  "history",
      -  "aggregate",
      -  "compare"
      -]
    • addedInput schema / properties / behavior_name / description
      Added value: +"Filter metrics by behavior tree name"
    • addedInput schema / properties / execution_id / description
      Added value: +"Filter metrics by execution ID"
    • addedInput schema / properties / limit / description
      Added value: +"Max records"
    • addedInput schema / properties / project / description
      Added value: +"Target project slug"
    • addedInput schema / properties / trace_id / description
      Added value: +"Distributed trace ID"
  4. First observedv0.1.2

TDQS

A3.6/5.0
Behavior1/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, but the tool exposes a drain_spool action returning 'drained entry counts' — draining consumes/removes spool entries, which is a state mutation and is not idempotent. The description thus contradicts the read-only/idempotent safety profile for at least one action, and it never warns that one action differs in side effects from the rest.

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 resource list, then routes to the alternative, then summarizes returns — a sensible order. The 'Returns telemetry metrics...' sentence largely re-states the opening list, and the action enum is repeated from the schema, adding minor redundancy.

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?

For a 7-param, 6-mode read/mutate hybrid with no output schema, the description does cover purpose, alternatives, and return categories. However it fails to disambiguate the side-effect profile across actions (drain_spool vs read-only modes), which is exactly the information an agent needs before invoking, so it is adequate but with a material gap.

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%, so every parameter is already documented, and the description merely repeats the action enum verbatim. It adds no syntax, format, or meaning (e.g., how trace_id interacts with execution_id filter, or what behavior_name expects) beyond the schema, matching the baseline 3.

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 (Retrieve) plus the concrete resource set: runtime telemetry, tick durations, stuck events, category statistics, and 60Hz action outcome spool entries. It also names the sibling it differs from (get_status) and the axis of difference (performance/spooled outcomes vs active node traversal), so an agent can separate the two without opening either schema.

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?

Contains an explicit when-to-use/when-not clause: 'Use get_metrics instead of get_status when evaluating tick performance, reading spooled action outcomes, or inspecting aggregated statistics rather than active node traversal.' The alternative tool and the selecting condition are both named.

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