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

# MCP Tools Reference

> Released CLI v0.5.4 MCP tools and exact input schemas.

The CLI v0.5.4 stdio server advertises **67 tools**. These schemas describe the CLI server; the remote server has its own live `tools/list` response. Always use the schema returned by your connected server.

Authenticate with `ap auth login`, then start `ap mcp`. Tool calls use MCP `tools/call`. Resource identifiers are named `id`, unless a tool's schema says otherwise.

<Warning>Publishing, deleting, connecting accounts, and other mutations change your workspace. Review the intended account and content before calling them. Facebook Pages requires beta access; personal profiles and Groups are unsupported.</Warning>

## delete-account-import

Delete import progress only. Connected accounts and brands remain. Ask the user before discarding their progress.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Import id"
      }
    },
    "required": [
      "id"
    ]
  }
  ```
</Expandable>

## import-accounts

Import 1–1000 social account rows from CSV. Headers: brand\_name, platform, account\_url; optional brand\_slug, timezone, account\_type. Returns a durable import id. Repeating the same import reuses progress. No passwords or provider tokens.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "csv": {
        "type": "string",
        "maxLength": 90000,
        "description": "CSV contents, including header row"
      }
    },
    "required": [
      "csv"
    ]
  }
  ```
</Expandable>

## prepare-account-import

Create or reuse up to 25 brands. Repeat with nextOffset until null; safe to resume.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Import id"
      },
      "offset": {
        "type": "integer",
        "minimum": 0,
        "description": "Next row offset; default 0"
      }
    },
    "required": [
      "id"
    ]
  }
  ```
</Expandable>

## account-import-status

Check actual imported account connections and plan capacity. A link alone is not a connection. Vanity URLs may need explicit account confirmation.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Import id"
      },
      "offset": {
        "type": "integer",
        "minimum": 0,
        "description": "Row offset; default 0"
      },
      "limit": {
        "type": "integer",
        "minimum": 1,
        "maximum": 100,
        "description": "Rows per page; default 50"
      }
    },
    "required": [
      "id"
    ]
  }
  ```
</Expandable>

## authorize-import-account

Generate a fresh provider approval link for one row. Present it to the user, who opens it in their browser and approves the intended account. Then check status. Links expire after 10 minutes.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Import id"
      },
      "rowId": {
        "type": "string",
        "description": "Row id from status"
      }
    },
    "required": [
      "id",
      "rowId"
    ]
  }
  ```
</Expandable>

## confirm-import-account

For needs\_confirmation rows ONLY: show the actual account id/name and CSV URL to the user. Call only after the user explicitly confirms they match. tokenId must come from status; this never creates a connection.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Import id"
      },
      "rowId": {
        "type": "string",
        "description": "Row id"
      },
      "tokenId": {
        "type": "string",
        "description": "User-confirmed tokenId from status"
      }
    },
    "required": [
      "id",
      "rowId",
      "tokenId"
    ]
  }
  ```
</Expandable>

## list-posts

List posts with optional filters by brand, status, limit, and page.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "brandSlug": {
        "type": "string",
        "description": "Filter by brand slug"
      },
      "status": {
        "type": "string",
        "enum": [
          "draft",
          "scheduled",
          "published",
          "failed"
        ],
        "description": "Filter by post status"
      },
      "limit": {
        "type": "number",
        "description": "Max results per page (default 20)"
      },
      "page": {
        "type": "number",
        "description": "Page number (default 1)"
      }
    },
    "additionalProperties": false
  }
  ```
</Expandable>

## get-post

Get a post by its ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-post

Create a new post draft for a brand on one or more platforms.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "brandSlug": {
        "type": "string",
        "description": "Brand slug to post under"
      },
      "text": {
        "type": "string",
        "description": "Post text content"
      },
      "platforms": {
        "type": [
          "string",
          "array"
        ],
        "items": {
          "type": "string"
        },
        "description": "Platform array or comma-separated platform list (e.g. x,linkedin)"
      },
      "scheduledAt": {
        "type": "string",
        "description": "ISO 8601 datetime to schedule the post"
      },
      "media": {
        "type": "array",
        "maxItems": 10,
        "description": "Images or videos to attach, as https URLs. For a local file, call upload-media first and pass its result here.",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "Public https URL of the image or video"
            },
            "type": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "gif"
              ]
            },
            "altText": {
              "type": "string",
              "description": "Optional alt text"
            }
          },
          "required": [
            "url",
            "type"
          ],
          "additionalProperties": false
        }
      },
      "facebookOptions": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "text",
              "link",
              "photo",
              "multi-photo",
              "video",
              "reel"
            ]
          },
          "link": {
            "type": "string",
            "description": "Public HTTPS article URL for link format"
          }
        },
        "required": [
          "format"
        ],
        "additionalProperties": false
      },
      "targetAccountIds": {
        "type": "object",
        "description": "Explicit selected connected Page IDs, including a sole Page",
        "properties": {
          "facebook": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "uniqueItems": true
          }
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "platformTexts": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Platform captions; empty Facebook caption is intentional"
      },
      "platformMedia": {
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "maxItems": 10,
          "description": "Images or videos to attach, as https URLs. For a local file, call upload-media first and pass its result here.",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "Public https URL of the image or video"
              },
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "video",
                  "gif"
                ]
              },
              "altText": {
                "type": "string",
                "description": "Optional alt text"
              }
            },
            "required": [
              "url",
              "type"
            ],
            "additionalProperties": false
          }
        },
        "description": "Platform media; empty Facebook array excludes shared attachments"
      }
    },
    "required": [
      "brandSlug",
      "text",
      "platforms"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## update-post

Update the text, platforms, scheduled time, or media of an existing post.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID"
      },
      "text": {
        "type": "string",
        "description": "New post text"
      },
      "platforms": {
        "type": [
          "string",
          "array"
        ],
        "items": {
          "type": "string"
        },
        "description": "Platform array or comma-separated new platform list"
      },
      "scheduledAt": {
        "type": "string",
        "description": "New ISO 8601 scheduled datetime"
      },
      "media": {
        "type": "array",
        "maxItems": 10,
        "description": "Images or videos to attach, as https URLs. For a local file, call upload-media first and pass its result here.",
        "items": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "Public https URL of the image or video"
            },
            "type": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "gif"
              ]
            },
            "altText": {
              "type": "string",
              "description": "Optional alt text"
            }
          },
          "required": [
            "url",
            "type"
          ],
          "additionalProperties": false
        }
      },
      "facebookOptions": {
        "type": "object",
        "properties": {
          "format": {
            "type": "string",
            "enum": [
              "text",
              "link",
              "photo",
              "multi-photo",
              "video",
              "reel"
            ]
          },
          "link": {
            "type": "string",
            "description": "Public HTTPS article URL for link format"
          }
        },
        "required": [
          "format"
        ],
        "additionalProperties": false
      },
      "targetAccountIds": {
        "type": "object",
        "description": "Explicit selected connected Page IDs, including a sole Page",
        "properties": {
          "facebook": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "uniqueItems": true
          }
        },
        "additionalProperties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "platformTexts": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "Platform captions; empty Facebook caption is intentional"
      },
      "platformMedia": {
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "maxItems": 10,
          "description": "Images or videos to attach, as https URLs. For a local file, call upload-media first and pass its result here.",
          "items": {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "description": "Public https URL of the image or video"
              },
              "type": {
                "type": "string",
                "enum": [
                  "image",
                  "video",
                  "gif"
                ]
              },
              "altText": {
                "type": "string",
                "description": "Optional alt text"
              }
            },
            "required": [
              "url",
              "type"
            ],
            "additionalProperties": false
          }
        },
        "description": "Platform media; empty Facebook array excludes shared attachments"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-post

Permanently delete a post by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## publish-post

Immediately publish a post to all its platforms.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID to publish"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## schedule-post

Schedule a post to be published at a specific date and time.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID to schedule"
      },
      "scheduledAt": {
        "type": "string",
        "description": "ISO 8601 datetime for publishing"
      },
      "platform": {
        "type": "string",
        "enum": [
          "facebook"
        ],
        "description": "Explicit failed-Page recovery; preserves Published and Unknown outcomes"
      }
    },
    "required": [
      "id",
      "scheduledAt"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## retry-post

Retry publishing a failed post.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID to retry"
      },
      "platform": {
        "type": "string",
        "enum": [
          "x",
          "linkedin",
          "instagram",
          "threads",
          "youtube",
          "facebook"
        ],
        "description": "Optional explicit platform; facebook retries only failed Pages without remote evidence, preserving Published and Unknown outcomes."
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## rewrite-post

AI-rewrite the text of a post.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID to rewrite"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## score-post

Score a post with AI feedback and return a numeric score with explanation.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Post ID to score"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-brands

List all brands in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## get-brand

Get a brand by its slug.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "brandSlug": {
        "type": "string",
        "description": "Brand slug"
      }
    },
    "required": [
      "brandSlug"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-brand

Create a new brand in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Brand display name"
      },
      "timezone": {
        "type": "string",
        "description": "IANA timezone (e.g. America/New_York)"
      }
    },
    "required": [
      "name"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## update-brand

Update a brand name or timezone.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "brandSlug": {
        "type": "string",
        "description": "Brand slug to update"
      },
      "name": {
        "type": "string",
        "description": "New display name"
      },
      "timezone": {
        "type": "string",
        "description": "New IANA timezone"
      }
    },
    "required": [
      "brandSlug"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-brand

Permanently delete a brand by slug.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "brandSlug": {
        "type": "string",
        "description": "Brand slug to delete"
      }
    },
    "required": [
      "brandSlug"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## brand-auth-status

Show the platform connection status for a brand.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "brandSlug": {
        "type": "string",
        "description": "Brand slug"
      }
    },
    "required": [
      "brandSlug"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-agents

List all agents in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## get-agent

Get an agent by its ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Agent ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-agent

Create a new publish or research agent.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Agent name"
      },
      "type": {
        "type": "string",
        "enum": [
          "publish",
          "research"
        ],
        "description": "Agent type"
      },
      "brandSlug": {
        "type": "string",
        "description": "Brand slug to associate with"
      },
      "prompt": {
        "type": "string",
        "description": "Agent instructions or prompt"
      },
      "frequency": {
        "type": "string",
        "enum": [
          "manual",
          "daily",
          "weekly"
        ],
        "description": "Run frequency"
      },
      "time": {
        "type": "string",
        "description": "Time of day to run (HH:MM)"
      },
      "weekday": {
        "type": "string",
        "description": "Day of week (required for weekly frequency)"
      },
      "kbId": {
        "type": "string",
        "description": "Knowledge base ID to attach"
      }
    },
    "required": [
      "name",
      "type",
      "prompt",
      "frequency"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## update-agent

Update an agent name, prompt, frequency, or schedule.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Agent ID"
      },
      "name": {
        "type": "string",
        "description": "New agent name"
      },
      "prompt": {
        "type": "string",
        "description": "New prompt"
      },
      "frequency": {
        "type": "string",
        "description": "New frequency: manual, daily, or weekly"
      },
      "time": {
        "type": "string",
        "description": "New time of day (HH:MM)"
      },
      "weekday": {
        "type": "string",
        "description": "New day of week"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-agent

Permanently delete an agent by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Agent ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## run-agent

Trigger an immediate run of an agent.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Agent ID to run"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## toggle-agent

Enable or disable an agent.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Agent ID to toggle"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## agent-runs

List the run history for an agent.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Agent ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-kbs

List all knowledge bases in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## get-kb

Get a knowledge base by its ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Knowledge base ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-kb

Create a new knowledge base.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "minLength": 4,
        "maxLength": 20,
        "description": "Knowledge base name"
      },
      "description": {
        "type": "string",
        "minLength": 20,
        "maxLength": 500,
        "description": "Knowledge base description"
      }
    },
    "required": [
      "name",
      "description"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-kb

Permanently delete a knowledge base by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Knowledge base ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## search-kb

Search a knowledge base with a text query.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Knowledge base ID to search"
      },
      "query": {
        "type": "string",
        "description": "Search query text"
      }
    },
    "required": [
      "id",
      "query"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## ingest-kb

Ingest a URL into a knowledge base.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Knowledge base ID to ingest into"
      },
      "url": {
        "type": "string",
        "description": "URL to ingest"
      }
    },
    "required": [
      "id",
      "url"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## kb-docs

List documents stored in a knowledge base.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Knowledge base ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## generate-ideas

AI-generate content ideas, optionally seeded from a knowledge base or topic.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "kbId": {
        "type": "string",
        "description": "Knowledge base ID to draw context from"
      },
      "topic": {
        "type": "string",
        "description": "Topic or theme for idea generation"
      },
      "count": {
        "type": "number",
        "description": "Number of ideas to generate (default 5)"
      }
    },
    "additionalProperties": false
  }
  ```
</Expandable>

## list-ideas

List all saved content ideas.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## enrich-idea

Enrich an idea (title/hook/angle) into platform-ready drafts across 1..5 platforms. Async — returns a job ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "title": {
        "type": "string",
        "description": "Idea title"
      },
      "hook": {
        "type": "string",
        "description": "Idea hook"
      },
      "angle": {
        "type": "string",
        "description": "Idea angle"
      },
      "platforms": {
        "type": "array",
        "description": "Target platforms (1..5)",
        "items": {
          "type": "string",
          "enum": [
            "twitter",
            "linkedin",
            "instagram",
            "youtube",
            "threads"
          ]
        },
        "minItems": 1,
        "maxItems": 5
      },
      "kbId": {
        "type": "string",
        "description": "Optional knowledge base ID for context"
      }
    },
    "required": [
      "title",
      "hook",
      "angle",
      "platforms"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-idea

Permanently delete an idea by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Idea ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-clips

List all video clips in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## get-clip

Get a video clip by its ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Clip ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## import-clip

Start AI clipping: import a long video from a public URL (e.g. a YouTube video). Poll get-clip until status is ready.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "URL of the video to import"
      },
      "brandId": {
        "type": "string",
        "description": "Brand ID (the `id` from list-brands)"
      },
      "name": {
        "type": "string",
        "description": "Optional name for the imported clip"
      }
    },
    "required": [
      "url",
      "brandId"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## render-clip

Render a clip (uses credits). Call get-clip first for its editRevision and candidates.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Clip ID to render"
      },
      "editRevision": {
        "type": "number",
        "description": "Current editRevision from get-clip"
      },
      "candidateId": {
        "type": "string",
        "description": "Optional: render only this candidate"
      }
    },
    "required": [
      "id",
      "editRevision"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-clip-draft

Create a draft post from a rendered clip. Publish it with publish-post or schedule it.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Clip ID"
      },
      "candidateId": {
        "type": "string",
        "description": "Optional candidate ID (defaults to the first rendered one)"
      },
      "aspectRatio": {
        "type": "string",
        "enum": [
          "9:16",
          "16:9",
          "1:1",
          "4:5"
        ],
        "description": "Optional render format"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## upload-clip

Upload a local video file for AI clipping (multipart, any size). Poll get-clip until status is ready, then render-clip.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "filePath": {
        "type": "string",
        "description": "Absolute path to the video file on this machine"
      },
      "brandId": {
        "type": "string",
        "description": "Brand ID (the `id` from list-brands)"
      },
      "title": {
        "type": "string",
        "description": "Optional clip title"
      }
    },
    "required": [
      "filePath",
      "brandId"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## publish-clip

Publish, schedule, or save as a draft a rendered clip candidate.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Clip ID"
      },
      "mode": {
        "type": "string",
        "enum": [
          "publish",
          "schedule",
          "draft"
        ]
      },
      "candidateId": {
        "type": "string",
        "description": "Candidate to post (defaults to the best rendered one)"
      },
      "platforms": {
        "type": "string",
        "description": "Comma-separated platforms, e.g. \"x,linkedin\""
      },
      "text": {
        "type": "string",
        "description": "Post caption"
      },
      "brandSlug": {
        "type": "string",
        "description": "Brand slug"
      },
      "scheduledAt": {
        "type": "string",
        "description": "ISO 8601 time, for mode \"schedule\""
      },
      "aspectRatio": {
        "type": "string",
        "enum": [
          "9:16",
          "4:5",
          "1:1",
          "16:9"
        ]
      }
    },
    "required": [
      "id",
      "mode"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-clip

Permanently delete a video clip by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Clip ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## upload-media

Upload a local image or video and get back a media item ({url, type, altText}) to pass in create-post or update-post `media`.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "filePath": {
        "type": "string",
        "description": "Absolute path to the file on this machine"
      },
      "altText": {
        "type": "string",
        "description": "Optional alt text"
      }
    },
    "required": [
      "filePath"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-api-routes

List the REST routes api-request may call, as "METHOD /path/:param". Optional prefix filter, e.g. "/clips".

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "prefix": {
        "type": "string",
        "description": "Only routes whose path starts with this"
      }
    },
    "additionalProperties": false
  }
  ```
</Expandable>

## api-request

Call any Autoposting REST route on the allow-list (see list-api-routes) with your API key. Replace :params with real IDs.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "method": {
        "type": "string",
        "enum": [
          "GET",
          "POST",
          "PUT",
          "PATCH",
          "DELETE"
        ]
      },
      "path": {
        "type": "string",
        "description": "Path such as /clips/abc123/jobs, no query string"
      },
      "query": {
        "type": "object",
        "description": "Query string parameters"
      },
      "body": {
        "type": "object",
        "description": "JSON body for POST, PUT and PATCH"
      }
    },
    "required": [
      "method",
      "path"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-carousels

List all carousels in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## get-carousel

Get a carousel by its ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Carousel ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-carousel

Create a new empty carousel.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "title": {
        "type": "string",
        "description": "Optional carousel title"
      }
    },
    "additionalProperties": false
  }
  ```
</Expandable>

## generate-carousel

AI-generate a carousel from a topic.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "topic": {
        "type": "string",
        "description": "Topic to generate slides for"
      },
      "brandSlug": {
        "type": "string",
        "description": "Brand slug for brand voice"
      },
      "slideCount": {
        "type": "number",
        "description": "Number of slides to generate"
      }
    },
    "required": [
      "topic"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## draft-carousel

Convert a carousel into a post draft.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Carousel ID to convert"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-carousel

Permanently delete a carousel by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Carousel ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## list-webhooks

List all webhooks in the workspace.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## get-webhook

Get a webhook by its ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Webhook ID"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## create-webhook

Create a new webhook endpoint for receiving events.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "url": {
        "type": "string",
        "description": "HTTPS endpoint URL to receive events"
      },
      "events": {
        "type": "string",
        "description": "Comma-separated event types (e.g. post.published,post.failed)"
      },
      "secret": {
        "type": "string",
        "description": "Optional HMAC signing secret"
      }
    },
    "required": [
      "url",
      "events"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## update-webhook

Update the URL, events, or active state of a webhook.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Webhook ID"
      },
      "url": {
        "type": "string",
        "description": "New endpoint URL"
      },
      "events": {
        "type": "string",
        "description": "New comma-separated event types"
      },
      "active": {
        "type": "boolean",
        "description": "Whether the webhook is active"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## delete-webhook

Permanently delete a webhook by ID.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Webhook ID to delete"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## test-webhook

Send a test event to a webhook endpoint.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "description": "Webhook ID to send the test event to"
      }
    },
    "required": [
      "id"
    ],
    "additionalProperties": false
  }
  ```
</Expandable>

## billing-status

Get the current billing plan and subscription status.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## billing-credits

Get the current AI credit balance and usage breakdown.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## usage-summary

Get a summary of post and publishing usage for the current period.

<Expandable title="Input schema">
  ```json theme={null}
  {
    "type": "object",
    "properties": {},
    "additionalProperties": false
  }
  ```
</Expandable>

## Example: read a post

```json theme={null}
{"name":"get-post","arguments":{"id":"post-id"}}
```

Scheduling cancellation is available through the CLI `ap posts schedule <id> --cancel` and SDK `client.posts.unschedule(id)`; the v0.5.4 CLI MCP server does not advertise a cancellation tool.


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