Update user metadata
update_user_metadataDeep-merge public, private or unsafe metadata into an instance's user. Existing nested objects merge recursively and null-valued keys are removed at merged levels. New or replacement nested objects are copied as-is, including nulls, matching BAPI. Repeating such a patch can change its result. Arrays replace existing arrays. Omitted fields and top-level null leave metadata unchanged. Returns only a confirmation, never metadata values. With dry_run, returns the target and supplied metadata categories without writing or showing values.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"application_id": "<application_id>",
"instance": "<instance>",
"user_id": "<user_id>"
},
"name": "update_user_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview the target and metadata categories without writing or returning values. | |
| user_id | Yes | Clerk user ID (user_…) in the selected instance. | |
| instance | Yes | Instance to target: "development", "production", or a full instance ID (ins_…). | |
| application_id | Yes | Clerk application ID (app_…). | |
| public_metadata | No | Public metadata merge patch, visible to the frontend. Limit 8 KB per field. | |
| unsafe_metadata | No | Unsafe metadata merge patch, also writable by the user through frontend APIs. | |
| private_metadata | No | Private metadata merge patch, available only through backend APIs. Never returned by this tool. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| updated | No | ||
| user_id | Yes | ||
| metadata_fields | No |