> ## 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

> Input schemas and examples for all 51 Autoposting MCP tools.

## Transport

The CLI MCP server uses **stdio transport** — JSON-RPC messages over stdin/stdout:

```
AI Agent <--stdin/stdout--> ap mcp (Node.js) <--HTTP--> Autoposting API
```

All tool calls use standard MCP `tools/call` format.

***

## Posts (10 tools)

<Accordion title="list-posts — List posts with filters">
  | Param       | Type   | Required                                         |
  | ----------- | ------ | ------------------------------------------------ |
  | `brandSlug` | string | No                                               |
  | `status`    | string | No — `draft`, `scheduled`, `published`, `failed` |

  ```json theme={null}
  { "name": "list-posts", "arguments": { "brandSlug": "my-brand", "status": "draft" } }
  ```
</Accordion>

<Accordion title="get-post — Get post by ID">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |

  ```json theme={null}
  { "name": "get-post", "arguments": { "postId": "post_abc" } }
  ```
</Accordion>

<Accordion title="create-post — Create a draft post">
  | Param       | Type      | Required                                                |
  | ----------- | --------- | ------------------------------------------------------- |
  | `brandSlug` | string    | **Yes**                                                 |
  | `text`      | string    | **Yes**                                                 |
  | `platforms` | string\[] | No — `x`, `linkedin`, `instagram`, `threads`, `youtube` |

  ```json theme={null}
  {
    "name": "create-post",
    "arguments": {
      "brandSlug": "my-brand",
      "text": "Hello from MCP!",
      "platforms": ["x", "linkedin"]
    }
  }
  ```
</Accordion>

<Accordion title="update-post — Update draft content">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |
  | `text`   | string | No       |

  ```json theme={null}
  { "name": "update-post", "arguments": { "postId": "post_abc", "text": "Updated text" } }
  ```
</Accordion>

<Accordion title="delete-post — Delete post permanently">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |

  ```json theme={null}
  { "name": "delete-post", "arguments": { "postId": "post_abc" } }
  ```
</Accordion>

<Accordion title="publish-post — Publish immediately">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |

  ```json theme={null}
  { "name": "publish-post", "arguments": { "postId": "post_abc" } }
  ```
</Accordion>

<Accordion title="schedule-post — Schedule future publish">
  | Param         | Type   | Required           |
  | ------------- | ------ | ------------------ |
  | `postId`      | string | **Yes**            |
  | `scheduledAt` | string | **Yes** — ISO 8601 |

  ```json theme={null}
  { "name": "schedule-post", "arguments": { "postId": "post_abc", "scheduledAt": "2026-06-20T10:00:00Z" } }
  ```
</Accordion>

<Accordion title="retry-post — Retry failed publish">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |

  ```json theme={null}
  { "name": "retry-post", "arguments": { "postId": "post_abc" } }
  ```
</Accordion>

<Accordion title="rewrite-post — AI-rewrite for engagement">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |

  ```json theme={null}
  { "name": "rewrite-post", "arguments": { "postId": "post_abc" } }
  ```
</Accordion>

<Accordion title="score-post — AI scoring with feedback">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `postId` | string | **Yes**  |

  ```json theme={null}
  { "name": "score-post", "arguments": { "postId": "post_abc" } }
  ```
</Accordion>

***

## Brands (6 tools)

<Accordion title="list-brands — List all brands">
  No parameters required.

  ```json theme={null}
  { "name": "list-brands", "arguments": {} }
  ```
</Accordion>

<Accordion title="get-brand — Get brand details">
  | Param       | Type   | Required |
  | ----------- | ------ | -------- |
  | `brandSlug` | string | **Yes**  |

  ```json theme={null}
  { "name": "get-brand", "arguments": { "brandSlug": "my-brand" } }
  ```
</Accordion>

<Accordion title="create-brand — Create a brand">
  | Param      | Type   | Required           |
  | ---------- | ------ | ------------------ |
  | `name`     | string | **Yes**            |
  | `timezone` | string | No — IANA timezone |

  ```json theme={null}
  { "name": "create-brand", "arguments": { "name": "My Brand", "timezone": "America/New_York" } }
  ```
</Accordion>

<Accordion title="update-brand — Update brand settings">
  | Param       | Type   | Required |
  | ----------- | ------ | -------- |
  | `brandSlug` | string | **Yes**  |
  | `name`      | string | No       |

  ```json theme={null}
  { "name": "update-brand", "arguments": { "brandSlug": "my-brand", "name": "New Name" } }
  ```
</Accordion>

<Accordion title="delete-brand — Delete a brand">
  | Param       | Type   | Required |
  | ----------- | ------ | -------- |
  | `brandSlug` | string | **Yes**  |

  ```json theme={null}
  { "name": "delete-brand", "arguments": { "brandSlug": "my-brand" } }
  ```

  <Warning>Deletes the brand and disconnects all social accounts. Cannot be undone.</Warning>
</Accordion>

<Accordion title="brand-auth-status — Platform connection status">
  | Param       | Type   | Required |
  | ----------- | ------ | -------- |
  | `brandSlug` | string | **Yes**  |

  ```json theme={null}
  { "name": "brand-auth-status", "arguments": { "brandSlug": "my-brand" } }
  ```

  Returns connection status for X, LinkedIn, Instagram, Threads, YouTube.
</Accordion>

***

## Agents (8 tools)

<Accordion title="list-agents — List all AI agents">
  ```json theme={null}
  { "name": "list-agents", "arguments": {} }
  ```
</Accordion>

<Accordion title="get-agent — Get agent details">
  | Param     | Type   | Required |
  | --------- | ------ | -------- |
  | `agentId` | string | **Yes**  |

  ```json theme={null}
  { "name": "get-agent", "arguments": { "agentId": "agent_abc" } }
  ```
</Accordion>

<Accordion title="create-agent — Create an AI agent">
  | Param       | Type   | Required               |
  | ----------- | ------ | ---------------------- |
  | `name`      | string | **Yes**                |
  | `brandSlug` | string | **Yes**                |
  | `type`      | string | No — `publish`         |
  | `frequency` | string | No — `daily`, `weekly` |

  ```json theme={null}
  { "name": "create-agent", "arguments": { "name": "Daily News", "brandSlug": "my-brand" } }
  ```
</Accordion>

<Accordion title="update-agent — Update agent config">
  | Param     | Type   | Required |
  | --------- | ------ | -------- |
  | `agentId` | string | **Yes**  |

  ```json theme={null}
  { "name": "update-agent", "arguments": { "agentId": "agent_abc", "name": "Weekly Digest" } }
  ```
</Accordion>

<Accordion title="delete-agent — Delete an agent">
  | Param     | Type   | Required |
  | --------- | ------ | -------- |
  | `agentId` | string | **Yes**  |

  ```json theme={null}
  { "name": "delete-agent", "arguments": { "agentId": "agent_abc" } }
  ```
</Accordion>

<Accordion title="run-agent — Trigger immediate run">
  | Param     | Type   | Required |
  | --------- | ------ | -------- |
  | `agentId` | string | **Yes**  |

  ```json theme={null}
  { "name": "run-agent", "arguments": { "agentId": "agent_abc" } }
  ```
</Accordion>

<Accordion title="toggle-agent — Enable or disable">
  | Param     | Type   | Required |
  | --------- | ------ | -------- |
  | `agentId` | string | **Yes**  |

  ```json theme={null}
  { "name": "toggle-agent", "arguments": { "agentId": "agent_abc" } }
  ```
</Accordion>

<Accordion title="agent-runs — View run history">
  | Param     | Type   | Required |
  | --------- | ------ | -------- |
  | `agentId` | string | **Yes**  |

  ```json theme={null}
  { "name": "agent-runs", "arguments": { "agentId": "agent_abc" } }
  ```
</Accordion>

***

## Knowledge Base (7 tools)

<Accordion title="list-kbs — List all knowledge bases">
  ```json theme={null}
  { "name": "list-kbs", "arguments": {} }
  ```
</Accordion>

<Accordion title="get-kb — Get KB details">
  | Param  | Type   | Required |
  | ------ | ------ | -------- |
  | `kbId` | string | **Yes**  |

  ```json theme={null}
  { "name": "get-kb", "arguments": { "kbId": "kb_abc" } }
  ```
</Accordion>

<Accordion title="create-kb — Create a knowledge base">
  | Param  | Type   | Required |
  | ------ | ------ | -------- |
  | `name` | string | **Yes**  |

  ```json theme={null}
  { "name": "create-kb", "arguments": { "name": "Product Docs" } }
  ```
</Accordion>

<Accordion title="delete-kb — Delete a knowledge base">
  | Param  | Type   | Required |
  | ------ | ------ | -------- |
  | `kbId` | string | **Yes**  |

  ```json theme={null}
  { "name": "delete-kb", "arguments": { "kbId": "kb_abc" } }
  ```
</Accordion>

<Accordion title="search-kb — Semantic search">
  | Param   | Type   | Required |
  | ------- | ------ | -------- |
  | `kbId`  | string | **Yes**  |
  | `query` | string | **Yes**  |

  ```json theme={null}
  { "name": "search-kb", "arguments": { "kbId": "kb_abc", "query": "pricing strategy" } }
  ```
</Accordion>

<Accordion title="ingest-kb — Ingest URL into KB">
  | Param  | Type   | Required |
  | ------ | ------ | -------- |
  | `kbId` | string | **Yes**  |
  | `url`  | string | **Yes**  |

  ```json theme={null}
  { "name": "ingest-kb", "arguments": { "kbId": "kb_abc", "url": "https://docs.example.com" } }
  ```
</Accordion>

<Accordion title="kb-docs — List KB documents">
  | Param  | Type   | Required |
  | ------ | ------ | -------- |
  | `kbId` | string | **Yes**  |

  ```json theme={null}
  { "name": "kb-docs", "arguments": { "kbId": "kb_abc" } }
  ```
</Accordion>

***

## Ideas (4 tools)

<Accordion title="list-ideas — List content ideas">
  ```json theme={null}
  { "name": "list-ideas", "arguments": {} }
  ```
</Accordion>

<Accordion title="generate-ideas — AI-generate from topic">
  | Param   | Type   | Required       |
  | ------- | ------ | -------------- |
  | `topic` | string | **Yes**        |
  | `count` | number | No — default 5 |

  ```json theme={null}
  { "name": "generate-ideas", "arguments": { "topic": "AI trends", "count": 10 } }
  ```
</Accordion>

<Accordion title="enrich-idea — Add AI context">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `ideaId` | string | **Yes**  |

  ```json theme={null}
  { "name": "enrich-idea", "arguments": { "ideaId": "idea_abc" } }
  ```
</Accordion>

<Accordion title="delete-idea — Delete an idea">
  | Param    | Type   | Required |
  | -------- | ------ | -------- |
  | `ideaId` | string | **Yes**  |

  ```json theme={null}
  { "name": "delete-idea", "arguments": { "ideaId": "idea_abc" } }
  ```
</Accordion>

***

## Clips (5 tools)

<Accordion title="list-clips / get-clip / import-clip / render-clip / delete-clip">
  Standard CRUD + render. Key params: `clipId`, `url` (for import).

  ```json theme={null}
  { "name": "import-clip", "arguments": { "url": "https://youtube.com/watch?v=..." } }
  { "name": "render-clip", "arguments": { "clipId": "clip_abc" } }
  ```
</Accordion>

## Carousels (6 tools)

<Accordion title="list-carousels / get-carousel / create-carousel / generate-carousel / draft-carousel / delete-carousel">
  Standard CRUD + AI generation + draft conversion. Key params: `carouselId`, `brandSlug`, `topic`, `slideCount`.

  ```json theme={null}
  { "name": "generate-carousel", "arguments": { "topic": "5 Growth Tips", "brandSlug": "my-brand", "slideCount": 5 } }
  { "name": "draft-carousel", "arguments": { "carouselId": "carousel_abc" } }
  ```
</Accordion>

## Webhooks (5 tools)

<Accordion title="list-webhooks / get-webhook / create-webhook / update-webhook / delete-webhook / test-webhook">
  Standard CRUD + test. Key params: `webhookId`, `url`, `events`.

  ```json theme={null}
  { "name": "create-webhook", "arguments": { "url": "https://api.example.com/hook", "events": ["post.published", "post.failed"] } }
  { "name": "test-webhook", "arguments": { "webhookId": "wh_abc" } }
  ```
</Accordion>

## Billing & Usage (3 tools)

<Accordion title="billing-status / billing-credits / usage-summary">
  No parameters required for any of these.

  ```json theme={null}
  { "name": "billing-status", "arguments": {} }
  { "name": "billing-credits", "arguments": {} }
  { "name": "usage-summary", "arguments": {} }
  ```
</Accordion>

***

## Error Reference

| Scenario           | `isError` | Message                                   |
| ------------------ | --------- | ----------------------------------------- |
| Invalid API key    | `true`    | Authentication error                      |
| Insufficient scope | `true`    | Scope error — missing required permission |
| Resource not found | `true`    | Not found                                 |
| Invalid input      | `true`    | Validation error with field details       |
| Rate limited       | `true`    | Rate limit exceeded                       |
| Server error       | `true`    | Internal server error                     |

<CardGroup cols={2}>
  <Card title="MCP Setup" icon="gear" href="/mcp/setup">
    Connect in under 2 minutes.
  </Card>

  <Card title="MCP Overview" icon="robot" href="/mcp/overview">
    Architecture and tool summary.
  </Card>

  <Card title="CLI Commands" icon="terminal" href="/cli/commands">
    Same operations via terminal.
  </Card>

  <Card title="TypeScript SDK" icon="brackets-curly" href="/sdks/typescript">
    Build integrations programmatically.
  </Card>
</CardGroup>
