Skip to main content
Glama
YawLabs

@yawlabs/tailscale-mcp

by YawLabs

Set device posture attribute

tailscale_set_device_posture_attribute
Idempotent

Set 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

TableJSON Schema
NameRequiredDescriptionDefault
valueYesThe 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.
expiryNoOptional expiry time in RFC3339 format (e.g. '2026-12-01T00:00:00Z'). Attribute is automatically removed after expiry.
commentNoOptional comment added to the audit log explaining why the attribute is being set (max 200 chars)
deviceIdYesThe device ID. nodeId from tailscale_list_devices (e.g. nPM2KNuedB21DEVEL); numeric id ok; not the nodeKey.
attributeKeyYesThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.21.0
    • changedInput schema / properties / attributeKey / description
      Previous value: -"The attribute key (must start with 'custom:', e.g. 'custom:lastAuditDate')"New value: +"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."
    • addedInput schema / properties / comment
      Added value: +{
      +  "description": "Optional comment added to the audit log explaining why the attribute is being set (max 200 chars)",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • changedInput schema / properties / deviceId / description
      Previous value: -"The device ID"New value: +"The device ID. nodeId from tailscale_list_devices (e.g. nPM2KNuedB21DEVEL); numeric id ok; not the nodeKey."
    • changedInput schema / properties / value / description
      Previous value: -"The attribute value (string, number, or boolean)"New value: +"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."
  2. Changed2 schema fields changedv0.18.0
    • removedInput schema / properties / value / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "boolean"
      -  }
      -]
    • addedInput schema / properties / value / type
      Added value: +[
      +  "string",
      +  "number",
      +  "boolean"
      +]
  3. First observedv0.13.3

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds the key-prefix constraint (also in schema) and 'Creates or updates' which aligns with idempotency, but no new behavioral disclosure beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences, front-loaded with the core purpose and the critical key constraint. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a straightforward mutation tool with fully documented parameters and annotations, the description provides adequate purpose and constraints. It doesn't cover response format, but there's no output schema, so that's acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description does not add parameter-level meaning beyond what the schema provides (e.g., value types, expiry, comment). It only reiterates the key prefix rule.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Set') and resource ('custom posture attribute on a device'), and clarifies that it creates or updates. This distinguishes it from get/delete operations, though it doesn't explicitly mention the batch variant sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like tailscale_batch_update_posture_attributes. The 'useful for compliance tracking...' phrase is about general purpose, not tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools