Run Write Operation
run_write_operationExecute a write operation that creates, updates, or deletes external data.
Use this tool ONLY for operations marked with requires_approval: true in
find_operations results. These are destructive actions like creating campaigns,
updating ad statuses, sending emails, etc.
operation_id must be an exact Markifact operation ID returned by find_operations for the authenticated user.
APPROVAL REQUIRED: Every call writes irreversibly to the user's live external accounts. Before each invocation, summarize the exact change in plain language (operation, target account/resource, key field values) and wait for explicit user confirmation. Never call without user's confirmation, approval is CRITICAL.
Never call this without first inspecting the schema via get_operation_inputs. Input shapes, nested objects, and field names vary per operation and cannot be guessed.
input_data must contain only fields from the get_operation_inputs schema for the same operation_id.
Write-operation tips
Always prefer a dedicated operation when one already matches the task.
Some platforms have a generic fallback operation for create, update, or remove mutations not covered by a dedicated operation, for example
gads_mutatefor Google Ads. Use the fallback before reporting a missing write feature.
Files
Some operations may return
file_idwhen datasets are too large. You will also receive a smalldata_previewfor context.You can reference any file ID in other operation inputs using this syntax:
{{file-id}}, for example:{"data": "{{file-xe3fw}}"}(exactly as provided—do not modify or invent file ids).When you pass a
file_idto another operation, the file content will be automatically loaded and converted to the correct data type. JSON becomes Python dict/list, CSV/XLSX becomes a list of dicts (rows), and images/binary files become raw bytes. You do not need to handle parsing or conversion—just pass{{file-id}}.The file ID is for you to move data between operations efficiently. When sharing results with the user, always share links using the
get_file_urltool.
Returns JSON with the operation result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input_data | Yes | Dict matching the selected operation's schema from get_operation_inputs. Pass {} if no inputs are needed. | |
| operation_id | Yes | Exact Markifact write operation ID returned by find_operations, e.g. "gads_create_campaign", "gads_edit_responsive_search_ad", "meta_ads_update_campaign_budget", "sheets_write_data". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |