Set device posture attribute
tailscale_set_device_posture_attributeSet or update a custom posture attribute on a Tailscale device to track compliance, enforce just-in-time access, and support custom security policies. Include an optional expiry and audit comment.
Instructions
Set a custom posture attribute on a device. Creates or updates the attribute. Attribute keys must start with 'custom:'. Useful for compliance tracking, JIT access, and custom security policies.
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": {
"deviceId": "<deviceId>",
"attributeKey": "<attributeKey>",
"value": "<value>"
},
"name": "tailscale_set_device_posture_attribute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | The attribute value: a string (max 50 characters, letters, numbers, underscores and periods only), an integer number (JSON-safe, up to 2^53-1), or a boolean. The type is fixed by the first value written for a key -- every device's value for that key must then be the same type. | |
| expiry | No | Optional expiry time in RFC3339 format (e.g. '2026-12-01T00:00:00Z'). Attribute is automatically removed after expiry. | |
| comment | No | Optional comment added to the audit log explaining why the attribute is being set (max 200 chars) | |
| deviceId | Yes | The device ID. nodeId from tailscale_list_devices (e.g. nPM2KNuedB21DEVEL); numeric id ok; not the nodeKey. | |
| attributeKey | Yes | The attribute key (must start with 'custom:', e.g. 'custom:lastAuditDate'). Max 128 characters including the prefix; letters, numbers, underscores and colons only. Keys are case-sensitive but are checked for uniqueness case-insensitively, so 'custom:MyAttribute' and 'custom:myattribute' cannot both exist in one tailnet. |