Skip to main content
Glama

State-management activity

get_state_activity
Read-onlyIdempotent

Track state-management activity counts and timing, and find when build-heavy frames coincide, to diagnose if rebuild storms stem from state churn.

Instructions

How much state-management activity the app is doing and when, plus how often build-heavy frames coincide with it — use with get_rebuilds to answer 'is this rebuild storm driven by state churn'. Counts and timing only: Riverpod sends an app-side buffer offset and provider an element id, neither resolvable to a provider name or value. Counts are NOT transition counts — a provider event means dependents were notified, so one state change in a widget-heavy tree produces many events. Stock Bloc posts nothing itself; a flutter_bloc app appears here only as the provider activity its notifications cause.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketsNoHow many of the busiest one-second buckets to return.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.21.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already establish read-only, idempotent, non-destructive behavior, but the description adds substantial non-obvious context: Riverpod emits an opaque buffer offset and provider emits an element id, neither resolvable to a provider name; counts are event notifications rather than transition counts, so one state change in a heavy tree yields many events; and stock Bloc posts nothing. These caveats materially change how an agent should interpret the numbers.

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?

Three dense sentences, each carrying distinct information, with the primary purpose front-loaded before the get_rebuilds pairing and the interpretation caveats. The later sentences are long but every clause earns its place; nothing is redundant.

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, so the description must convey what comes back, and it does describe the shape at a high level (counts and timing, per-bucket busiest seconds) plus the key interpretive traps. It could be slightly more explicit about the return structure, but it covers what an agent needs to interpret results 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 description coverage is 100% and the single 'buckets' parameter is already documented in the schema with its default, maximum, and meaning. The description adds no further syntax, units, or semantics for it, so the 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?

The description states a specific resource and measurement ('how much state-management activity the app is doing and when, plus how often build-heavy frames coincide with it'), which is far more precise than the tool name alone. It distinguishes itself from siblings by naming get_rebuilds as the complementary tool rather than a substitute.

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?

It gives an explicit usage context: pair with get_rebuilds to answer 'is this rebuild storm driven by state churn.' That is a clear condition that routes the agent to the right combination of tools. It stops short of stating when not to use this tool or what other diagnostic siblings might supersede it.

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