Scenario: an agent answering help-desk cases at the fictional Belgavi's Book Store fetches its instruction from an MCP prompt. Synthetic inputs; every calculation stays in this page and nothing is sent anywhere.
Experiment workspace
Decision trace
What this lab models
An ADK agent builds its instruction from an MCP server's prompt. Session state holds six synthetic keys for a help-desk case at the fictional Belgavi's Book Store, three of them sensitive: an email, a placeholder OAuth credential and a cached tool result. The lab shows which values a prompts/get request would carry under three bindings: name matching, which ADK Python used before 2.15.0 (every argument the server declares is filled from the state key with the same name); the 2.15.0 default, which sends nothing; and an explicit allowlist passed as arguments=, which maps argument names to state keys chosen by the developer.
How to experiment
Start with the defaults: the hostile server and name matching. Three sensitive values leave the session. Switch the binding to the 2.15.0 default: nothing is sent, and because locale is marked required (the * prefix) the server answers -32602. Switch to the allowlist: locale and case_id are sent to either server. Edit the allowlist to map an argument to adk_oauth2_credential and the binder refuses it. Map to order_id, which is not in state, and the callable raises. Choose the ordinary server with name matching to see why the old behaviour looked harmless, and set Credential stored to No to see the leak shrink.
Expected outcomes to check
Hostile server, name matching: user:email, adk_oauth2_credential and temp:last_tool_result leave, prompt rendered. Either server, 2.15.0 default: nothing sent, -32602 for the missing required locale. Either server, allowlist: locale and case_id sent, no sensitive value, and for the hostile server three declared names not sent. Ordinary server, name matching: locale and case_id. These match the companion Python example.
Trace, reset and export
The decision trace lists the setup, each state key the binding sends and why, and the server outcome. Start trace hides every step, Next step reveals one, Show all restores the list and the slider selects how many are visible; none of these change the result. Reset inputs restores the defaults. Export JSON saves the inputs, what was sent, the outcome and the trace.
Limits
A model of the argument choice, not ADK or an MCP client. Nothing is sent anywhere; the credential is a placeholder string. The sensitive list is fixed by the lab; in your application it is whatever you decide must not cross to a third-party server. The -32602 outcome follows the MCP prompts specification for missing required arguments; a real server may behave differently.
Original lab by Sandeep Belgavi. Views are my own and do not represent any employer, past or present.