> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levios.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create and edit through MCP

> Tool arguments, configuration review, response handling, and safe edits.

MCP uses the same typed configuration as the API. Read the [configuration
guide](/guides/automation-configuration), [trigger
examples](/guides/automation-triggers), and [action
examples](/guides/automation-actions). OAuth permissions and account access
still apply.

## Discover before writing

Call `get_automation_guide` to learn the connection activation route. Use
`list_accounts` to select the account and `list_instagram_media` when binding a
publication or story. Get exact fields with `get_automation_schema`, for
example:

```json theme={null}
{
  "section": "follow_up"
}
```

## Validate and review the complete configuration

Call `validate_automation_configuration` with `configuration_json` containing
the complete configuration serialized as a JSON string and `language` set to
`en`, `pt-BR`, or `es`. For an edit, include `previous_configuration_json` with
the previous complete configuration. Do not send the create-request wrapper to
this validator.

```json theme={null}
{
  "configuration_json": "{\"contact_filter\":\"anyone\",\"trigger\":{\"type\":\"comment\",\"publication\":{\"mode\":\"all\"},\"keywords\":{\"mode\":\"specific\",\"match_mode\":\"whole_word\",\"values\":[\"guide\"]}},\"opening\":{\"public_reply\":{\"enabled\":false},\"direct_message\":{\"delay_seconds\":0,\"message\":{\"text\":\"Here is the guide you asked for.\",\"buttons\":[{\"type\":\"url\",\"title\":\"Open the guide\",\"url\":\"https://example.com/guide\"}]}}},\"follow_up\":null,\"extras\":{\"cooldown\":{\"mode\":\"none\"}}}",
  "language": "en"
}
```

The result contains `valid`, `issues`, `preview_json`, `preview_markdown`,
`comparison`, and `account_capabilities_checked`. Present the complete preview
and changed paths before writing. Add the verified account, name, requested
status, and actual activation route separately. A valid result is structural
validation, not account eligibility, activation approval, media verification, or
delivery.

## Create

After review, call `create_automation` with the following arguments. Unlike
validation, creation receives `configuration` as an object. Replace the
illustrative account ID.

```json theme={null}
{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "name": "Guide request",
  "status": "draft",
  "configuration": {
    "contact_filter": "anyone",
    "trigger": {
      "type": "comment",
      "publication": {
        "mode": "all"
      },
      "keywords": {
        "mode": "specific",
        "match_mode": "whole_word",
        "values": [
          "guide"
        ]
      }
    },
    "opening": {
      "public_reply": {
        "enabled": false
      },
      "direct_message": {
        "delay_seconds": 0,
        "message": {
          "text": "Here is the guide you asked for.",
          "buttons": [
            {
              "type": "url",
              "title": "Open the guide",
              "url": "https://example.com/guide"
            }
          ]
        }
      }
    },
    "follow_up": null,
    "extras": {
      "cooldown": {
        "mode": "none"
      }
    }
  }
}
```

A completed create returns the automation in `structuredContent.automation`,
with the detail fields and full configuration shown in the [API workflow
response](/guides/automation-workflow). MCP results are tool results, not HTTP
`201` responses. Inspect `isError` and any pending confirmation before claiming
completion. Live creation and lifecycle changes use the confirmation route
exposed by the connection; do not fabricate confirmation arguments.

## Edit and read back

Call `get_automation` with `account_id` and `automation_id`. Review the returned
configuration, validate the replacement with the prior configuration, then call
`update_automation`. A rename uses these arguments:

```json theme={null}
{
  "account_id": "00000000-0000-4000-8000-000000000001",
  "automation_id": "00000000-0000-4000-8000-000000000002",
  "expected_updated_at": "2026-09-01T12:00:00.000000Z",
  "name": "Updated guide request"
}
```

For behavioral edits, include the entire `configuration` object. Use the exact
current `updated_at` as `expected_updated_at`. Read back after writing and
inspect `has_unpublished_changes`; a live draft is not automatically published.
Use the activation tool advertised by `tools/list` to publish after review and
confirmation. On a version conflict, read and reconcile before retrying. On an
uncertain create outcome, list and reconcile to avoid duplicates.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.