# Ghost

Source: https://docs.autessa.com/docs/tools/ghost

> Tool types for the Ghost connector.

# Ghost

Tool types for running a Ghost publication end to end: browse and read posts, create and edit drafts, publish or schedule them, and read per-post engagement analytics.

Every type on this page requires a [Ghost connector](/docs/guide/connectors.md); `connectorId` is the ID of that connector. Post IDs are Ghost's own hex identifiers — agents typically discover them with `GHOST_GET_POSTS` before calling the single-post tools.

## Get posts **TOOL** `GHOST_GET_POSTS`

Lists posts in the publication, optionally filtered by `status` (`draft`, `published`, `scheduled`, or `all`). Returns up to `limit` posts (default 15) with their IDs, titles, and publish state — the starting point for any workflow that edits, publishes, or analyzes existing posts.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_GET_POSTS",
  "connectorId": "V1StGXR8Z5",
  "status": "draft",
  "limit": 20
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `limit` (integer · optional) — Optional, default 15
- `status` (string · optional) — Optional: "draft", "published", "scheduled", "all"

## Get post **TOOL** `GHOST_GET_POST`

Fetches a single post by ID with its full content and metadata — title, HTML body, tags, feature image, excerpt, and status. Use it before an update so the agent edits the real current content rather than guessing.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_GET_POST",
  "connectorId": "V1StGXR8Z5",
  "postId": "@@{postId}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required - Ghost connector ID References a connector by ID.
- `postId` (string) — Required - The post ID to retrieve

## Create post **TOOL** `GHOST_CREATE_POST`

Creates a new post. By default it lands as a `draft`; pass `status: "published"` to go live immediately. The body is HTML, tags are auto-created if they don't already exist, and `featureImage` takes an image URL. Keeping creation as a draft and publishing via `GHOST_PUBLISH_POST` gives a human a review point in between.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_CREATE_POST",
  "connectorId": "V1StGXR8Z5",
  "title": "@@{postTitle}",
  "html": "@@{postHtml}",
  "status": "draft",
  "tags": ["newsletter", "product"]
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `title` (string) — Required
- `html` (string · optional) — Optional - post content in HTML
- `status` (string · optional) — Optional: "draft" (default), "published"
- `tags` (array<string> · optional) — Optional - tag names (auto-created if not exist)
- `featureImage` (string · optional) — Optional - URL
- `customExcerpt` (string · optional) — Optional

## Update post **TOOL** `GHOST_UPDATE_POST`

Updates an existing post's title, HTML body, tags, feature image, or excerpt. Only the fields you supply change — with one caveat: `tags` replaces the post's entire tag list, so include every tag the post should keep.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_UPDATE_POST",
  "connectorId": "V1StGXR8Z5",
  "postId": "@@{postId}",
  "html": "@@{revisedHtml}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `postId` (string) — Required - the post ID to update
- `title` (string · optional) — Optional
- `html` (string · optional) — Optional - post content in HTML
- `tags` (array<string> · optional) — Optional - replaces all tags
- `featureImage` (string · optional) — Optional - URL
- `customExcerpt` (string · optional) — Optional

## Publish post **TOOL** `GHOST_PUBLISH_POST`

Publishes a draft post immediately, making it live on the site. Depending on the publication's newsletter settings, publishing can also trigger the email send — so treat this as the "go" button, not a save.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_PUBLISH_POST",
  "connectorId": "V1StGXR8Z5",
  "postId": "@@{postId}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `postId` (string) — Required - the post ID to publish

## Schedule post **TOOL** `GHOST_SCHEDULE_POST`

Schedules a draft post to publish automatically at a future time. `publishAt` is an ISO 8601 datetime (e.g. `2025-12-15T10:00:00.000Z`) and must be in the future; Ghost handles the actual publish when the time arrives.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_SCHEDULE_POST",
  "connectorId": "V1StGXR8Z5",
  "postId": "@@{postId}",
  "publishAt": "@@{publishAt}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required string (ID) value. References a connector by ID.
- `postId` (string) — Required - the post ID to schedule
- `publishAt` (string) — Required - ISO 8601 datetime (e.g., "2025-12-15T10:00:00.000Z")

## Get post analytics **TOOL** `GHOST_GET_POST_ANALYTICS`

Returns a comprehensive engagement picture for one post: email delivery stats (sent, delivered, opened, failed), click counts, member signups and paid conversions attributed to the post, and positive/negative feedback. Open and click tracking flags are included so an agent knows whether zero means "nobody opened" or "tracking off".

### Example

```json title="Tool config"
{
  "toolType": "GHOST_GET_POST_ANALYTICS",
  "connectorId": "V1StGXR8Z5",
  "postId": "@@{postId}"
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required - Ghost connector ID References a connector by ID.
- `postId` (string) — Required - The post ID to get analytics for

## Get top posts **TOOL** `GHOST_GET_TOP_POSTS`

Ranks the publication's recent posts by engagement. It fetches posts published within the last `days` (default 30, computed in `timezone`, default UTC), sorts them by click count descending, and returns the top `limit` (default 10). Good for "what's working?" summaries and for picking themes worth repeating.

### Example

```json title="Tool config"
{
  "toolType": "GHOST_GET_TOP_POSTS",
  "connectorId": "V1StGXR8Z5",
  "days": 30,
  "limit": 10
}
```

> This tool type requires a connected external account. Pass the connector's ID as `connectorId` in the tool configuration.

**Configuration fields**

- `connectorId` (string (ID)) — Required - Ghost connector ID References a connector by ID.
- `days` (integer · optional) — Optional, default 30 - Number of days to look back
- `limit` (integer · optional) — Optional, default 10 - Number of posts to return
- `timezone` (string · optional) — Optional, default "UTC" - Timezone for date calculations

## Related

- [Connectors](/docs/guide/connectors.md)
- [Tools guide](/docs/guide/agentic/tools.md)
- [Beehiiv](/docs/tools/beehiiv.md)
- [Mailchimp](/docs/tools/mailchimp.md)

