Set device posture attribute
tailscale_set_device_posture_attributeSet a custom posture attribute on a device for compliance, JIT access, and security policies. Creates or updates the attribute with 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.
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. |