custom_metrics_write
Create, edit or delete a custom analytics metric on an agent. Actions: create (metric needs key + type + description; type enum also needs options), update (metricId + metric with only the fields to change; changing type can make old data inconsistent), delete (metricId; historical data stays but the metric stops being tracked). Metric: { key, type: number|boolean|enum|string, options?, description? }.
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": {
"action": "<action>",
"agentId": "<agentId>"
},
"name": "custom_metrics_write"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | compact (default) = light mode: long text is cut and bulky blobs are replaced by a size marker. full = complete API response. | |
| action | Yes | ||
| metric | No | ||
| agentId | Yes | ||
| metricId | No | Required for update / delete. |