Skip to content
AdCrunch
Esc
↑↓navigate↵open⌘Jpreview
On this page

get_mutation_status

Find out how a change on Meta ended, after a write tool started it.

Ask whether a change on Meta is done. Each write tool gives back a change id before the change reaches Meta, and this tool tells how that change ended.

Did the budget change on Spring Prospecting go through?

The agent calls get_mutation_status with the id of that change, and it asks again while the change runs. Then you see whether Meta applied the change, or why the change did not apply. Change what runs on Meta lists each outcome.

Reference

Check whether a mutation started by a write tool (e.g. meta_set_status) has finished. Pass the workflowId that tool returned. Returns running, complete (with the result), or errored.

Input

Argument Type Required Description
workflowId string yes The workflowId returned by a write tool.

Output

A successful call returns this object in structuredContent.

Field Type Always present Description
result object no How the change ended. It is present when status is complete. ok tells whether Meta applied the change. When ok is false, error holds the code of the refusal.
status one of running, complete, errored yes running: the change has not ended. Call again. complete: the change ended. result tells how. A refused change is also complete. errored: the run itself stopped. AdCrunch cannot tell whether Meta applied the change. Read the object at Meta before you send the change again.

Failure codes

A failed call has isError set, and structuredContent.error holds one of these codes. Errors describes the shape of a failed call.

  • not_found
  • forbidden
  • invalid_request
  • internal_error

Scope

The token must hold mutation:write. Auth & scopes lists each scope.

Annotations

A client reads these hints. A hint that the tool does not declare has the default value of the MCP specification.

  • Read-only. The tool changes nothing.
  • Open world. The tool reaches a system outside AdCrunch, such as an ad platform.

Example

The arguments:

{
  "workflowId": "3f9c2b7e-8a41-4d6e-9b05-c1e7a2d4f860"
}

The result, in structuredContent:

{
  "result": {
    "ok": true,
    "result": {
      "id": "120215678901234567"
    }
  },
  "status": "complete"
}

Was this page helpful?