update_entity_metadata
Update custom metadata fields on eLabFTW experiments, items, templates or item types. Merge new fields with existing metadata or overwrite it completely.
Instructions
Update the metadata (custom fields) of an eLabFTW experiment, item, experiment template or item type. WRITE OPERATION — requires the update write scope. 'fields' is a JSON string with an array of field objects ({key, value | values, type, group_id, allow_multi_values, description}); 'groups' optionally defines extra field groups ([{id, name}]). mode='merge' (default) keeps the existing metadata, 'overwrite' rebuilds it from the supplied fields. Returns the resulting field names and a read-back verification.
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": {
"entity_type": "<entity_type>",
"id": "<id>",
"fields": "<fields>"
},
"name": "update_entity_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| mode | No | merge | |
| fields | Yes | ||
| groups | No | ||
| trace_id | No | ||
| entity_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |