Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
Tell MCP agents the X poll rules and drop media flags from types without media (#480)
Paulo Castellano209eada4e762
diff --git a/app/Enums/PostPlatform/ContentType.php b/app/Enums/PostPlatform/ContentType.phpindex 2605f844a..ccb6f1b4e 100644--- a/app/Enums/PostPlatform/ContentType.php+++ b/app/Enums/PostPlatform/ContentType.php@@ -287,13 +287,14 @@ enum ContentType: string}/**- * Every network we publish to accepts QuickTime/MOV. Bluesky's stored- * embed lexicon is `video/mp4`, but its video service accepts MOV- * (`video/quicktime`) and transcodes it — same list as the official app.+ * Every type that takes video accepts QuickTime/MOV: every network we+ * publish to does. Bluesky's stored embed lexicon is `video/mp4`, but its+ * video service accepts MOV (`video/quicktime`) and transcodes it — same+ * list as the official app.*/public function acceptsMov(): bool{- return true;+ return $this->supportsVideo();}/**@@ -506,7 +507,7 @@ enum ContentType: string*/public function supportsAltText(): bool{- return $this->platform()->supportsAltText();+ return $this->supportsImage() && $this->platform()->supportsAltText();}/**diff --git a/app/Mcp/Tools/Platform/ListContentTypesTool.php b/app/Mcp/Tools/Platform/ListContentTypesTool.phpindex fb295f735..c05b4c922 100644--- a/app/Mcp/Tools/Platform/ListContentTypesTool.php+++ b/app/Mcp/Tools/Platform/ListContentTypesTool.php@@ -20,7 +20,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(true)]#[IsDestructive(false)]#[IsOpenWorld(false)]-#[Description('List every platform with its content types and their rules. Per content type: max/min media count, requires_media, accept_images/accept_videos/accept_documents, accepts_gif, accepts_mov, forbids_mixed_media, max_video_duration_sec (null = no cap), max_image_bytes / max_video_bytes / max_document_bytes, aspect_ratio_min / aspect_ratio_max for images and video_aspect_ratio_min / video_aspect_ratio_max for videos (width / height, null = not checked; GIFs are never checked; auto_fits_image when images are fitted into the frame on publish instead), image_min_width / image_min_height / image_max_width / image_max_height in pixels, supports_alt_text, supports_user_tags (Instagram tags in media meta.user_tags), supports_video_cover (meta.cover_offset_ms), captionless (stories publish no text, so the text is neither sent nor measured), document_must_be_alone (a PDF must be the only attachment), supports_thread_replies and max_thread_replies (threads on X, Bluesky and Mastodon through meta.thread_replies). Per platform: allowed_media_types, default_content_type, max_content_length (the default text limit of the network; the limit of each account, such as 25000 for an X account with long posts, is max_content_length in list-social-accounts-tool), max_hashtags (Instagram: 5), alt_text_max_length and required_meta (meta needed before a post is scheduled or published; Google Business events and offers also need meta.event, and a YouTube post needs meta.title or text). Media rules never block a draft: they are checked when a post is scheduled, queued or published (create-post-tool, create-posts-tool, update-post-tool, publish-post-tool), and a post whose media breaks a rule of its content_type is rejected with a per-platform error. Call this before attaching media or choosing a content_type.')]+#[Description('List every platform with its content types and their rules. Per content type: max/min media count, requires_media, accept_images/accept_videos/accept_documents, accepts_gif, accepts_mov, forbids_mixed_media, max_video_duration_sec (null = no cap), max_image_bytes / max_video_bytes / max_document_bytes, aspect_ratio_min / aspect_ratio_max for images and video_aspect_ratio_min / video_aspect_ratio_max for videos (width / height, null = not checked; GIFs are never checked; auto_fits_image when images are fitted into the frame on publish instead), image_min_width / image_min_height / image_max_width / image_max_height in pixels, supports_alt_text, supports_user_tags (Instagram tags in media meta.user_tags), supports_video_cover (meta.cover_offset_ms), captionless (stories publish no text, so the text is neither sent nor measured), document_must_be_alone (a PDF must be the only attachment), supports_thread_replies and max_thread_replies (threads on X, Bluesky and Mastodon through meta.thread_replies). Per platform: allowed_media_types, default_content_type, max_content_length (the default text limit of the network; the limit of each account, such as 25000 for an X account with long posts, is max_content_length in list-social-accounts-tool), max_hashtags (Instagram: 5), alt_text_max_length and required_meta (meta every post of the platform needs before it is scheduled or published; some needs depend on the content type and are not listed: Google Business events and offers also need meta.event, a YouTube post needs meta.title or text, and an X poll (x_poll) needs meta.poll with at least 2 options and duration_minutes, plus text as its question). Media rules never block a draft: they are checked when a post is scheduled, queued or published (create-post-tool, create-posts-tool, update-post-tool, publish-post-tool), and a post whose media breaks a rule of its content_type is rejected with a per-platform error. The exception is an X poll (content_type x_poll, or a reply in meta.thread_replies with a poll): media, a repeated choice, more than 4 choices, a choice over 25 characters or a duration_minutes outside 5–10080 is refused on every save, drafts included, and the attach media tools refuse it too. Call this before attaching media or choosing a content_type.')]class ListContentTypesTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Mcp/Tools/Post/AttachMediaFromUploadTool.php b/app/Mcp/Tools/Post/AttachMediaFromUploadTool.phpindex 0c2d5984a..365d0abb7 100644--- a/app/Mcp/Tools/Post/AttachMediaFromUploadTool.php+++ b/app/Mcp/Tools/Post/AttachMediaFromUploadTool.php@@ -26,7 +26,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(false)]#[IsDestructive(true)]#[IsOpenWorld(false)]-#[Description('Attach a file uploaded with request-media-upload-tool to a post. The upload_token is the value request-media-upload-tool returned; the file is resolved by that token within the current workspace, then appended after the post media (to reorder or remove media, call update-post-tool with the media ids in the new order). The file type must be one the post channel accepts (allowed_media_types in list-content-types-tool). Posts that are publishing, published or failed cannot change; a scheduled post edited by a member who needs approval goes back to pending_approval. Size, video duration, GIF and MOV caps per content_type (see list-content-types-tool) are checked when the post is scheduled or published, not here. Media is added to the post itself; to give a thread reply its own media, pass the upload_token in meta.thread_replies with update-post-tool.')]+#[Description('Attach a file uploaded with request-media-upload-tool to a post. The upload_token is the value request-media-upload-tool returned; the file is resolved by that token within the current workspace, then appended after the post media (to reorder or remove media, call update-post-tool with the media ids in the new order). The file type must be one the post channel accepts (allowed_media_types in list-content-types-tool). Posts that are publishing, published or failed cannot change; a scheduled post edited by a member who needs approval goes back to pending_approval. Size, video duration, GIF and MOV caps per content_type (see list-content-types-tool) are checked when the post is scheduled or published, not here. An X poll (content_type x_poll) takes no media, so attaching to one is refused whatever its status. Media is added to the post itself; to give a thread reply its own media, pass the upload_token in meta.thread_replies with update-post-tool.')]class AttachMediaFromUploadTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Mcp/Tools/Post/AttachMediaFromUrlTool.php b/app/Mcp/Tools/Post/AttachMediaFromUrlTool.phpindex fc0107b09..fd4200d64 100644--- a/app/Mcp/Tools/Post/AttachMediaFromUrlTool.php+++ b/app/Mcp/Tools/Post/AttachMediaFromUrlTool.php@@ -24,7 +24,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(false)]#[IsDestructive(true)]#[IsOpenWorld(true)]-#[Description('Download images, videos, or PDF documents from public URLs and attach them to a post. Each URL is fetched, stored, and registered as a Media record on the workspace. The media is appended after the post\'s current media. Each URL must serve the file itself: redirects are not followed, and web pages, private-network hosts and files over the type\'s size ceiling are refused. Only the types the post\'s channel accepts are kept. URLs that could not be attached are listed in failed_urls, and failures gives the reason of each (unreachable, type_not_allowed, too_large, host_not_allowed) with a message. Video duration is measured on the server. Per-network size, duration, GIF and MOV caps (see list-content-types-tool) are enforced when the post is scheduled or published. Supported files: JPEG, PNG, GIF and WebP images (HEIC and HEIF too when the server can convert them), MP4 and MOV videos, and PDF. Each download must finish within 20 seconds and fit the server limits (by default 10 MB and 67 megapixels for an image, 1 GB for a video, 100 MB for a PDF). Media is added to the post itself; to give a thread reply its own media, pass it in meta.thread_replies with update-post-tool.')]+#[Description('Download images, videos, or PDF documents from public URLs and attach them to a post. Each URL is fetched, stored, and registered as a Media record on the workspace. The media is appended after the post\'s current media. Each URL must serve the file itself: redirects are not followed, and web pages, private-network hosts and files over the type\'s size ceiling are refused. Only the types the post\'s channel accepts are kept. URLs that could not be attached are listed in failed_urls, and failures gives the reason of each (unreachable, type_not_allowed, too_large, host_not_allowed) with a message. Video duration is measured on the server. Per-network size, duration, GIF and MOV caps (see list-content-types-tool) are enforced when the post is scheduled or published. An X poll (content_type x_poll) takes no media, so attaching to one is refused whatever its status. Supported files: JPEG, PNG, GIF and WebP images (HEIC and HEIF too when the server can convert them), MP4 and MOV videos, and PDF. Each download must finish within 20 seconds and fit the server limits (by default 10 MB and 67 megapixels for an image, 1 GB for a video, 100 MB for a PDF). Media is added to the post itself; to give a thread reply its own media, pass it in meta.thread_replies with update-post-tool.')]class AttachMediaFromUrlTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Mcp/Tools/Post/CreatePostTool.php b/app/Mcp/Tools/Post/CreatePostTool.phpindex 08a85db01..159104c50 100644--- a/app/Mcp/Tools/Post/CreatePostTool.php+++ b/app/Mcp/Tools/Post/CreatePostTool.php@@ -35,7 +35,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(false)]#[IsDestructive(true)]#[IsOpenWorld(true)]-#[Description('Create one post for one social account in the current workspace: a draft, a post scheduled at a custom time, a post queued in the channel\'s next free slot (queue: next) or first slot (queue: top), a queue post in one specific free slot (queue_slot, an instant from list-free-slots-tool), or a post published now. When the acting member needs approval in this workspace, a scheduled, queued or publish-now post is stored with status pending_approval instead and waits for approve-post-tool. Use create-posts-tool to create a batch. Use list-content-types-tool to discover valid content_types. To publish a thread on X, Bluesky or Mastodon, put the follow-up posts in meta.thread_replies: up to 24 replies published under the post, each {text, media} with up to 4 media items given by url, id or upload_token, e.g. [{"text": "2/ ..."}, {"text": "3/ ...", "media": [{"url": "https://..."}]}]. Each reply must fit the text limit of the account and follows the media rules of a post on that network. Before a post can be scheduled or published it needs: TikTok meta.privacy_level (get-tiktok-creator-info-tool), Pinterest meta.board_id (list-pinterest-boards-tool), Discord meta.channel_id (list-discord-channels-tool), Google Business events and offers meta.event (title and dates), YouTube a title (meta.title, or the first line of the text); list-content-types-tool lists them per platform as required_meta. A scheduled or published post also needs text or media.')]+#[Description('Create one post for one social account in the current workspace: a draft, a post scheduled at a custom time, a post queued in the channel\'s next free slot (queue: next) or first slot (queue: top), a queue post in one specific free slot (queue_slot, an instant from list-free-slots-tool), or a post published now. When the acting member needs approval in this workspace, a scheduled, queued or publish-now post is stored with status pending_approval instead and waits for approve-post-tool. Use create-posts-tool to create a batch. Use list-content-types-tool to discover valid content_types. To publish a thread on X, Bluesky or Mastodon, put the follow-up posts in meta.thread_replies: up to 24 replies published under the post, each {text, media} with up to 4 media items given by url, id or upload_token, e.g. [{"text": "2/ ..."}, {"text": "3/ ...", "media": [{"url": "https://..."}]}]. Each reply must fit the text limit of the account and follows the media rules of a post on that network. '.PostPlatformMetaRules::SCHEDULING_REQUIREMENTS)]class CreatePostTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Mcp/Tools/Post/CreatePostsTool.php b/app/Mcp/Tools/Post/CreatePostsTool.phpindex 02c43f233..3cb17cefa 100644--- a/app/Mcp/Tools/Post/CreatePostsTool.php+++ b/app/Mcp/Tools/Post/CreatePostsTool.php@@ -31,7 +31,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(false)]#[IsDestructive(true)]#[IsOpenWorld(true)]-#[Description('Create one independent post per destination in the current workspace, as the web composer does when several channels are selected: each destination becomes its own post on its own channel, and the posts share a post_group_id. Each destination may override the shared content, media, content_type and meta. status draft keeps them editable, scheduled schedules them at scheduled_at or in each channel queue (queue: next or top), publishing publishes them now; one specific slot (queue_slot) is not taken here, use create-post-tool or move-post-to-slot-tool for that. When the acting member needs approval in this workspace, scheduled, queued and publish-now posts are stored with status pending_approval and wait for approve-post-tool. To publish a thread on X, Bluesky or Mastodon, put the follow-up posts in meta.thread_replies: up to 24 replies published under the post, each {text, media} with up to 4 media items given by url, id or upload_token, e.g. [{"text": "2/ ..."}, {"text": "3/ ...", "media": [{"url": "https://..."}]}]. Each reply must fit the text limit of the account and follows the media rules of a post on that network. Before a post can be scheduled or published it needs: TikTok meta.privacy_level (get-tiktok-creator-info-tool), Pinterest meta.board_id (list-pinterest-boards-tool), Discord meta.channel_id (list-discord-channels-tool), Google Business events and offers meta.event (title and dates), YouTube a title (meta.title, or the first line of the text); list-content-types-tool lists them per platform as required_meta. A scheduled or published post also needs text or media.')]+#[Description('Create one independent post per destination in the current workspace, as the web composer does when several channels are selected: each destination becomes its own post on its own channel, and the posts share a post_group_id. Each destination may override the shared content, media, content_type and meta. status draft keeps them editable, scheduled schedules them at scheduled_at or in each channel queue (queue: next or top), publishing publishes them now; one specific slot (queue_slot) is not taken here, use create-post-tool or move-post-to-slot-tool for that. When the acting member needs approval in this workspace, scheduled, queued and publish-now posts are stored with status pending_approval and wait for approve-post-tool. To publish a thread on X, Bluesky or Mastodon, put the follow-up posts in meta.thread_replies: up to 24 replies published under the post, each {text, media} with up to 4 media items given by url, id or upload_token, e.g. [{"text": "2/ ..."}, {"text": "3/ ...", "media": [{"url": "https://..."}]}]. Each reply must fit the text limit of the account and follows the media rules of a post on that network. '.PostPlatformMetaRules::SCHEDULING_REQUIREMENTS)]class CreatePostsTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Mcp/Tools/Post/PublishPostTool.php b/app/Mcp/Tools/Post/PublishPostTool.phpindex 7d09a467c..e3286186d 100644--- a/app/Mcp/Tools/Post/PublishPostTool.php+++ b/app/Mcp/Tools/Post/PublishPostTool.php@@ -12,6 +12,7 @@ use App\Exceptions\Post\QueueBusyException;use App\Http\Resources\Api\PostResource;use App\Mcp\Concerns\AuthorizesMcpTool;use App\Models\Post;+use App\Support\PostPlatformMetaRules;use App\Support\PostStatusRules;use App\Support\Requests\Post\PostRequestRules;use Illuminate\Contracts\JsonSchema\JsonSchema;@@ -27,7 +28,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(false)]#[IsDestructive(true)]#[IsOpenWorld(true)]-#[Description('Publish a post now, schedule it at a custom time (scheduled_at) or put it in the channel queue (queue). Works on drafts and on scheduled posts. Use update-post-tool first to change its content, content_type or meta. It is validated like a scheduled post: text limits, required meta, the media rules of its content_type (see list-content-types-tool) and thread replies; a failure names the platform and field, and nothing is published. Posts that are publishing, published or failed cannot be changed or deleted. When the acting member needs approval in this workspace, the post is stored with status pending_approval instead and waits for approve-post-tool. Before a post can be scheduled or published it needs: TikTok meta.privacy_level (get-tiktok-creator-info-tool), Pinterest meta.board_id (list-pinterest-boards-tool), Discord meta.channel_id (list-discord-channels-tool), Google Business events and offers meta.event (title and dates), YouTube a title (meta.title, or the first line of the text); list-content-types-tool lists them per platform as required_meta. A scheduled or published post also needs text or media.')]+#[Description('Publish a post now, schedule it at a custom time (scheduled_at) or put it in the channel queue (queue). Works on drafts and on scheduled posts. Use update-post-tool first to change its content, content_type or meta. It is validated like a scheduled post: text limits, required meta, the media rules of its content_type (see list-content-types-tool) and thread replies; a failure names the platform and field, and nothing is published. Posts that are publishing, published or failed cannot be changed or deleted. When the acting member needs approval in this workspace, the post is stored with status pending_approval instead and waits for approve-post-tool. '.PostPlatformMetaRules::SCHEDULING_REQUIREMENTS)]class PublishPostTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Mcp/Tools/Post/UpdatePostTool.php b/app/Mcp/Tools/Post/UpdatePostTool.phpindex fe25090c7..72c417795 100644--- a/app/Mcp/Tools/Post/UpdatePostTool.php+++ b/app/Mcp/Tools/Post/UpdatePostTool.php@@ -33,7 +33,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;#[IsReadOnly(false)]#[IsDestructive(true)]#[IsOpenWorld(true)]-#[Description('Update one post for its existing social account. Caption, media, content_type, meta (platform settings, merged with the stored ones), status, schedule, queue and labels may change; content_type and meta are top-level fields because a post has exactly one social account, which is fixed. When the acting member needs approval in this workspace, a scheduled, queued or publish-now update is stored with status pending_approval instead. meta is merged with the stored settings: send null for a key to clear it; thread_replies replaces the whole list. To place the post in one specific free slot use move-post-to-slot-tool. Posts that are publishing, published or failed cannot be changed or deleted. To publish a thread on X, Bluesky or Mastodon, put the follow-up posts in meta.thread_replies: up to 24 replies published under the post, each {text, media} with up to 4 media items given by url, id or upload_token, e.g. [{"text": "2/ ..."}, {"text": "3/ ...", "media": [{"url": "https://..."}]}]. Each reply must fit the text limit of the account and follows the media rules of a post on that network. Before a post can be scheduled or published it needs: TikTok meta.privacy_level (get-tiktok-creator-info-tool), Pinterest meta.board_id (list-pinterest-boards-tool), Discord meta.channel_id (list-discord-channels-tool), Google Business events and offers meta.event (title and dates), YouTube a title (meta.title, or the first line of the text); list-content-types-tool lists them per platform as required_meta. A scheduled or published post also needs text or media.')]+#[Description('Update one post for its existing social account. Caption, media, content_type, meta (platform settings, merged with the stored ones), status, schedule, queue and labels may change; content_type and meta are top-level fields because a post has exactly one social account, which is fixed. When the acting member needs approval in this workspace, a scheduled, queued or publish-now update is stored with status pending_approval instead. meta is merged with the stored settings: send null for a key to clear it; thread_replies replaces the whole list. To place the post in one specific free slot use move-post-to-slot-tool. Posts that are publishing, published or failed cannot be changed or deleted. To publish a thread on X, Bluesky or Mastodon, put the follow-up posts in meta.thread_replies: up to 24 replies published under the post, each {text, media} with up to 4 media items given by url, id or upload_token, e.g. [{"text": "2/ ..."}, {"text": "3/ ...", "media": [{"url": "https://..."}]}]. Each reply must fit the text limit of the account and follows the media rules of a post on that network. '.PostPlatformMetaRules::SCHEDULING_REQUIREMENTS)]class UpdatePostTool extends Tool{use AuthorizesMcpTool;diff --git a/app/Support/PostPlatformMetaRules.php b/app/Support/PostPlatformMetaRules.phpindex 31bb6c01a..27dddc8c4 100644--- a/app/Support/PostPlatformMetaRules.php+++ b/app/Support/PostPlatformMetaRules.php@@ -45,6 +45,13 @@ class PostPlatformMetaRules/** Instagram takes up to three collaborators on a feed post, carousel or reel. */public const INSTAGRAM_MAX_COLLABORATORS = 3;+ /**+ * What a post needs before it is scheduled or published, told to MCP+ * clients by every tool that schedules or publishes, so a new rule is+ * written here once.+ */+ public const SCHEDULING_REQUIREMENTS = 'Before a post can be scheduled or published it needs: TikTok meta.privacy_level (get-tiktok-creator-info-tool), Pinterest meta.board_id (list-pinterest-boards-tool), Discord meta.channel_id (list-discord-channels-tool), Google Business events and offers meta.event (title and dates), YouTube a title (meta.title, or the first line of the text), an X poll (content_type x_poll) meta.poll with at least 2 options and duration_minutes plus text as its question (a reply poll in meta.thread_replies needs the same, its text being the question); list-content-types-tool lists the TikTok, Pinterest and Discord ones per platform as required_meta. A scheduled or published post also needs text or media; an X poll needs text and takes no media.';+/** An Instagram username, with or without its leading @. */public const INSTAGRAM_USERNAME_PATTERN = '/^@?[A-Za-z0-9._]{1,30}$/';diff --git a/resources/changelog/2026-11-04-polls-on-x/cover.png b/resources/changelog/2026-11-04-polls-on-x/cover.pngnew file mode 100644index 000000000..8e9df0c47Binary files /dev/null and b/resources/changelog/2026-11-04-polls-on-x/cover.png differdiff --git a/resources/changelog/2026-11-04-polls-on-x/entry.md b/resources/changelog/2026-11-04-polls-on-x/entry.mdnew file mode 100644index 000000000..9efa27d9b--- /dev/null+++ b/resources/changelog/2026-11-04-polls-on-x/entry.md@@ -0,0 +1,11 @@+---+title: Polls for X are here 🎉+date: 2026-11-04+tags: [new]+---++You can now create X polls right from TryPost and find out what your followers think.++- **On a post or in a thread:** ask a question, give a few choices and schedule the poll like any other post, on its own or as part of a thread.+- **Results that come to you:** each poll in Sent shows how the votes are splitting and when voting ends.+- **Synced from X:** polls you post directly on X show up here automatically, results included, so every poll you run lives in one place.diff --git a/tests/Feature/Api/PlatformApiTest.php b/tests/Feature/Api/PlatformApiTest.phpindex d6d5b7538..44a756dfb 100644--- a/tests/Feature/Api/PlatformApiTest.php+++ b/tests/Feature/Api/PlatformApiTest.php@@ -69,6 +69,8 @@ it('lists the x poll without media capabilities', function () {expect($poll)->toMatchArray(['max_media_count' => 0,'accepts_gif' => false,+ 'accepts_mov' => false,+ 'supports_alt_text' => false,'max_image_bytes' => null,'max_video_bytes' => null,'max_video_duration_sec' => null,diff --git a/tests/Feature/Mcp/ToolDocumentationTest.php b/tests/Feature/Mcp/ToolDocumentationTest.phpindex 4e3714031..f50991215 100644--- a/tests/Feature/Mcp/ToolDocumentationTest.php+++ b/tests/Feature/Mcp/ToolDocumentationTest.php@@ -6,6 +6,7 @@ use App\Mcp\Servers\TryPostServer;use App\Mcp\Tools\Idea\CreateIdeaTool;use App\Mcp\Tools\Label\CreateLabelTool;use App\Mcp\Tools\Label\UpdateLabelTool;+use App\Mcp\Tools\Platform\ListContentTypesTool;use App\Mcp\Tools\Post\AttachMediaFromUploadTool;use App\Mcp\Tools\Post\AttachMediaFromUrlTool;use App\Mcp\Tools\Post\CreatePostsTool;@@ -62,7 +63,8 @@ test('post writing tools say content is plain text', function (string $tool) {})->with('post writing tools');test('tools that schedule or publish list the required meta', function (string $tool) {- expect(mcpToolText($tool))->toContain('privacy_level')->toContain('board_id')->toContain('channel_id')->toContain('required_meta');+ expect(mcpToolText($tool))->toContain('privacy_level')->toContain('board_id')->toContain('channel_id')->toContain('required_meta')+ ->toContain('x_poll')->toContain('meta.poll');})->with(['create-post' => [CreatePostTool::class],'create-posts' => [CreatePostsTool::class],@@ -70,6 +72,20 @@ test('tools that schedule or publish list the required meta', function (string $'publish-post' => [PublishPostTool::class],]);+test('list-content-types says an x poll is refused even as a draft and what it needs', function () {+ expect(mcpToolDescription(ListContentTypesTool::class))+ ->toContain('The exception is an X poll')+ ->toContain('drafts included')+ ->toContain('x_poll) needs meta.poll');+});++test('the attach media tools say an x poll takes no media', function (string $tool) {+ expect(mcpToolDescription($tool))->toContain('x_poll) takes no media');+})->with([+ 'upload' => [AttachMediaFromUploadTool::class],+ 'url' => [AttachMediaFromUrlTool::class],+]);+test('tools that change a post list the statuses that block it', function (string $tool) {expect(mcpToolText($tool))->toContain('publishing, published or failed');})->with([diff --git a/tests/Unit/Enums/ContentTypeTest.php b/tests/Unit/Enums/ContentTypeTest.phpindex 60f209fa2..52426b08d 100644--- a/tests/Unit/Enums/ContentTypeTest.php+++ b/tests/Unit/Enums/ContentTypeTest.php@@ -530,3 +530,18 @@ test('a post type is compatible with the platforms it can go to', function () {->and(ContentType::XPoll->isCompatibleWith(Platform::X))->toBeTrue()->and(ContentType::XPoll->isCompatibleWith(Platform::Bluesky))->toBeFalse();});++test('a type without images lists no alt text and a type without video accepts no mov', function (ContentType $type) {+ if (! $type->supportsImage()) {+ expect($type->supportsAltText())->toBeFalse();+ }++ if (! $type->supportsVideo()) {+ expect($type->acceptsMov())->toBeFalse();+ }++ expect($type->toListingArray())->toMatchArray([+ 'accepts_mov' => $type->acceptsMov(),+ 'supports_alt_text' => $type->supportsAltText(),+ ]);+})->with(ContentType::cases());