Why this matters
Consider a widget creation scenario. The user is viewing a dashboard with employee data. They ask the agent to “make a table showing this data.” The MCP toolcreate_widget needs two things:
- Instructions like “make a table with columns for name, department, and salary”. The LLM should generate this because it requires reasoning about what widget to build.
- The data payload (thousands of tokens of JSON). The LLM should not touch this because it adds zero value by copying it.
When to use pass-through parameters
Use them when the host page already has data that a tool needs, and the LLM would only be copying it verbatim. Good candidates:- JSON data payloads from the host page’s API
- Existing widget or document source code that needs editing
- File references or URLs that the platform manages
- Any structured data over a few hundred characters
- The LLM needs to generate or transform the data (that’s the LLM’s job)
- The data originates from another tool’s output during the conversation (that’s LLM orchestration)
- The LLM needs to reason about the data to give a good response (use situational awareness for that)
How pass-through compares to other data channels
Mindset AI has several channels for passing data from the host page to the agent system:| Pass-through parameters | Situational awareness | Page tools | |
|---|---|---|---|
| Direction | Host page to tools | Host page to agent | Agent to host page |
| Purpose | Give tools exact data without LLM involvement | Give the agent context to reason about | Let the agent take actions on the page |
| Who sees it | The MCP server only | The LLM (in its system prompt) | Agent calls it; handler runs in browser |
| Data fidelity | Exact (byte-for-byte) | Approximate (LLM interprets it) | n/a (input flows the other way) |
| Token cost | Zero LLM tokens | Uses prompt tokens | Zero LLM tokens for the call args (LLM still generates them) |
Platform-managed parameters
Some parameters are managed entirely by Mindset AI as infrastructure-level transport mechanisms, so you don’t set them. The most important example is file uploads. When a user uploads an image in the chat UI, Mindset AI uploads it to cloud storage and generates a time-limited signed URL. That URL needs to reach MCP tools that can process images, but the LLM should never see it (it can’t fetch URLs, and it might hallucinate fake ones). Platform-managed parameters are always hidden from the LLM, regardless of whether a value exists. The host page doesn’t need to configure anything; Mindset AI handles the entire lifecycle. Current platform-managed parameters:| Parameter | What it does |
|---|---|
uploaded_file_urls | Delivers signed cloud storage URLs for user-uploaded files (images, PDFs) to any MCP tool that accepts them. The user uploads a file in the chat UI; Mindset AI handles storage, URL signing, and delivery to tools. |
Setting pass-through parameters
Two ways to set pass-through values: an HTML attribute for static initial values, and a JavaScript method for dynamic updates.HTML attribute
passthrough-params attribute value is a JSON-encoded string. Write the JSON object inline (escaping quotes as needed by your HTML), with each key identifying a tool parameter and each value as the string to inject. The SDK parses the string on read. Both passthrough-params (kebab-case) and passthroughParams (camelCase) are accepted. For dynamic updates after the page loads, use the JavaScript method instead. It takes a real object, not a string.
JavaScript method
agent.setPassthroughParams() is sync. Call it once mindset.init() has completed and the element has fired mindset:agent-idle. See § When the element is ready to call. To clear all pass-through params, pass an empty object:
Key formats
Two formats are supported for the keys in the pass-through params object.Targeted: tool_name.parameter_name
Injects into exactly one tool’s parameter. Use when you know the specific tool and parameter.
data_payloadis stripped fromcreate_widget’s schema only. Other tools that happen to have adata_payloadparameter are unaffected.current_mdxis stripped fromedit_widget’s schema only.
Wildcard: parameter_name
Injects into any tool that has a parameter with that name. Use when the value should be available regardless of which tool the LLM decides to call.
reference_image parameter, all three have it stripped from their schemas and all three receive the injected value when called.
A wildcard key injects into every tool that declares a parameter of that name. When you add new tools to the agent (MCP or page), review their schemas to make sure overlapping parameter names don’t introduce unintended injection. If you want a value scoped to one specific tool, use the targeted format (tool_name.parameter_name) instead.
If both a targeted entry and a wildcard entry exist for the same parameter name, the targeted entry wins.
Combining with situational awareness
Pass-through parameters and situational awareness are complementary:| Channel | What it does | Who sees it |
|---|---|---|
| Situational awareness | Puts context in the LLM’s system prompt so it can reason about the data | LLM only |
| Pass-through parameters | Injects exact data into tool calls without LLM mediation | MCP server only |
For MCP tool authors
If you’re building MCP tools that should accept pass-through values from the host page or platform-managed parameters from the SDK, the following sections describe the contract.Receiving uploaded files
If your tool should accept user-uploaded files, declare the parameter in your tool’sinputSchema:
Receiving pass-through data from the host page
If your tool has a parameter that SDK embedders should supply viapassthrough-params:
- Declare the parameter in your tool’s
inputSchemaas normal. - Document the parameter name so embedders know to set it (e.g.
create_widget.data_payload). - The parameter is hidden from the LLM only when the embedder provides a value. If no value is set, the LLM sees the parameter as usual.
Requesting a platform-managed parameter
If your tool has a parameter that should always be hidden from the LLM (a platform transport mechanism, not a creative input), request that the parameter name be added to Mindset AI’s managed-params list. Mindset AI will handle stripping and injection automatically, regardless of whether a value exists.For page tool authors
Pass-through works identically for page tools. When you register a page tool whose schema declares a parameter you want filled by the host page rather than the LLM:- Declare the parameter in your
setPageTools()schema as normal. - Set the corresponding pass-through entry, either targeted (
tool_name.parameter_name) or wildcard (parameter_name). - The SDK strips the parameter from what the LLM sees and injects your value when the tool is invoked. Your handler receives
argswith the injected value already present, no extra plumbing.
Quick reference
| Concept | Description |
|---|---|
passthrough-params attribute | HTML attribute on <mindset-agent> to set initial pass-through values |
agent.setPassthroughParams(obj) | JavaScript method to set or update pass-through values dynamically |
tool_name.parameter_name | Targeted format: injects into one specific tool |
parameter_name | Wildcard format: injects into any tool with that parameter |
| Platform-managed | Always-stripped parameters managed by Mindset AI (e.g. uploaded_file_urls) |
| Update timing | Takes effect on the next tool call |
| Persistence | Transient per message, never saved to thread history |
| Clearing | agent.setPassthroughParams({}) to remove all values |
Related
Situational awareness
Give the agent context to reason about the data.
Page tools
Let the agent take actions in the browser.
Data channels overview
How pass-through fits alongside the other channels.
Element methods
Full element method surface.