🍳 MCP Cookbook
Ten workflows you can copy. Each one gives the goal, the prompt you type, the tool calls the agent makes (in order, with the key arguments), a short result and some tips.
About the results
The results shown are illustrative: urls, ids, values and wording depend on your app and on your agent. The tool names and arguments are the real ones, see the Tools Reference.
Before you start: Flocon Desktop is running, your agent is connected, and your app is connected to Flocon. By default the tools use the device and app selected in Flocon Desktop (see targeting).
1. Why does this request fail
Goal: understand a failing call, and get a command to replay it yourself.
Prompt
My article page doesn't display. Is it a network call? If so, give me the cURL.
Tool calls
list_network_callswithonlyErrors: true,limit: 20: the failed calls of the current session.get_network_callwithcallId: "<id of the failing call>": headers, bodies, error and cURL (includeCurlistrueby default).
Result (illustrative)
GET /articles/42 failed with 500 Internal Server Error in 312 ms.
Response body: {"error":"article_service_unavailable"}
The request has the header Authorization: Bearer eyJ... (valid format).
curl -X GET 'https://api.example.com/articles/42' -H 'Authorization: Bearer eyJ...'
Tips
- The agent starts from summaries and only opens the calls it needs: bodies can be large.
- To search for a value anywhere (a header, a field of a body), ask for it: the agent uses
search_network_callswithquery. - Replaying the cURL in your terminal tells you if the error comes from the server or from what your app sends.
2. Mock an endpoint to test an error state
Goal: see how a screen behaves on a server error, without touching the backend.
Prompt
Make the articles endpoint fail with a 500 so I can check my error screen. Tell me when it's on, and turn it off at the end.
Tool calls
list_network_callswithurlContains: "/articles",limit: 5: finds a real captured call.create_network_mockwithfromCallId: "<id>",httpCode: 500,body: "{\"error\":\"internal_error\"}",displayName: "Articles 500": copies url, method and response from the call, and overrides the status and body. Active right away.- You open an article in the app and check the error screen.
update_network_mockwithmockId: "<id>",enabled: false: stops the mock without deleting it.
Result (illustrative)
Mock "Articles 500" created for GET .*/articles/.* : status 500, enabled.
...
Mock "Articles 500" is now disabled (kept in Flocon, you can enable it again).
Tips
- Mock a network failure instead of an HTTP error with
exceptionClassPath: "java.net.SocketTimeoutException"(nohttpCode). - Add
delayMsto also test the loading state. shared: trueapplies the mock to all your apps and devices: leave it off unless you want that.- Agents are told to prefer disabling over deleting, and to tell you which mocks are still enabled. See Mocking.
3. Reproduce a slow or flaky network
Goal: check loading states, timeouts and retries on a bad connection.
Prompt
Make my network slow (2 to 5 seconds) and flaky (30% of calls fail with a timeout or a 503). I'll navigate the app, then tell you when to stop.
Tool calls
list_bad_network_configs: reuses an existing config if there is one.create_bad_network_configwithname: "Slow and flaky",latencyTriggerProbability: 1,minLatencyMs: 2000,maxLatencyMs: 5000,errorProbability: 0.3,errors: [{"exceptionClassPath": "java.net.SocketTimeoutException"}, {"httpCode": 503, "body": "{\"error\":\"unavailable\"}"}],enabled: true.- You use the app. Then the agent can read the effect:
list_network_callswithsinceTimestamp: <time you started>, to see durations and failures. set_active_bad_network_configwith noconfigId: turns the simulation off, the config is kept.
Result (illustrative)
Active config: "Slow and flaky".
Since then: 41 calls, 12 failed (7 SocketTimeoutException, 5 with a 503), median duration 3.4 s.
The feed screen shows no error state after a 503: the list stays empty.
Simulation is now off.
Tips
- Asking the agent to look at the calls afterwards gives you evidence of what the user experienced, not only what you saw.
- Combine with workflow 8 to record the screen while the network is bad.
- Always finish with the simulation off: agents are told to do it and to say which config they left active. See Bad network.
4. Inspect the database after an action
Goal: check that what the user did was really saved, and with the right values.
Prompt
I just created an account in the app. Is the user saved in the database with the right email?
Tool calls
list_databases: gives thedatabaseId.list_database_tableswithdatabaseId: "<id>": the schema, to find the right table and columns.query_databasewithdatabaseId: "<id>",sql: "SELECT id, email, created_at FROM users ORDER BY created_at DESC LIMIT 3".- Optional:
list_database_query_logswithdatabaseId: "<id>",text: "users", to see the queries your app ran, if query logging is set up.
Result (illustrative)
users, 1 row matches: id=18, email="jean@example.com", created_at="2026-11-03 14:31:55".
The email is saved as typed, but without trimming: the input had a trailing space.
Tips
- Only read-only SQL runs (
SELECT,PRAGMA,EXPLAIN). Always keep aLIMIT: the app sends all the rows. - Preferences work the same way:
list_shared_preferences, thenget_shared_preference_valueswithsharedPreferenceIdand an optionaltextfilter. - Query logs show transactions: pass a
transactionIdfrom a previous result to see only one.
5. Crash triage
Goal: find the cause of a crash from what the app did just before.
Prompt
The app just crashed. What happened in the two minutes before?
Tool calls
get_timelinewith no argument: it anchors on the latest crash and says why. To be explicit:mode: "before_crash".get_crash_reportwithcrashId: "<id of the crash line, after crash:>": the full stack trace.get_network_callwithcallId: "<id of a suspicious line, after network:>"if a call looks wrong.- Optional:
show_in_timelinewith no argument, to open the zone around the crash in Flocon Desktop for you.
Result (illustrative)
Window: 14:31:05 to 14:32:10 (the minute before the latest crash, plus 5 s). 38 events, 3 anomalies:
- crash:c91 IllegalStateException: "token is null" (14:32:05)
- network:a7 POST /v1/checkout -> 401 (14:32:03)
- 12x GET /v1/feed in 3.1 s (14:31:48, loop)
The 401 happened 2 s before the crash, and the stack trace points to CheckoutViewModel.pay().
Tips
- The times are those of the phone, not your computer. Give times as
HH:mmand the tool uses the phone clock; the answer shows the window it chose. - Read the window and the
notesin the answer before concluding: an empty timeline can mean the window was wrong. - To check whether something was sent at all, use
search:get_timelinewithsearch: "checkout_failed"returnsfoundand never cuts the matches. excludeSources: ["database"]removes noisy transactions.- See Timeline and Crash reporter.
6. Toggle a feature flag and verify the calls change
Goal: check that flipping a flag really changes what the app does.
Flocon shows feature flags but does not change them: you flip the flag in your provider (Firebase, Statsig, your own debug menu...), the agent checks the effect.
Prompt
I'm going to turn
new_checkouton in our provider. Read the flag now, tell me when to flip it, then compare the network calls of the checkout before and after.
Tool calls
get_feature_flagwithprovider: "firebase",name: "new_checkout": state, variant and payload before.list_network_callswithurlContains: "/checkout": the calls before (note the time of the latest one).- You flip the flag, restart or refresh the app, and run the checkout again.
get_feature_flagagain: confirms the new variant.list_network_callswithurlContains: "/checkout",sinceTimestamp: <time of the flip>: the calls after.
Result (illustrative)
new_checkout (firebase): off -> treatment, payload {"steps":3}.
Before: POST /v1/checkout (1 call). After: POST /v2/checkout/init, POST /v2/checkout/confirm (2 calls).
The new flow is used, and /v1/checkout is no longer called.
Tips
- Use
list_feature_flagswithquery: "checkout"if you do not know the exact name or provider. - To compare two flows, ask the agent to put the two lists in a table.
- See Feature flags.
7. Accessibility audit by moving the focus
Goal: check what TalkBack reads, screen by screen, in the focus order. Android only: the focus tools need TalkBack and adb.
Prompt
TalkBack is on. Walk through the focus order of the profile screen and tell me every element without a content description.
Turn TalkBack on yourself on the device first: the agent cannot do that for you.
Tool calls
get_accessibility_state: is capture supported, is a screen reader running.clear_accessibility_events: starts from an empty list.get_accessibility_focused_node: where the focus is now.move_accessibility_focuswithdirection: "next", repeated: each call returns the element it landed on.list_accessibility_eventswithtype: "VIEW_FOCUSED",limit: 50: everything TalkBack received.
Result (illustrative)
Focus order of the profile screen (9 stops):
1. "Back" button 2. "Jean Dupont" heading 3. ImageButton (no content description)
4. "Follow" button ...
Problem: stop 3 is an ImageButton with no text and no content description, TalkBack would read "button".
Tips
move_accessibility_focusdoes not wrap around: the agent stops when the focus does not move.- If
list_accessibility_eventsis empty,get_accessibility_statetells why (no screen reader, capture not supported). - On iOS, the Swift and Flutter SDKs do not send accessibility events yet. See Accessibility.
8. Capture a screenshot and a recording of a bug for a ticket
Goal: attach proof to a bug report.
Prompt
Record me opening the cart and paying, stop when I tell you, then take a screenshot and list the failed calls for the ticket.
Tool calls
start_screen_recording.- You reproduce the bug.
take_screenshot: saved as a PNG inScreenshot/, and the image is returned so the agent can see the screen.stop_screen_recording: saved as an mp4 inScreenRecord/.list_network_callswithonlyErrors: trueandsinceTimestamp: <start time>: the failed calls during the recording.- Optional:
open_flocon_folderwithsubfolder: "ScreenRecord": opens the folder on your computer.
Result (illustrative)
Recording saved: ~/Documents/Flocon/ScreenRecord/record_com.example.shop_1736000000000.mp4
Screenshot saved in ~/Documents/Flocon/Screenshot/ (PNG).
The screenshot shows an empty payment form with no message. POST /payments returned 402 during the recording.
Tips
- Uses
adbon Android and the booted Simulator on iOS. Not available for a device connected over Wi-Fi. - One recording per device, and on Android
screenrecordstops by itself after 3 minutes. - Ask the agent to write the ticket text from what it saw, and attach the two files yourself.
9. Open a deeplink and check the network calls and the screen
Goal: check that a deeplink lands on the right screen and loads the right data.
Prompt
Open the deeplink for the profile of user 42 on the posts tab. Then tell me what screen it shows and which calls it made.
Tool calls
list_deeplinks: the deeplinks declared by the app, with their parameters.open_deeplinkwithlink: "myapp://profile/42?tab=posts",deeplinkId: <id from list_deeplinks>(keeps the label in the history).take_screenshot: the agent looks at the screen.list_network_callswithsinceTimestamp: <time just before the deeplink>: the calls it triggered.
Result (illustrative)
Deeplink opened. The screen shows the profile of "Marie" with the Posts tab selected.
Calls since: GET /users/42 -> 200 (180 ms), GET /users/42/posts?limit=20 -> 200 (240 ms).
Tips
- Fill every parameter of the link before opening it.
- Android uses
adb, iOS the booted Simulator. list_deeplink_historyshows what was already opened from Flocon. See Deeplinks.
10. Install Flocon in an existing project
Goal: add Flocon to an app (Kotlin, Swift or Flutter), or migrate it from 1.x, with the agent doing the edits.
This one uses the flocon-setup skill of the Flocon plugin, not the MCP tools. Install the plugin first, see Install with the Flocon plugin.
Prompt
Set up Flocon in this project. I want network and database, and it must not be in release builds.
What the agent does
- Detects the platform from the project files: Android (
com.android.application), Kotlin Multiplatform, Swift (.xcodeproj,Package.swift) or Flutter (pubspec.yaml). - Detects the version if Flocon is already there, and picks a path: install, migrate from 1.x to 2.0, or only add the missing plugins.
- Adds the dependencies following the matching setup: Kotlin (debug module,
-no-optwin for release), Swift Package Manager (FloconSwift), orflutter pub add floconand the plugin packages. - Starts Flocon in the app, and installs only the plugins the project really uses (it searches the code instead of guessing).
- Keeps it out of release: it inspects the real build variants and tells you exactly what it did (SDK inactive vs absent from the binary).
- Builds the touched targets and says what was not verified (running on a device, connection to Flocon Desktop, release build).
Result (illustrative)
Kotlin SDK 2.0: added flocon (debug) and flocon-no-op (release), network and database plugins.
Compiled debug and release. Not verified: the app running on a device and showing in Flocon Desktop.
Tips
- Then run the app with Flocon Desktop open, and ask: "List my network calls". If a tool returns nothing, the agent can tell which wiring is missing.
- The skill follows the docs of each SDK: if the skill and the docs disagree, the docs win, and it tells you.
- It works on a branch and does not touch your unrelated uncommitted changes.
- See Install with the Flocon plugin and Migrating from 1.x.