Available on MCP connections, as part of User context forwarding.
How it works
- An admin lists which keys the connection accepts, with a default for each.
- Your app sends values for those keys in
prompt.metadatawhen it calls the completions API. - Every MCP tool call for that question carries the values in the metadata argument (
custom_metadataby default).
The model never sees these keys and cannot change their values.
Set it up
- Open the MCP connection and expand Advanced → User context forwarding.
- Under Tool metadata, turn on Dynamic params.
- Enter the allowed keys as a JSON object of
{ "key": default }:
- Save.
Send values from your app
Addmetadata to the prompt of a completions request. It works the same for streaming and non-streaming requests.
What the MCP server receives
With the allow-list above and a lockeduser_email field, each tool call includes:
Limits
metadatamust be a JSON object with non-empty keys, up to 8 KB. Anything else returns422.- The allow-list must be a JSON object, up to 8 KB. An invalid list is rejected when you save.
- Values are stored with the question. Members of the report can see them through the API; public share links never show them.
