Browse the docs

delete_macro

Moves a macro the same agent created to Recently Deleted. Any other macro is refused.

Details #

An agent can delete only what it made. When create_macro or end_session saves a macro, Switchboard writes the agent's name (the client's name from initialize) into the macro's origin. delete_macro checks it:

  • A macro you made, imported or shared is refused: "wasn't made by an agent".

  • A macro another agent made is refused: "was made by Cursor, not by you".

  • A macro an agent made before Switchboard recorded which one is refused too.

The macro moves to Recently Deleted, where you can restore it with everything it had. While it is still off and not exposed, it goes without asking. Once you have turned it on or exposed it, you are asked first, as for any edit of an exposed macro.

{ "jsonrpc": "2.0", "id": 7, "method": "tools/call",
  "params": { "name": "delete_macro", "arguments": { "id": "6f1c2a4e-3b7d-4e55-9a10-2c8d5e7f9b31" } } }

The answer is {deleted, id, name, restorable}. It counts toward the 60 runs a minute.

Gotchas #

  • The name an agent gives in initialize is what Switchboard records. Two clients with the same name count as one.

See also #