Add dynamic attribute
cavalry_add_dynamic_attributeAdd a dynamic attribute to supported layers, such as JavaScript layers, by specifying the layer ID and attribute type. Returns the new array count; list attributes to find the new attribute path.
Instructions
Add a dynamic attribute to layers that support them (e.g. JavaScript layers). Returns the new array count; use cavalry_list_attributes to find the new attribute path.
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": {
"layerId": "<layerId>",
"type": "<type>"
},
"name": "cavalry_add_dynamic_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Attribute type, e.g. "double", "int", "bool", "string", "double2", "color". | |
| attrId | No | Dynamic array attribute. Defaults to "array". | |
| layerId | Yes | Cavalry layer id, e.g. "basicShape#1". Use cavalry_list_layers to find ids. |