Skip to main content

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; 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 TOOLGHOST_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​

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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required string (ID) value. References a connector by ID.
  • Name
    limit
    Type
    integer · optional
    Description
    Optional, default 15
  • Name
    status
    Type
    string · optional
    Description
    Optional: "draft", "published", "scheduled", "all"

Get post TOOLGHOST_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​

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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required - Ghost connector ID References a connector by ID.
  • Name
    postId
    Type
    string
    Description
    Required - The post ID to retrieve

Create post TOOLGHOST_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​

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

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

Update post TOOLGHOST_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​

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

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

Publish post TOOLGHOST_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​

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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required string (ID) value. References a connector by ID.
  • Name
    postId
    Type
    string
    Description
    Required - the post ID to publish

Schedule post TOOLGHOST_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​

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

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

Get post analytics TOOLGHOST_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​

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

  • Name
    connectorId
    Type
    string (ID)
    Description
    Required - Ghost connector ID References a connector by ID.
  • Name
    postId
    Type
    string
    Description
    Required - The post ID to get analytics for

Get top posts TOOLGHOST_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​

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

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