Browse the docs

update_macro

Replaces the definition of a macro the agent created or of an exposed macro; its agent settings, origin and enabled state stay as they were.

Details #

The server keeps the macro's id, created date, enabled, agent and origin as they were, raises version by one and sets modified. Fields the agent leaves out (group, icon, inputs, run) keep their old values. The new definition is validated and linted like create_macro.

Editing a macro that you exposed to agents is as risky as running it, so it asks for your approval first, like a destructive run. A macro the agent created itself does not ask.

{ "jsonrpc": "2.0", "id": 7, "method": "tools/call",
  "params": { "name": "update_macro", "arguments": {
    "id": "m_c10a77",
    "note": "Changed the HUD's text.",
    "json": { "name": "Say hello", "do": [{ "id": "s1", "type": "hud", "params": { "text": "Hello again" } }] }
  } } }
{ "updated": true, "id": "m_c10a77", "version": 2, "warnings": [] }

Gotchas #

  • A macro that is neither exposed nor agent-made answers No macro with id <id> that you may edit.

  • If you deny the edit, or do not answer in time, nothing changes.

See also #