# get_publish_plan

Source: https://heyeveryone.ai/docs/mcp/get_publish_plan

> Everything needed to schedule a content item, per channel version: account, current `version` (pass as `expectedVersion` to schedule_versions), checks as `errors` (block) and `warnings`, the approval state (`voided` when edited after approval), state and time, next free queue slot, and whether it can be scheduled (`schedule`) or posted now (`postNow`) with reasons. `schedule.needsConfirmation`: an agent without Autopilot on that channel only asks a person. Approval is a state: with approval required, a version without approval of its current text can't be scheduled (`signoff_required`). `nearDuplicates`: similar text on the channel in the last 30 days or scheduled (warning only; tell the person). X versions warn `x_allowance`; the plan can block (`x_allowance`, `plan_limit_reached`). `rules` explains it in plain words: tell the person. `url` opens the content page. Read-only; act with schedule_versions.

Everything needed to schedule a content item, per channel version: account, current `version` (pass as `expectedVersion` to schedule_versions), checks as `errors` (block) and `warnings`, the approval state (`voided` when edited after approval), state and time, next free queue slot, and whether it can be scheduled (`schedule`) or posted now (`postNow`) with reasons. `schedule.needsConfirmation`: an agent without Autopilot on that channel only asks a person. Approval is a state: with approval required, a version without approval of its current text can't be scheduled (`signoff_required`). `nearDuplicates`: similar text on the channel in the last 30 days or scheduled (warning only; tell the person). X versions warn `x_allowance`; the plan can block (`x_allowance`, `plan_limit_reached`). `rules` explains it in plain words: tell the person. `url` opens the content page. Read-only; act with schedule_versions.

## Access and cost

- Kind: query
- Scope: workspace
- Actors: member, agent
- Credits: Free
- Requires confirmation: false
- Accepts idempotency key: false

## Input schema

```json
{
  "properties": {
    "workspaceId": {
      "format": "uuid",
      "type": "string"
    },
    "pieceId": {
      "format": "uuid",
      "type": "string"
    }
  },
  "required": [
    "workspaceId",
    "pieceId"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "additionalProperties": false,
  "properties": {
    "piece": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "format": "uuid",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "status": {
          "enum": [
            "idea",
            "drafting",
            "in_review",
            "scheduled",
            "published"
          ],
          "type": "string"
        },
        "signoffRequired": {
          "type": "boolean"
        },
        "archived": {
          "type": "boolean"
        },
        "url": {
          "description": "The content page in heyeveryone. Give it to the person so they can open the draft.",
          "type": "string"
        }
      },
      "required": [
        "id",
        "title",
        "status",
        "signoffRequired",
        "archived"
      ],
      "type": "object"
    },
    "timeZone": {
      "type": "string"
    },
    "callerMayPublish": {
      "type": "boolean"
    },
    "rules": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "versions": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "postId": {
            "format": "uuid",
            "type": "string"
          },
          "url": {
            "description": "The content page in heyeveryone. Give it to the person so they can open the draft.",
            "type": "string"
          },
          "version": {
            "minimum": 1,
            "type": "integer"
          },
          "state": {
            "enum": [
              "draft",
              "ready",
              "awaiting_confirmation",
              "scheduled",
              "publishing",
              "published",
              "failed_retrying",
              "needs_attention",
              "failed",
              "manual",
              "removed"
            ],
            "type": "string"
          },
          "isSkipped": {
            "type": "boolean"
          },
          "format": {
            "type": "string"
          },
          "formatLabel": {
            "type": "string"
          },
          "channel": {
            "additionalProperties": false,
            "properties": {
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "platform": {
                "enum": [
                  "x",
                  "linkedin",
                  "threads",
                  "bluesky",
                  "instagram",
                  "facebook",
                  "tiktok",
                  "youtube",
                  "sandbox"
                ],
                "type": "string"
              },
              "platformLabel": {
                "type": "string"
              },
              "handle": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "displayName": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "avatarUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "enum": [
                  "active",
                  "reconnect_required",
                  "disconnected"
                ],
                "type": "string"
              },
              "statusReason": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "id",
              "platform",
              "platformLabel",
              "handle",
              "displayName",
              "avatarUrl",
              "status",
              "statusReason"
            ],
            "type": "object"
          },
          "preview": {
            "type": "string"
          },
          "titles": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "key": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "value": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "key",
                "label",
                "value"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "mediaCount": {
            "minimum": 0,
            "type": "integer"
          },
          "scheduledAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduleSource": {
            "anyOf": [
              {
                "enum": [
                  "manual",
                  "queue",
                  "recurrence",
                  "evergreen"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmedAt": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "nextQueueSlot": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "checks": {
            "additionalProperties": false,
            "properties": {
              "errors": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "severity": {
                      "enum": [
                        "error",
                        "warning"
                      ],
                      "type": "string"
                    },
                    "segmentIndex": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "field": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "severity"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "warnings": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "severity": {
                      "enum": [
                        "error",
                        "warning"
                      ],
                      "type": "string"
                    },
                    "segmentIndex": {
                      "minimum": 0,
                      "type": "integer"
                    },
                    "field": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message",
                    "severity"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "errors",
              "warnings"
            ],
            "type": "object"
          },
          "approval": {
            "additionalProperties": false,
            "properties": {
              "required": {
                "type": "boolean"
              },
              "state": {
                "enum": [
                  "approved",
                  "changes_requested",
                  "voided",
                  "none"
                ],
                "type": "string"
              },
              "signedOff": {
                "type": "boolean"
              },
              "verdicts": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "reviewer": {
                      "additionalProperties": false,
                      "properties": {
                        "kind": {
                          "enum": [
                            "member",
                            "guest",
                            "agent",
                            "system"
                          ],
                          "type": "string"
                        },
                        "accountId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "agentClientId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "guestId": {
                          "anyOf": [
                            {
                              "format": "uuid",
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "kind",
                        "accountId",
                        "agentClientId",
                        "guestId",
                        "name"
                      ],
                      "type": "object"
                    },
                    "decision": {
                      "enum": [
                        "approved",
                        "changes_requested"
                      ],
                      "type": "string"
                    },
                    "scope": {
                      "enum": [
                        "post",
                        "piece"
                      ],
                      "type": "string"
                    },
                    "forVersion": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "voided": {
                      "type": "boolean"
                    },
                    "counts": {
                      "type": "boolean"
                    },
                    "at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "reviewer",
                    "decision",
                    "scope",
                    "forVersion",
                    "voided",
                    "counts",
                    "at"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "required",
              "state",
              "signedOff",
              "verdicts"
            ],
            "type": "object"
          },
          "nearDuplicates": {
            "items": {
              "additionalProperties": false,
              "properties": {
                "postId": {
                  "format": "uuid",
                  "type": "string"
                },
                "pieceId": {
                  "format": "uuid",
                  "type": "string"
                },
                "pieceTitle": {
                  "type": "string"
                },
                "state": {
                  "enum": [
                    "draft",
                    "ready",
                    "awaiting_confirmation",
                    "scheduled",
                    "publishing",
                    "published",
                    "failed_retrying",
                    "needs_attention",
                    "failed",
                    "manual",
                    "removed"
                  ],
                  "type": "string"
                },
                "at": {
                  "anyOf": [
                    {
                      "format": "date-time",
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "similarity": {
                  "maximum": 1,
                  "minimum": 0,
                  "type": "number"
                },
                "url": {
                  "type": "string"
                }
              },
              "required": [
                "postId",
                "pieceId",
                "pieceTitle",
                "state",
                "at",
                "similarity",
                "url"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "schedule": {
            "additionalProperties": false,
            "properties": {
              "allowed": {
                "type": "boolean"
              },
              "needsConfirmation": {
                "type": "boolean"
              },
              "autopilotNotice": {
                "type": "string"
              },
              "reasons": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "allowed",
              "needsConfirmation",
              "reasons"
            ],
            "type": "object"
          },
          "postNow": {
            "additionalProperties": false,
            "properties": {
              "allowed": {
                "type": "boolean"
              },
              "alreadyDue": {
                "type": "boolean"
              },
              "reasons": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "allowed",
              "alreadyDue",
              "reasons"
            ],
            "type": "object"
          }
        },
        "required": [
          "postId",
          "version",
          "state",
          "isSkipped",
          "format",
          "formatLabel",
          "channel",
          "preview",
          "titles",
          "mediaCount",
          "scheduledAt",
          "scheduleSource",
          "confirmedAt",
          "nextQueueSlot",
          "checks",
          "approval",
          "schedule",
          "postNow"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "summary": {
      "additionalProperties": false,
      "properties": {
        "total": {
          "minimum": 0,
          "type": "integer"
        },
        "schedulable": {
          "minimum": 0,
          "type": "integer"
        },
        "postableNow": {
          "minimum": 0,
          "type": "integer"
        },
        "blocked": {
          "minimum": 0,
          "type": "integer"
        },
        "skipped": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "total",
        "schedulable",
        "postableNow",
        "blocked",
        "skipped"
      ],
      "type": "object"
    }
  },
  "required": [
    "piece",
    "timeZone",
    "callerMayPublish",
    "versions",
    "summary"
  ],
  "type": "object"
}
```

## Errors

```json
[]
```

## Annotations

```json
{
  "destructiveHint": false,
  "idempotentHint": true,
  "openWorldHint": false,
  "readOnlyHint": true,
  "title": "Get the publish plan of content"
}
```
