Flutter MCP Toolkit

v8.0.0
io.github.Arenukvern/flutter-mcp-toolkit Checked 3 hours ago Published 9 days ago

Inspect 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.

ParameterTypeDescription
connectionobject
forcebooleanIf 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).

ParameterTypeDescription
connectionobject

fmt_connect_debug_app

Connect to a Flutter debug VM. Use this to select an app when multiple are running.

ParameterTypeDescription
connectionobject

fmt_discover_debug_apps

Discover Flutter debug targets with canonical ws target URIs.

ParameterTypeDescription
connectionobject

fmt_get_vm

Utility: Get VM information from a Flutter app. This is a VM service method, not a Flutter RPC.

ParameterTypeDescription
connectionobject

fmt_get_extension_rpcs

Utility: List all available extension RPCs in the Flutter app.

ParameterTypeDescription
connectionobject
isRawResponsebooleanIf true, returns the raw VM response without post-processing.
isolateIdstringOptional 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.

ParameterTypeDescription
ref *stringWidget ref from semantic_snapshot (e.g. "s_0").
connectionobject
snapshotIdintegerOptional: 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.

ParameterTypeDescription
ref *stringText field ref.
text *stringText to enter.
connectionobject
snapshotIdintegerOptional: snapshotId input. Use the snapshot_id returned by most recent semantic_snapshot. If provided and stale, the call fails with stale_snapshot.

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").

ParameterTypeDescription
direction *stringScroll direction: up, down, left, right.
connectionobject
distancenumberScroll distance in logical pixels (default: 300).
refstringOptional: the list to scroll, or any node inside it. Without it, the list under the screen centre scrolls.
snapshotIdintegerOptional: 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.

ParameterTypeDescription
ref *stringWidget ref.
connectionobject
snapshotIdintegerOptional: 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.

ParameterTypeDescription
direction *stringSwipe direction: up, down, left, right.
connectionobject
distancenumberSwipe distance in logical pixels (default: 300).
refstringOptional ref to swipe from.
snapshotIdintegerOptional: 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.

ParameterTypeDescription
fromRef *stringSource widget ref.
toRef *stringTarget widget ref.
connectionobject
kindstringPointer 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…
snapshotIdintegerOptional: 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.

ParameterTypeDescription
ref *string
connectionobject
snapshotIdinteger

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.

ParameterTypeDescription
ref *stringWidget ref from semantic_snapshot (e.g. "s_0").
connectionobject
snapshotIdintegerOptional: 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.

ParameterTypeDescription
key *string
altboolean
connectionobject
ctrlboolean
metaboolean
shiftboolean

fmt_evaluate_dart_expression

Evaluate a Dart expression in the running app isolate. Returns the result of the expression as text.

ParameterTypeDescription
expression *stringDart expression to evaluate (e.g. "MyClass.instance.value").
connectionobject
libraryUristringOptional 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.

ParameterTypeDescription
compressbooleanCompress screenshots (default: true).
connectionobject
errorsCountintegerNumber of errors to include (default: 4).
includeErrorsbooleanInclude app errors (default: true).
includeSemanticsbooleanInclude 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.

ParameterTypeDescription
action *stringCurrently must be "dismiss".
connectionobject

fmt_navigate

Drive the registered Navigator: action=push|pop|popUntil. push and popUntil require route. push accepts arguments map. Requires MCPToolkitBinding.instance.navigatorKey = key on the app.

ParameterTypeDescription
action *string
argumentsobject
connectionobject
routestring

fmt_get_recent_logs

Get recent print() and log output from the running Flutter app.

ParameterTypeDescription
connectionobject
countintegerNumber 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).

ParameterTypeDescription
projectRoot *stringFlutter/Dart project root or single .dart file path.
applybooleanWhen true, apply migrations. Default false (report-only).
namespacestringDefault 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.

ParameterTypeDescription
connectionobject
fieldsarrayNode fields to return; "ref" is always included. Omit for every field. A name outside the list is refused before the call reaches the app.
identifierPrefixstringReturn 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.
lensstringRender 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…
subtreeOfstringReturn 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.

ParameterTypeDescription
connectionobject

fmt_inspect_widget_at_point

Inspect the deepest widget at global logical coordinates (x, y).

ParameterTypeDescription
x *integerGlobal logical X coordinate.
y *integerGlobal logical Y coordinate.
connectionobject
viewIdintegerOptional FlutterView id for multi-view apps.

fmt_get_app_errors

Get the most recent application errors from Dart VM.

ParameterTypeDescription
connectionobject
countintegerNumber of recent errors to retrieve (default: 4).

fmt_get_screenshots

Get screenshots of all views in the application.

ParameterTypeDescription
compressbooleanWhether to compress the images (default: true).
connectionobject
modestringScreenshot mode: auto, flutter_layer, or desktop_window (default: auto).
permissionPolicystringPermission 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.

ParameterTypeDescription
compressbooleanWhether screenshots should be compressed (default: true).
connectionobject
errorsCountintegerNumber of recent errors to include (default: 4).
includeErrorsbooleanInclude app errors (default: true).
includeViewDetailsbooleanInclude detailed view/widget data (default: true).
permissionPolicystringPermission policy: check_only, auto_request_once, or request_always (default: check_only).
screenshotModestringScreenshot mode: auto, flutter_layer, or desktop_window (default: auto).

fmt_focus_window

Focus the host macOS app window or iOS Simulator before desktop capture.

ParameterTypeDescription
connectionobject
targetPidintegerOptional 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.

ParameterTypeDescription
predicate *objectPredicate 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}…
connectionobject
timeoutMsintegerTimeout 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).

ParameterTypeDescription
fields *array
connectionobject
snapshotIdintegerOptional: 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…

ParameterTypeDescription
connectionobject

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…

ParameterTypeDescription
toolName *stringExact name of the tool to execute (from fmt_list_client_tools_and_resources)
argumentsobjectArguments to pass to the tool, matching its inputSchema requirements
connectionobject

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…

ParameterTypeDescription
resourceUri *stringExact URI of the resource to read (from fmt_list_client_tools_and_resources)
connectionobject