Flutter MCP Toolkit
v8.0.0Inspect and drive Flutter debug apps/games: semantic snapshots, search, and custom client tools
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
fmt_hot_reload_flutter
Hot reloads the Flutter app.
| Parameter | Type | Description |
|---|---|---|
connection | object | |
force | boolean | If true, forces a hot reload even if there are no source changes |
fmt_hot_restart_flutter
Hot restarts the Flutter app (full restart; state not preserved).
| Parameter | Type | Description |
|---|---|---|
connection | object |
fmt_connect_debug_app
Connect to a Flutter debug VM. Use this to select an app when multiple are running.
| Parameter | Type | Description |
|---|---|---|
connection | object |
fmt_discover_debug_apps
Discover Flutter debug targets with canonical ws target URIs.
| Parameter | Type | Description |
|---|---|---|
connection | object |
fmt_get_vm
Utility: Get VM information from a Flutter app. This is a VM service method, not a Flutter RPC.
| Parameter | Type | Description |
|---|---|---|
connection | object |
fmt_get_extension_rpcs
Utility: List all available extension RPCs in the Flutter app.
| Parameter | Type | Description |
|---|---|---|
connection | object | |
isRawResponse | boolean | If true, returns the raw VM response without post-processing. |
isolateId | string | Optional specific isolate ID to inspect. If omitted, checks all isolates. |
fmt_tap_widget
Tap a widget identified by ref from semantic_snapshot. Refs are session-scoped to the most recent semantic_snapshot call.
| Parameter | Type | Description |
|---|---|---|
ref * | string | Widget ref from semantic_snapshot (e.g. "s_0"). |
connection | object | |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_enter_text
Enter text into a text field identified by ref from semantic_snapshot. Taps the field to focus before typing.
| Parameter | Type | Description |
|---|---|---|
ref * | string | Text field ref. |
text * | string | Text to enter. |
connection | object | |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_reveal_search
Find a semantic target that may be off-screen by taking a snapshot, matching one bounded selector, scrolling up to maxAttempts, and returning a fresh ref/snapshotId plus trace.
| Parameter | Type | Description |
|---|---|---|
query * | string | Target text or identifier to find in semantic snapshots. |
connection | object | |
direction | string | Scroll direction between snapshots. |
distance | number | Scroll distance in logical pixels between attempts. |
matchBy | string | Bounded selector field. "text" searches label, value, and hint. |
maxAttempts | integer | Maximum scroll attempts after the initial snapshot (default 5). |
fmt_scroll
Scroll to reveal content in a direction. "down" reveals content below (finger swipes up); "up" reveals content above. Matches Playwright and user language ("scroll down to see the footer").
| Parameter | Type | Description |
|---|---|---|
direction * | string | Scroll direction: up, down, left, right. |
connection | object | |
distance | number | Scroll distance in logical pixels (default: 300). |
ref | string | Optional: the list to scroll, or any node inside it. Without it, the list under the screen centre scrolls. |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_long_press
Long-press a widget identified by ref.
| Parameter | Type | Description |
|---|---|---|
ref * | string | Widget ref. |
connection | object | |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_swipe
Swipe to reveal content in a direction (higher pointer velocity than scroll; used for flings). "down" reveals content below.
| Parameter | Type | Description |
|---|---|---|
direction * | string | Swipe direction: up, down, left, right. |
connection | object | |
distance | number | Swipe distance in logical pixels (default: 300). |
ref | string | Optional ref to swipe from. |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_drag
Drag from one widget to another, identified by refs.
| Parameter | Type | Description |
|---|---|---|
fromRef * | string | Source widget ref. |
toRef * | string | Target widget ref. |
connection | object | |
kind | string | Pointer device to synthesize. Defaults to mouse on desktop targets and touch elsewhere. Mouse keeps scrollables out of the gesture arena, so the drag lands on the target's drag/pan recognizer (drag-an… |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_hover
Synthesize a mouse hover at the centre of a widget identified by a semantic snapshot ref, driving MouseRegion.onEnter/onExit. Desktop and web only. The hover stays parked, so an affordance it reveals survives the next semantic_snapshot; act on it with your next call — any other interaction releases the hover, and the affordance goes with it. Pass snapshotId to detect staleness.
| Parameter | Type | Description |
|---|---|---|
ref * | string | |
connection | object | |
snapshotId | integer |
fmt_focus_widget
Give keyboard focus to the widget identified by a semantic snapshot ref, so the press_key that follows reaches it. Performs the node's semantic focus action when it exposes one, otherwise asks the focusable widget inside the ref's bounds; the result proves where focus landed. Leaves a parked hover in place. Pass snapshotId to detect staleness.
| Parameter | Type | Description |
|---|---|---|
ref * | string | Widget ref from semantic_snapshot (e.g. "s_0"). |
connection | object | |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot. |
fmt_press_key
Synthesize a keyboard key press (down + up). Accepted keys: Enter, Escape, Tab, Backspace, Delete, Space, ArrowUp/Down/Left/Right, and single ASCII chars (a-z, 0-9). Optional modifiers: ctrl, shift, alt, meta.
| Parameter | Type | Description |
|---|---|---|
key * | string | |
alt | boolean | |
connection | object | |
ctrl | boolean | |
meta | boolean | |
shift | boolean |
fmt_evaluate_dart_expression
Evaluate a Dart expression in the running app isolate. Returns the result of the expression as text.
| Parameter | Type | Description |
|---|---|---|
expression * | string | Dart expression to evaluate (e.g. "MyClass.instance.value"). |
connection | object | |
libraryUri | string | Optional library URI for evaluation scope (e.g. package:myapp/main.dart). Defaults to root library. |
fmt_hot_reload_and_capture
Hot reload then capture screenshot + semantic snapshot + errors in a single call. Tight edit-preview cycle for AI iteration.
| Parameter | Type | Description |
|---|---|---|
compress | boolean | Compress screenshots (default: true). |
connection | object | |
errorsCount | integer | Number of errors to include (default: 4). |
includeErrors | boolean | Include app errors (default: true). |
includeSemantics | boolean | Include semantic snapshot (default: true). |
fmt_handle_dialog
Dismiss the topmost popup/dialog route on the registered Navigator. Currently only action="dismiss" is supported. Requires MCPToolkitBinding.instance.navigatorKey = key on the app.
| Parameter | Type | Description |
|---|---|---|
action * | string | Currently must be "dismiss". |
connection | object |
fmt_get_recent_logs
Get recent print() and log output from the running Flutter app.
| Parameter | Type | Description |
|---|---|---|
connection | object | |
count | integer | Number of recent log entries (default: 50). |
fmt_migrate_agent_entries
Scan Dart sources for legacy MCPCallEntry and return a migration report. Set apply=true to rewrite files in place (host filesystem paths only).
| Parameter | Type | Description |
|---|---|---|
projectRoot * | string | Flutter/Dart project root or single .dart file path. |
apply | boolean | When true, apply migrations. Default false (report-only). |
namespace | string | Default AgentCallEntry namespace (default: app). |
fmt_semantic_snapshot
Get compact semantic tree of interactive widgets with refs usable by interaction tools (tap_widget, enter_text, etc.). A control that appears only under the pointer is absent here: on desktop and web, hover the element that should own it and snapshot again.
| Parameter | Type | Description |
|---|---|---|
connection | object | |
fields | array | Node fields to return; "ref" is always included. Omit for every field. A name outside the list is refused before the call reaches the app. |
identifierPrefix | string | Return only nodes whose Semantics identifier starts with this prefix ("nav." for one navigation rail). Refs are those of the full tree, so a ref from a filtered snapshot works everywhere. |
lens | string | Render usefulness for the "render" field: "standard" (default) is the full grammar; "compact" shortens roles and drops unnamed container rows for the act loop (refs, names, identifiers and state suffi… |
subtreeOf | string | Return only this node and its descendants. A ref from the latest snapshot ("s_12") or a Semantics identifier; a ref is tried first. Fails with subtree_root_not_found without spending a snapshot when n… |
fmt_get_view_details
Get details for all views in the application.
| Parameter | Type | Description |
|---|---|---|
connection | object |
fmt_inspect_widget_at_point
Inspect the deepest widget at global logical coordinates (x, y).
| Parameter | Type | Description |
|---|---|---|
x * | integer | Global logical X coordinate. |
y * | integer | Global logical Y coordinate. |
connection | object | |
viewId | integer | Optional FlutterView id for multi-view apps. |
fmt_get_app_errors
Get the most recent application errors from Dart VM.
| Parameter | Type | Description |
|---|---|---|
connection | object | |
count | integer | Number of recent errors to retrieve (default: 4). |
fmt_get_screenshots
Get screenshots of all views in the application.
| Parameter | Type | Description |
|---|---|---|
compress | boolean | Whether to compress the images (default: true). |
connection | object | |
mode | string | Screenshot mode: auto, flutter_layer, or desktop_window (default: auto). |
permissionPolicy | string | Permission policy: check_only, auto_request_once, or request_always (default: check_only). |
fmt_capture_ui_snapshot
Capture screenshots, view details, and app errors in one response.
| Parameter | Type | Description |
|---|---|---|
compress | boolean | Whether screenshots should be compressed (default: true). |
connection | object | |
errorsCount | integer | Number of recent errors to include (default: 4). |
includeErrors | boolean | Include app errors (default: true). |
includeViewDetails | boolean | Include detailed view/widget data (default: true). |
permissionPolicy | string | Permission policy: check_only, auto_request_once, or request_always (default: check_only). |
screenshotMode | string | Screenshot mode: auto, flutter_layer, or desktop_window (default: auto). |
fmt_focus_window
Focus the host macOS app window or iOS Simulator before desktop capture.
| Parameter | Type | Description |
|---|---|---|
connection | object | |
targetPid | integer | Optional VM process id (defaults to the connected VM). |
fmt_wait_for
Wait for a UI predicate (text/noText/node/time/stable/noError) and return a fresh semantic snapshot. Replaces sleep+snapshot polling. text matches any string in the tree, including the label of a tab that is not open — wait on state with node: {"kind":"node","identifier":"…","selected":true}, or add "absent":true to wait for it to go away. Default timeout 5000 ms, max 30000 ms.
| Parameter | Type | Description |
|---|---|---|
predicate * | object | Predicate map. Shapes: {kind:"time", ms:int} | {kind:"text", text:String} | {kind:"noText", text:String} | {kind:"node", identifier:String, selected/enabled/focused/checked/toggled:bool, absent:bool}… |
connection | object | |
timeoutMs | integer | Timeout in ms (default 5000, max 30000). |
fmt_fill_form
Batch text entry: enters text into multiple fields in one call. Stops on first failure. Each field: {ref, text}. Pass snapshotId to validate against the most recent semantic_snapshot (checked on the first field only).
| Parameter | Type | Description |
|---|---|---|
fields * | array | |
connection | object | |
snapshotId | integer | Optional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. Checked on the first field only. |
fmt_list_client_tools_and_resources
Discover all dynamically registered tools and resources from the connected Flutter application. Use this as your first step to understand what debugging and inspection capabilities are available. Returns tool definitions with names, descriptions, and input schemas, plus available resources with URIs. Essential for planning your debugging workflow and understanding the app's current MCP toolkit setup. To register custom surfaces: define AgentCallEntry.tool() or AgentCallEntry.resource() (namespace, name, description, inputSchema, handler returning AgentResult), 2) Register in the Flutter app…
| Parameter | Type | Description |
|---|---|---|
connection | object |
fmt_client_tool
Execute a specific dynamically registered tool from the Flutter application. Use this to run debugging tools, inspect app state, take screenshots, analyze errors, or execute custom tools. Names/URIs must match exactly what appears in fmt_list_client_tools_and_resources. Arguments should conform to the tool's inputSchema requirements. This is your primary way to interact with Flutter app functionality beyond static MCP server tools. For custom tools: To register custom surfaces: define AgentCallEntry.tool() or AgentCallEntry.resource() (namespace, name, description, inputSchema, handler retur…
| Parameter | Type | Description |
|---|---|---|
toolName * | string | Exact name of the tool to execute (from fmt_list_client_tools_and_resources) |
arguments | object | Arguments to pass to the tool, matching its inputSchema requirements |
connection | object |
fmt_client_resource
Read content from a dynamically registered resource in the Flutter application. Resources provide structured data like app state, view details, or configuration information. Use this to access read-only information that doesn't require tool execution. Names/URIs must match exactly what appears in fmt_list_client_tools_and_resources. Typically used for getting current app state snapshots or accessing structured data. For custom resources: To register custom surfaces: define AgentCallEntry.tool() or AgentCallEntry.resource() (namespace, name, description, inputSchema, handler returning AgentRe…
| Parameter | Type | Description |
|---|---|---|
resourceUri * | string | Exact URI of the resource to read (from fmt_list_client_tools_and_resources) |
connection | object |