Skip to main content
Glama
flutter-devtools-mcp

flutter-devtools-mcp

by draganbajic

get_memory_snapshot

Capture a memory allocation profile of a running Flutter app to inspect heap usage, top memory-consuming classes, and potential leak indicators.

Instructions

Get a memory allocation profile of the running Flutter app. Shows heap usage, top memory-consuming classes, and potential leak indicators.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_memory_snapshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNNoNumber of top memory-consuming classes to show
forceGCNoForce garbage collection before taking the snapshot (gives a more accurate view of live objects)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It tells the agent what information comes back, but leaves open key behaviors: whether the snapshot is ephemeral or persisted (critical given a save_snapshot sibling), whether an active app connection is required, and that forceGC mutates app state before measuring. These gaps are meaningful for a profiling operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the primary action and followed by the return contents. Nothing is redundant and no sentence fails to earn 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 two-optional-parameter read tool with a fully documented schema, the description supplies the essential purpose and a summary of return contents, which partly compensates for the absent output schema. The main omission is the relationship to snapshot-persistence and comparison siblings, which an agent still has to guess.

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 both parameters (topN, forceGC) are documented there with defaults and ranges, so the baseline is 3. The description adds no semantics about the parameters, not even that forceGC affects the accuracy and cost of the result it describes.

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?

A concrete verb+resource ("Get a memory allocation profile of the running Flutter app") followed by an enumeration of what the profile contains: heap usage, top consuming classes, and leak indicators. It is clear what the tool does, but nothing distinguishes it from siblings like save_snapshot or compare_snapshots, which are close in domain.

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?

Usage is only implied: an agent can infer this is the tool for investigating memory pressure or suspected leaks. There is no explicit when-to-use/when-not-to-use guidance and no routing to alternatives such as save_snapshot (persist) or compare_snapshots (diff), even though those overlap heavily.

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