Skip to main content
Glama

Update machine

machines_update
Destructive

Update a machine's execution defaults—working directory, environment variables, and secret-backed variables—so processes started afterward use the intended configuration.

Instructions

Updates a machine's execution defaults: working directory, environment variables, and secret environment variables. env and secret_env replace the whole map, and changes apply to processes started afterward.

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": {
      "machineID": "<machineID>",
      "orgID": "<orgID>"
    },
    "name": "machines_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoDefault working directory for processes started on the machine.
envNoEnvironment variables for processes started on the machine. Replaces the whole map; omit to keep the current one.
orgIDYesOrganization ID (org_...).
machineIDYesMachine ID (mch_...).
secret_envNoEnvironment variables set from secrets, keyed by variable name, for processes started on the machine.

Output Schema

NameRequiredDescriptionDefault
idYesIdentifies the machine.
cwdYesDefault working directory for processes started on the machine.
envYesEnvironment variables set for every process started on the machine.
org_idYesOrganization that owns the machine.
metadataYesKey-value metadata attached to the machine.
providerYesSandbox provider that hosts a pool machine; byo for bring-your-own machines.
created_atYesWhen the machine record was created.
deleted_atYesWhen the machine finished deleting; null while it still exists.
secret_envYesEnvironment variable names mapped to secrets whose values are injected when processes start.
updated_atYesWhen the machine record last changed.
descriptionYesFree-form note about the machine; empty if none was set.
source_kindYesWhether the machine is a bring-your-own computer or was created from a machine pool.
display_nameYesMachine name; agent configs reference a BYO machine by this as machine_name.
failure_reportNoLatest setup or daemon failure reported from the machine; omitted when none is recorded.
delete_attemptsYesNumber of times Omnara has tried to delete this machine.
lifecycle_stateYesWhere the machine is in provisioning or deletion, independent of whether its daemon is connected.
machine_pool_idNoPool the machine was created from; null for BYO machines.
connection_stateYesWhether the machine's daemon is connected now; asleep means suspended but able to be woken.
last_observed_atYesWhen the daemon last registered or sent a heartbeat; null if it has never connected.
provision_attemptsYesNumber of times Omnara has tried to provision this machine.
next_reconcile_afterYesWhen Omnara next works on provisioning or deleting the machine; null when nothing is scheduled.
lifecycle_reason_codeYesMachine-readable reason for the latest lifecycle change, such as idle_timeout; empty when none.
connection_state_reasonNoWhy the machine's latest daemon session ended, such as daemon_lease_expired.
lifecycle_reason_messageYesHuman-readable detail for lifecycle_reason_code; empty when none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.10
    • changedInput schema / properties / env / description
      Previous value: -"Environment variables set for processes started on the machine."New value: +"Environment variables for processes started on the machine. Replaces the whole map; omit to keep the current one."
    • changedInput schema / properties / secret_env / description
      Previous value: -"Environment variable names mapped to secret IDs (sec_...) whose values are set for processes started on the machine."New value: +"Environment variables set from secrets, keyed by variable name, for processes started on the machine."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "MachineConnectionState": {
      +      "enum": [
      +        "online",
      +        "asleep",
      +        "offline"
      +      ],
      +      "type": "string"
      +    },
      +    "MachineFailureReport": {
      +      "description": "The machine's most recent daemon-reported failure. A single slot, overwritten by newer reports. Runtime crash reports remain as historical diagnostics; recovery may clear other failure stages.",
      +      "properties": {
      +        "daemon_version": {
      +          "description": "Daemon version that was running when a daemon update failed.",
      +          "type": "string"
      +        },
      +        "exit_status": {
      +          "description": "Exit status of the failed startup script or daemon install; omitted for other stages.",
      +          "type": "integer"
      +        },
      +        "output_tail": {
      +          "description": "End of the failed step's output, for diagnosis.",
      +          "type": "string"
      +        },
      +        "output_truncated": {
      +          "description": "True when earlier output was dropped or output capture failed.",
      +          "type": "boolean"
      +        },
      +        "reported_at": {
      +          "$ref": "#/$defs/Timestamp",
      +          "description": "When the failure was reported."
      +        },
      +        "stage": {
      +          "description": "Setup or daemon step that failed.",
      +          "enum": [
      +            "startup_script",
      +            "daemon_install",
      +            "daemon_update",
      +            "daemon_runtime",
      +            "daemon_uninstall",
      +            "daemon_uninstalled"
      +          ],
      +          "type": "string"
      +        },
      +        "target_version": {
      +          "description": "Version the daemon was trying to update to when the update failed.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "stage",
      +        "output_tail",
      +        "output_truncated",
      +        "reported_at"
      +      ],
      +      "type": "object"
      +    },
      +    "MachineID": {
      +      "description": "Machine ID (mch_...).",
      +      "pattern": "^mch_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "MachineLifecycleState": {
      +      "enum": [
      +        "provisioning",
      +        "provision_failed",
      +        "active",
      +        "deleting",
      +        "delete_failed",
      +        "deleted"
      +      ],
      +      "type": "string"
      +    },
      +    "MachinePoolID": {
      +      "description": "Machine pool ID (mpo_...).",
      +      "pattern": "^mpo_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "MachineSourceKind": {
      +      "enum": [
      +        "byo",
      +        "pool"
      +      ],
      +      "type": "string"
      +    },
      +    "Metadata": {
      +      "additionalProperties": {
      +        "maxLength": 512,
      +        "type": "string"
      +      },
      +      "description": "Arbitrary key-value labels stored with the resource.",
      +      "maxProperties": 16,
      +      "propertyNames": {
      +        "maxLength": 64,
      +        "minLength": 1
      +      },
      +      "type": "object"
      +    },
      +    "OrganizationID": {
      +      "pattern": "^org_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "ResourceName": {
      +      "description": "Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.",
      +      "maxLength": 64,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "SecretID": {
      +      "description": "Secret ID (sec_...).",
      +      "pattern": "^sec_[a-z2-7]{26}$",
      +      "type": "string"
      +    },
      +    "Timestamp": {
      +      "format": "date-time",
      +      "type": "string"
      +    }
      +  },
      +  "properties": {
      +    "connection_state": {
      +      "$ref": "#/$defs/MachineConnectionState",
      +      "description": "Whether the machine's daemon is connected now; asleep means suspended but able to be woken."
      +    },
      +    "connection_state_reason": {
      +      "description": "Why the machine's latest daemon session ended, such as daemon_lease_expired.",
      +      "type": "string"
      +    },
      +    "created_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the machine record was created."
      +    },
      +    "cwd": {
      +      "description": "Default working directory for processes started on the machine.",
      +      "type": "string"
      +    },
      +    "delete_attempts": {
      +      "description": "Number of times Omnara has tried to delete this machine.",
      +      "format": "int32",
      +      "type": "integer"
      +    },
      +    "deleted_at": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/Timestamp"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "When the machine finished deleting; null while it still exists."
      +    },
      +    "description": {
      +      "description": "Free-form note about the machine; empty if none was set.",
      +      "type": "string"
      +    },
      +    "display_name": {
      +      "$ref": "#/$defs/ResourceName",
      +      "description": "Machine name; agent configs reference a BYO machine by this as machine_name."
      +    },
      +    "env": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "description": "Environment variables set for every process started on the machine.",
      +      "type": "object"
      +    },
      +    "failure_report": {
      +      "$ref": "#/$defs/MachineFailureReport",
      +      "description": "Latest setup or daemon failure reported from the machine; omitted when none is recorded."
      +    },
      +    "id": {
      +      "$ref": "#/$defs/MachineID",
      +      "description": "Identifies the machine."
      +    },
      +    "last_observed_at": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/Timestamp"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "When the daemon last registered or sent a heartbeat; null if it has never connected."
      +    },
      +    "lifecycle_reason_code": {
      +      "description": "Machine-readable reason for the latest lifecycle change, such as idle_timeout; empty when none.",
      +      "type": "string"
      +    },
      +    "lifecycle_reason_message": {
      +      "description": "Human-readable detail for lifecycle_reason_code; empty when none.",
      +      "type": "string"
      +    },
      +    "lifecycle_state": {
      +      "$ref": "#/$defs/MachineLifecycleState",
      +      "description": "Where the machine is in provisioning or deletion, independent of whether its daemon is connected."
      +    },
      +    "machine_pool_id": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/MachinePoolID"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Pool the machine was created from; null for BYO machines."
      +    },
      +    "metadata": {
      +      "$ref": "#/$defs/Metadata",
      +      "description": "Key-value metadata attached to the machine."
      +    },
      +    "next_reconcile_after": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/Timestamp"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "When Omnara next works on provisioning or deleting the machine; null when nothing is scheduled."
      +    },
      +    "org_id": {
      +      "$ref": "#/$defs/OrganizationID",
      +      "description": "Organization that owns the machine."
      +    },
      +    "provider": {
      +      "description": "Sandbox provider that hosts a pool machine; byo for bring-your-own machines.",
      +      "type": "string"
      +    },
      +    "provision_attempts": {
      +      "description": "Number of times Omnara has tried to provision this machine.",
      +      "format": "int32",
      +      "type": "integer"
      +    },
      +    "secret_env": {
      +      "additionalProperties": {
      +        "$ref": "#/$defs/SecretID"
      +      },
      +      "description": "Environment variable names mapped to secrets whose values are injected when processes start.",
      +      "type": "object"
      +    },
      +    "source_kind": {
      +      "$ref": "#/$defs/MachineSourceKind",
      +      "description": "Whether the machine is a bring-your-own computer or was created from a machine pool."
      +    },
      +    "updated_at": {
      +      "$ref": "#/$defs/Timestamp",
      +      "description": "When the machine record last changed."
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "org_id",
      +    "source_kind",
      +    "display_name",
      +    "description",
      +    "provider",
      +    "lifecycle_state",
      +    "connection_state",
      +    "last_observed_at",
      +    "cwd",
      +    "env",
      +    "secret_env",
      +    "lifecycle_reason_code",
      +    "lifecycle_reason_message",
      +    "next_reconcile_after",
      +    "provision_attempts",
      +    "delete_attempts",
      +    "metadata",
      +    "deleted_at",
      +    "created_at",
      +    "updated_at"
      +  ],
      +  "type": "object"
      +}
  2. Changed6 schema fields changedv0.1.1
    • addedInput schema / $defs / SecretID / description
      Added value: +"Secret ID (sec_...)."
    • addedInput schema / properties / cwd / description
      Added value: +"Default working directory for processes started on the machine."
    • addedInput schema / properties / env / description
      Added value: +"Environment variables set for processes started on the machine."
    • addedInput schema / properties / machineID / description
      Added value: +"Machine ID (mch_...)."
    • addedInput schema / properties / orgID / description
      Added value: +"Organization ID (org_...)."
    • addedInput schema / properties / secret_env / description
      Added value: +"Environment variable names mapped to secret IDs (sec_...) whose values are set for processes started on the machine."
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: it discloses that env and secret_env replace the whole map (i.e., exactly what gets destroyed, which matters given destructiveHint=true) and that changes only apply to processes started afterward. It does not restate the safety flags or add anything about response shape, but the destructive semantics are the key disclosure an agent needs.

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?

Two sentences, zero filler, with the scope of the update front-loaded and the destructive replace semantics immediately after. Every clause carries information.

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?

An output schema exists and annotations carry the safety profile, so the description only needs to cover update semantics — which it does for replacement and timing. A minor gap is that it never states what happens to fields that are omitted entirely (e.g., cwd unchanged), which the agent must infer.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3; the description earns an extra point by clarifying that secret_env also replaces the whole map, something the secret_env schema property itself does not state (it only describes the secrets mapping). It does not add format/syntax detail beyond that.

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?

States a specific verb and resource plus the exact fields affected: 'Updates a machine's execution defaults: working directory, environment variables, and secret environment variables.' It is clearly distinct from machines_delete/machines_get by inference, but it never names a sibling or explicitly contrasts update vs create.

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

Usage Guidelines3/5

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

Usage context is implied — 'changes apply to processes started afterward' tells the agent the update is forward-looking only — but there is no explicit when-to-use versus machines_create or other *_update tools, and no stated prerequisites such as permissions or org scoping.

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