@rolino/mcp 0.3.0 → 0.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -48,7 +48,7 @@ var z = __toESM(require("zod/v4"), 1);
48
48
  // package.json
49
49
  var package_default = {
50
50
  name: "@rolino/mcp",
51
- version: "0.3.0",
51
+ version: "0.5.0-beta.0",
52
52
  description: "Model Context Protocol server for Rolino",
53
53
  type: "module",
54
54
  license: "MIT",
@@ -107,9 +107,9 @@ var package_default = {
107
107
  dependencies: {
108
108
  "@hono/node-server": "2.0.12",
109
109
  "@modelcontextprotocol/sdk": "^1.30.0",
110
- "@rolino/contracts": "0.3.0",
111
- "@rolino/local-auth": "0.3.0",
112
- "@rolino/sdk": "0.3.0",
110
+ "@rolino/contracts": "0.5.0-beta.0",
111
+ "@rolino/local-auth": "0.5.0-beta.0",
112
+ "@rolino/sdk": "0.5.0-beta.0",
113
113
  zod: "^4.4.3"
114
114
  },
115
115
  devDependencies: {
@@ -158,12 +158,20 @@ var ProviderDeliveryOptionsToolSchema = z.object({
158
158
  stitch: z.object({ available: z.boolean() }).strict()
159
159
  }).strict().optional(),
160
160
  maxVideoDurationMs: z.number().int().positive().nullable().optional(),
161
- supportedPostTypes: z.array(z.enum(["TEXT", "SINGLE_IMAGE", "MULTI_IMAGE"])).optional(),
161
+ supportedPostTypes: z.array(z.enum(["TEXT", "SINGLE_IMAGE", "MULTI_IMAGE", "VIDEO"])).optional(),
162
162
  image: z.object({
163
163
  maxItems: z.number().int().positive(),
164
164
  mimeTypes: z.array(z.enum(["image/jpeg", "image/png"])),
165
165
  maxPixelsExclusive: z.number().int().positive(),
166
166
  maxBytes: z.number().int().positive()
167
+ }).strict().optional(),
168
+ video: z.object({
169
+ maxItems: z.number().int().positive(),
170
+ mimeTypes: z.array(z.literal("video/mp4")),
171
+ minBytes: z.number().int().positive(),
172
+ maxBytes: z.number().int().positive(),
173
+ minDurationMs: z.number().int().positive(),
174
+ maxDurationMs: z.number().int().positive()
167
175
  }).strict().optional()
168
176
  }).strict().superRefine((value, context) => {
169
177
  if (!import_contracts.ProviderDeliveryOptionsSchema.safeParse(value).success) {
@@ -178,7 +186,7 @@ var mcpDraftInputShape = {
178
186
  ...import_contracts.DraftPostInputSchema.shape,
179
187
  platforms: import_contracts.DraftPostInputSchema.shape.platforms,
180
188
  mediaAssetIds: import_contracts.DraftPostInputSchema.shape.mediaAssetIds.describe(
181
- "Existing project media asset IDs. YouTube requires exactly one stored video; Bluesky accepts up to four stored JPEG, PNG, or WebP images."
189
+ "Existing project media asset IDs. YouTube requires exactly one stored video; LinkedIn accepts one MP4 video or up to ten JPEG/PNG images; Bluesky accepts up to four stored JPEG, PNG, or WebP images."
182
190
  ),
183
191
  captionOverrides: import_contracts.DraftPostInputSchema.shape.captionOverrides.describe(
184
192
  "Optional destination text. YOUTUBE is the video description, BLUESKY is limited to 300 graphemes, and LINKEDIN is limited to 3,000 characters; when omitted, Rolino uses the shared caption."
@@ -187,7 +195,7 @@ var mcpDraftInputShape = {
187
195
  "TikTok delivery choices. First call refresh_delivery_options, then supply an explicit mode. Direct publishing requires an exact returned visibility plus yes/no choices for comments, duet, stitch, commercial content, own-brand promotion, third-party promotion, and AI-generated content. Set reviewed only after reviewing the account-specific options; this is distinct from draft mutation consent."
188
196
  ),
189
197
  youtubeSettings: import_contracts.DraftPostInputSchema.shape.youtubeSettings.describe(
190
- "Required with YOUTUBE: explicit title, numeric categoryId, privacyStatus, madeForKids declaration, synthetic-media disclosure, subscriber-notification choice, and tags. Unaudited Google API projects may be restricted to Private uploads."
198
+ "Required with YOUTUBE: explicit title, numeric categoryId, privacyStatus, madeForKids declaration, synthetic-media disclosure, subscriber-notification choice, and tags. Immediate publishing uses the exact PUBLIC, UNLISTED, or PRIVATE visibility and creates no schedule. Future scheduling requires PUBLIC, while Rolino uploads privately for preparation. Unaudited Google API projects may be restricted to Private uploads."
191
199
  )
192
200
  };
193
201
  var mcpDraftUpdateInputShape = {
@@ -209,6 +217,8 @@ var mcpScheduleExecuteOutputSchema = z.object({
209
217
  provider: import_contracts.PostSchedulePendingSchema.shape.provider.optional(),
210
218
  mutationId: import_contracts.PostSchedulePendingSchema.shape.mutationId.optional(),
211
219
  operation: import_contracts.PostSchedulePendingSchema.shape.operation.optional(),
220
+ phase: import_contracts.PostSchedulePendingSchema.shape.phase.optional(),
221
+ videoUploaded: import_contracts.PostSchedulePendingSchema.shape.videoUploaded.optional(),
212
222
  message: import_contracts.PostSchedulePendingSchema.shape.message.optional()
213
223
  }).passthrough();
214
224
  function jsonResult(structuredContent) {
@@ -308,6 +318,18 @@ var publishExecuteAnnotations = {
308
318
  idempotentHint: true,
309
319
  openWorldHint: true
310
320
  };
321
+ var destructiveIdempotentAnnotations = {
322
+ readOnlyHint: false,
323
+ destructiveHint: true,
324
+ idempotentHint: true,
325
+ openWorldHint: false
326
+ };
327
+ var revalidationTestAnnotations = {
328
+ readOnlyHint: false,
329
+ destructiveHint: false,
330
+ idempotentHint: true,
331
+ openWorldHint: true
332
+ };
311
333
  function defaultClient(options) {
312
334
  return new import_sdk2.RolinoClient({
313
335
  baseUrl: options.baseUrl ?? "https://getrolino.com",
@@ -318,6 +340,10 @@ function defaultClient(options) {
318
340
  }
319
341
  function createRolinoMcpServer(options = {}) {
320
342
  const api = options.client ?? defaultClient(options);
343
+ const blogApi = () => {
344
+ if (!api.blog) throw new TypeError("This Rolino client does not support Blog Studio.");
345
+ return api.blog;
346
+ };
321
347
  const server = new import_mcp.McpServer({
322
348
  name: "rolino",
323
349
  version: ROLINO_MCP_VERSION,
@@ -523,7 +549,7 @@ function createRolinoMcpServer(options = {}) {
523
549
  });
524
550
  server.registerTool("get_post_readiness", {
525
551
  title: "Get Rolino post readiness",
526
- description: "Evaluate one saved post against its destinations, media, captions, settings, permissions, token timing, and cached provider health. YouTube checks cover one stored video, explicit metadata and declarations, description limits, Private-only audit restrictions, and queue-aware lead time. This is a read-only evaluation and does not refresh providers or publish content.",
552
+ description: "Evaluate one saved post against its destinations, media, captions, settings, permissions, token timing, and cached provider health. YouTube checks cover one stored video, explicit metadata and declarations, description limits, Private-only audit restrictions, and queue-aware lead time. LinkedIn checks allow text, JPEG/PNG images, or exactly one MP4 within its size and duration limits. This is a read-only evaluation and does not refresh providers or publish content.",
527
553
  inputSchema: {
528
554
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
529
555
  postId: z.string().min(1).describe("Exact Rolino post ID.")
@@ -539,7 +565,7 @@ function createRolinoMcpServer(options = {}) {
539
565
  });
540
566
  server.registerTool("preview_post_schedule", {
541
567
  title: "Preview a Rolino post schedule",
542
- description: "Validate one exact future schedule against the current post version and live provider health. A YouTube schedule must target Public and its preview explains that confirmed execution starts a private upload immediately for early processing. This contacts configured providers and creates a five-minute, single-use confirmation, but does not schedule or publish the post. Inspect the complete result before calling execute_post_schedule with identical values.",
568
+ description: "Validate one exact future schedule against the current post version and live provider health. A YouTube schedule must target Public. Its preview states that preparation uploads the video privately now; CONFIRMING_SCHEDULE means the upload is complete and YouTube is acknowledging the future Public publish time, not that the video is public. This contacts configured providers and creates a five-minute, single-use confirmation, but does not schedule or publish the post. Inspect the complete result before calling execute_post_schedule with identical values.",
543
569
  inputSchema: {
544
570
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
545
571
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -562,7 +588,7 @@ function createRolinoMcpServer(options = {}) {
562
588
  });
563
589
  server.registerTool("execute_post_schedule", {
564
590
  title: "Execute a confirmed Rolino post schedule",
565
- description: "Schedule a post only after preview_post_schedule. Pass the unchanged time, timezone, post version, and returned one-time confirmation token. For YouTube, confirmed execution begins or resumes the private upload immediately and may return PENDING until a remote schedule change is confirmed; it never means the video already published. Rolino rechecks readiness and provider health, rejects stale or mismatched confirmation, and uses the stable idempotency key for safe retries. Scheduling causes future external publishing and is consequential.",
591
+ description: "Schedule a post only after preview_post_schedule. Pass the unchanged time, timezone, post version, and returned one-time confirmation token. For YouTube, confirmed execution begins or resumes a private upload immediately and may return PENDING with phase REMOTE_SCHEDULE_CONFIRMATION after upload while YouTube acknowledges the future Public publish time. PENDING never means the video is public. Rolino rechecks readiness and provider health, rejects stale or mismatched confirmation, and uses the stable idempotency key for safe retries. Scheduling causes future external publishing and is consequential.",
566
592
  inputSchema: {
567
593
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
568
594
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -594,12 +620,12 @@ function createRolinoMcpServer(options = {}) {
594
620
  });
595
621
  server.registerTool("preview_post_publish", {
596
622
  title: "Preview immediate Rolino post publishing",
597
- description: "Validate exact destinations against the current post version, safe retry state, readiness, and live provider health. YouTube readiness requires one stored video and explicit metadata; the configured visibility is exact, while unaudited Google API projects may be restricted to Private. This contacts configured providers and creates a five-minute, single-use confirmation, but does not publish. Inspect the complete result before calling execute_post_publish with identical destinations.",
623
+ description: "Validate exact destinations for immediate publishing against the current post version, safe retry state, readiness, and live provider health. YouTube readiness requires one stored video and explicit metadata. Immediate YouTube publishing uses the configured PUBLIC, UNLISTED, or PRIVATE visibility and never creates a schedule; the preview exposes this as deliveryMode IMMEDIATE. Unaudited Google API projects may be restricted to Private. This contacts configured providers and creates a five-minute, single-use confirmation, but does not publish. Inspect the complete result before calling execute_post_publish with identical destinations.",
598
624
  inputSchema: {
599
625
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
600
626
  postId: z.string().min(1).describe("Exact Rolino post ID."),
601
627
  expectedVersion: z.number().int().positive().describe("Current version returned by get_post."),
602
- destinations: import_contracts.PostPublishInputSchema.shape.destinations.describe("Exact Instagram, TikTok, YouTube, and/or Bluesky destinations to publish now.")
628
+ destinations: import_contracts.PostPublishInputSchema.shape.destinations.describe("Exact Instagram, TikTok, YouTube, Bluesky, and/or LinkedIn destinations to publish now.")
603
629
  },
604
630
  outputSchema: import_contracts.PostPublishPreviewSchema,
605
631
  annotations: publishPreviewAnnotations
@@ -617,7 +643,7 @@ function createRolinoMcpServer(options = {}) {
617
643
  });
618
644
  server.registerTool("execute_post_publish", {
619
645
  title: "Execute confirmed immediate Rolino post publishing",
620
- description: "Begin external publishing only after preview_post_publish. Pass the unchanged destinations, post version, and returned one-time confirmation token. YouTube execution starts a resumable upload and remains PREPARING until provider-confirmed upload and processing complete; no queued or local state is reported as published. Rolino rechecks readiness and safe retry state, durably queues the exact destinations, rejects ambiguous prior outcomes, and uses the stable idempotency key to prevent duplicate execution. This is immediately consequential.",
646
+ description: "Begin external publishing only after preview_post_publish. Pass the unchanged destinations, post version, and returned one-time confirmation token. Immediate YouTube publishing preserves the previewed PUBLIC, UNLISTED, or PRIVATE visibility and never creates or confirms a schedule. Video execution remains PREPARING for YouTube and LinkedIn until provider-confirmed upload and processing complete; no queued or local state is reported as published. Rolino rechecks readiness and safe retry state, durably queues the exact destinations, rejects ambiguous prior outcomes, and uses the stable idempotency key to prevent duplicate execution. This is immediately consequential.",
621
647
  inputSchema: {
622
648
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
623
649
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -649,7 +675,7 @@ function createRolinoMcpServer(options = {}) {
649
675
  });
650
676
  server.registerTool("list_integration_health", {
651
677
  title: "List Rolino publishing integration health",
652
- description: "List secret-safe cached health for every enabled publishing connection (Instagram, TikTok, YouTube, or Bluesky) in one exact project. This tool does not contact external providers or reveal social credentials.",
678
+ description: "List secret-safe cached health for every enabled publishing connection (Instagram, TikTok, YouTube, Bluesky, or LinkedIn) in one exact project. This tool does not contact external providers or reveal social credentials.",
653
679
  inputSchema: {
654
680
  projectId: z.string().min(1).describe("Exact Rolino project ID.")
655
681
  },
@@ -664,7 +690,7 @@ function createRolinoMcpServer(options = {}) {
664
690
  });
665
691
  server.registerTool("refresh_delivery_options", {
666
692
  title: "Refresh provider delivery options",
667
- description: "Contact one connected publishing provider and return secret-safe, account-specific choices needed to prepare a compliant draft. TikTok returns account-specific video choices; LinkedIn returns its verified member and image policy. This refreshes cached provider health but never creates, schedules, or publishes a post.",
693
+ description: "Contact one connected publishing provider and return secret-safe, account-specific choices needed to prepare a compliant draft. TikTok returns account-specific video choices; LinkedIn returns its verified member plus image and native-video policy. This refreshes cached provider health but never creates, schedules, or publishes a post.",
668
694
  inputSchema: {
669
695
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
670
696
  provider: import_contracts.ProviderDeliveryOptionsProviderSchema.describe("Provider whose delivery choices should be refreshed.")
@@ -681,6 +707,379 @@ function createRolinoMcpServer(options = {}) {
681
707
  return errorResult(error);
682
708
  }
683
709
  });
710
+ server.registerTool("list_seo_opportunities", {
711
+ title: "List active SEO tasks",
712
+ description: "Read a bounded list of active Ready and Research SEO tasks for one exact project. Each result contains one complete versioned task, decision, format, deliverables, evidence, provenance, separate topic-relevance and action-readiness confidence, limits, and no-publish rules. Rejected findings are never active tasks. This closed-world tool cannot run analysis, change settings, delete data, enable reports, send email, publish, generate media, or call an external provider.",
713
+ inputSchema: {
714
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
715
+ limit: z.number().int().min(1).max(50).default(20).describe("Maximum opportunities to return, from 1 to 50."),
716
+ cursor: z.string().min(1).max(512).regex(/^[A-Za-z0-9_-]+$/).optional().describe("Opaque cursor returned by a previous list_seo_opportunities call."),
717
+ kind: import_contracts.SeoOpportunityKindSchema.optional().describe("Optional exact opportunity kind."),
718
+ expectedImpact: import_contracts.SeoExpectedImpactSchema.optional().describe("Optional HIGH, MEDIUM, or LOW impact filter.")
719
+ },
720
+ outputSchema: import_contracts.SeoOpportunityListDataSchema,
721
+ annotations: readOnlyAnnotations
722
+ }, async ({ projectId, limit, cursor, kind, expectedImpact }) => {
723
+ try {
724
+ if (!api.seo) throw new TypeError("This Rolino client does not support SEO reading.");
725
+ return jsonResult(await api.seo.opportunities.list(projectId, { limit, cursor, kind, expectedImpact }));
726
+ } catch (error) {
727
+ return errorResult(error);
728
+ }
729
+ });
730
+ server.registerTool("get_seo_opportunity", {
731
+ title: "Read one complete SEO task",
732
+ description: "Read one canonical versioned SEO task by exact project and opportunity ID. It includes the Ready or Research decision, selected format, exact deliverables, safe evidence, provenance, separate topic-relevance and action-readiness confidence, targeting, source dates, limitations, success metric, and no-publish rules. This closed-world tool is read-only and cannot generate content, publish, or call an external provider.",
733
+ inputSchema: {
734
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
735
+ opportunityId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino SEO opportunity ID.")
736
+ },
737
+ outputSchema: import_contracts.SeoOpportunitySchema,
738
+ annotations: readOnlyAnnotations
739
+ }, async ({ projectId, opportunityId }) => {
740
+ try {
741
+ if (!api.seo) throw new TypeError("This Rolino client does not support SEO reading.");
742
+ return jsonResult(await api.seo.opportunities.get(projectId, opportunityId));
743
+ } catch (error) {
744
+ return errorResult(error);
745
+ }
746
+ });
747
+ server.registerTool("list_seo_reports", {
748
+ title: "List weekly SEO reports",
749
+ description: "Read a bounded list of stored weekly SEO report summaries for one exact project. This closed-world tool is read-only and cannot generate or deliver reports.",
750
+ inputSchema: {
751
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
752
+ limit: z.number().int().min(1).max(26).default(10).describe("Maximum reports to return, from 1 to 26."),
753
+ cursor: z.string().min(1).max(512).regex(/^[A-Za-z0-9_-]+$/).optional().describe("Opaque cursor returned by a previous list_seo_reports call."),
754
+ completeness: import_contracts.SeoReportCompletenessSchema.optional().describe("Optional COMPLETE or PARTIAL filter.")
755
+ },
756
+ outputSchema: import_contracts.SeoReportListDataSchema,
757
+ annotations: readOnlyAnnotations
758
+ }, async ({ projectId, limit, cursor, completeness }) => {
759
+ try {
760
+ if (!api.seo) throw new TypeError("This Rolino client does not support SEO reading.");
761
+ return jsonResult(await api.seo.reports.list(projectId, { limit, cursor, completeness }));
762
+ } catch (error) {
763
+ return errorResult(error);
764
+ }
765
+ });
766
+ server.registerTool("get_seo_report", {
767
+ title: "Read one weekly SEO report",
768
+ description: "Read one unchanged weekly SEO report snapshot by exact project and report ID. It groups complete Ready tasks, Research tasks, and bounded rejected findings. This closed-world tool is read-only and cannot generate content, change, or deliver a report.",
769
+ inputSchema: {
770
+ projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID."),
771
+ reportId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino weekly SEO report ID.")
772
+ },
773
+ outputSchema: import_contracts.SeoReportSchema,
774
+ annotations: readOnlyAnnotations
775
+ }, async ({ projectId, reportId }) => {
776
+ try {
777
+ if (!api.seo) throw new TypeError("This Rolino client does not support SEO reading.");
778
+ return jsonResult(await api.seo.reports.get(projectId, reportId));
779
+ } catch (error) {
780
+ return errorResult(error);
781
+ }
782
+ });
783
+ server.registerTool("list_blog_plans", {
784
+ title: "List Blog Studio plans",
785
+ description: "Read the bounded 30-day Blog Studio plans for one exact project. This does not read the social calendar.",
786
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID.") },
787
+ outputSchema: z.object({ plans: z.array(import_contracts.AgentBlogPlanSchema) }),
788
+ annotations: readOnlyAnnotations
789
+ }, async ({ projectId }) => {
790
+ try {
791
+ return jsonResult(await blogApi().plans.list(projectId));
792
+ } catch (error) {
793
+ return errorResult(error);
794
+ }
795
+ });
796
+ server.registerTool("get_blog_setup_status", {
797
+ title: "Get Blog setup status",
798
+ description: "Requires blog:read. Call first to inspect action-oriented website, import, plan, delivery, and revalidation readiness. This never returns credentials, secrets, prompts, or draft content.",
799
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema },
800
+ outputSchema: import_contracts.AgentBlogSetupStatusSchema,
801
+ annotations: readOnlyAnnotations
802
+ }, async ({ projectId }) => {
803
+ try {
804
+ return jsonResult(await blogApi().setup.status(projectId));
805
+ } catch (error) {
806
+ return errorResult(error);
807
+ }
808
+ });
809
+ server.registerTool("initialize_blog_site", {
810
+ title: "Initialize and import Blog site",
811
+ description: "Requires blog:manage. Initialize the exact project website from Brand Settings and queue a bounded import. Poll the returned job; do not retry blindly. This cannot publish.",
812
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, idempotencyKey: z.string().min(8).max(200) },
813
+ outputSchema: import_contracts.AgentBlogJobSchema,
814
+ annotations: createDraftAnnotations
815
+ }, async ({ projectId, idempotencyKey }) => {
816
+ try {
817
+ return jsonResult(await blogApi().site.import(projectId, idempotencyKey));
818
+ } catch (error) {
819
+ return errorResult(error);
820
+ }
821
+ });
822
+ server.registerTool("retry_blog_site_import", {
823
+ title: "Retry Blog site import",
824
+ description: "Requires blog:manage. Requeue only a failed bounded website import with a stable idempotency key. Poll the returned job.",
825
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, idempotencyKey: z.string().min(8).max(200) },
826
+ outputSchema: import_contracts.AgentBlogJobSchema,
827
+ annotations: createDraftAnnotations
828
+ }, async ({ projectId, idempotencyKey }) => {
829
+ try {
830
+ return jsonResult(await blogApi().site.retry(projectId, idempotencyKey));
831
+ } catch (error) {
832
+ return errorResult(error);
833
+ }
834
+ });
835
+ server.registerTool("create_blog_plan", {
836
+ title: "Create Blog cadence plan",
837
+ description: "Requires blog:manage. Queue an evidence-backed 30-day plan only after import is ready. Ask the user for cadence first and poll the returned job. This never accepts items or publishes.",
838
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, startsOn: z.string().regex(/^\d{4}-\d{2}-\d{2}$/), weekdays: z.array(z.number().int().min(0).max(6)).min(1).max(7), timeZone: z.string().min(1), idempotencyKey: z.string().min(8).max(200) },
839
+ outputSchema: z.object({ planId: z.string(), job: import_contracts.AgentBlogJobSchema }),
840
+ annotations: createDraftAnnotations
841
+ }, async ({ projectId, startsOn, weekdays, timeZone, idempotencyKey }) => {
842
+ try {
843
+ return jsonResult(await blogApi().plans.create(projectId, { startsOn, weekdays, timeZone }, idempotencyKey));
844
+ } catch (error) {
845
+ return errorResult(error);
846
+ }
847
+ });
848
+ server.registerTool("retry_blog_plan", {
849
+ title: "Retry failed Blog plan",
850
+ description: "Requires blog:manage. Retry one exact failed plan generation with idempotency and poll the returned job.",
851
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, planId: import_contracts.SeoEntityIdSchema, idempotencyKey: z.string().min(8).max(200) },
852
+ outputSchema: import_contracts.AgentBlogJobSchema,
853
+ annotations: createDraftAnnotations
854
+ }, async ({ projectId, planId, idempotencyKey }) => {
855
+ try {
856
+ return jsonResult(await blogApi().plans.retry(projectId, planId, idempotencyKey));
857
+ } catch (error) {
858
+ return errorResult(error);
859
+ }
860
+ });
861
+ server.registerTool("list_blog_plan_items", {
862
+ title: "List Blog plan items and evidence",
863
+ description: "Requires blog:read. Present this safe frozen evidence to the user before accepting or dismissing any item. Provider payloads and prompts are excluded.",
864
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, planId: import_contracts.SeoEntityIdSchema },
865
+ outputSchema: z.object({ items: z.array(import_contracts.AgentBlogPlanItemSchema) }),
866
+ annotations: readOnlyAnnotations
867
+ }, async ({ projectId, planId }) => {
868
+ try {
869
+ return jsonResult(await blogApi().plans.items.list(projectId, planId));
870
+ } catch (error) {
871
+ return errorResult(error);
872
+ }
873
+ });
874
+ server.registerTool("set_blog_plan_item_state", {
875
+ title: "Accept or dismiss Blog plan item",
876
+ description: "Requires blog:write. Apply an optimistic, idempotent ACCEPTED or DISMISSED transition only after showing the evidence. Dismissal is marked destructive. This cannot publish.",
877
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, planId: import_contracts.SeoEntityIdSchema, itemId: import_contracts.SeoEntityIdSchema, state: z.enum(["ACCEPTED", "DISMISSED"]), expectedState: z.string().min(1), expectedVersion: z.number().int().positive(), idempotencyKey: z.string().min(8).max(200) },
878
+ outputSchema: import_contracts.AgentBlogPlanItemSchema,
879
+ annotations: destructiveIdempotentAnnotations
880
+ }, async ({ projectId, planId, itemId, ...input }) => {
881
+ try {
882
+ return jsonResult(await blogApi().plans.items.setState(projectId, planId, itemId, input));
883
+ } catch (error) {
884
+ return errorResult(error);
885
+ }
886
+ });
887
+ server.registerTool("create_blog_article_from_plan_item", {
888
+ title: "Create editable Blog article",
889
+ description: "Requires blog:write. Create an editable draft from one accepted plan item and queue generation. Publication remains a separate approved-revision preview and execute operation.",
890
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, planId: import_contracts.SeoEntityIdSchema, itemId: import_contracts.SeoEntityIdSchema, expectedVersion: z.number().int().positive(), idempotencyKey: z.string().min(8).max(200) },
891
+ outputSchema: z.object({ articleId: z.string(), job: import_contracts.AgentBlogJobSchema.nullable() }),
892
+ annotations: createDraftAnnotations
893
+ }, async ({ projectId, planId, itemId, expectedVersion, idempotencyKey }) => {
894
+ try {
895
+ return jsonResult(await blogApi().plans.items.createArticle(projectId, planId, itemId, { expectedState: "ACCEPTED", expectedVersion, idempotencyKey }));
896
+ } catch (error) {
897
+ return errorResult(error);
898
+ }
899
+ });
900
+ server.registerTool("get_blog_connection_status", {
901
+ title: "Get Blog delivery connection status",
902
+ description: "Requires blog:read. Read configured and honestly verified delivery/revalidation readiness. It never returns stored tokens or secrets.",
903
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema },
904
+ outputSchema: import_contracts.AgentBlogConnectionStatusSchema,
905
+ annotations: readOnlyAnnotations
906
+ }, async ({ projectId }) => {
907
+ try {
908
+ return jsonResult(await blogApi().connection.status(projectId));
909
+ } catch (error) {
910
+ return errorResult(error);
911
+ }
912
+ });
913
+ const connectionInputSchema = { projectId: import_contracts.SeoEntityIdSchema, endpoint: z.string().url().nullable(), credentialAction: z.enum(["KEEP", "CREATE", "ROTATE", "REVOKE"]), credentialId: z.string().min(1).nullable(), secretAction: z.enum(["KEEP", "CREATE", "ROTATE"]) };
914
+ server.registerTool("preview_blog_connection_setup", {
915
+ title: "Preview Blog connection setup",
916
+ description: "Requires blog:manage. Preview the exact site, endpoint, credential action, secret action, and effects before provisioning. No delivery token or webhook secret is returned by preview.",
917
+ inputSchema: connectionInputSchema,
918
+ outputSchema: import_contracts.AgentBlogConnectionPreviewSchema,
919
+ annotations: createDraftAnnotations
920
+ }, async ({ projectId, ...input }) => {
921
+ try {
922
+ return jsonResult(await blogApi().connection.preview(projectId, input));
923
+ } catch (error) {
924
+ return errorResult(error);
925
+ }
926
+ });
927
+ server.registerTool("execute_blog_connection_setup", {
928
+ title: "Execute confirmed Blog connection setup",
929
+ description: "Requires blog:manage, the exact preview confirmation, and idempotency. A successful first response can return a delivery token or webhook secret once; write them only to server-side environment configuration. A replay never reveals them again. This cannot publish.",
930
+ inputSchema: { ...connectionInputSchema, confirmationToken: z.string().min(1), idempotencyKey: z.string().min(8).max(200) },
931
+ outputSchema: import_contracts.AgentBlogConnectionExecuteSchema,
932
+ annotations: destructiveIdempotentAnnotations
933
+ }, async ({ projectId, ...input }) => {
934
+ try {
935
+ return jsonResult(await blogApi().connection.execute(projectId, input));
936
+ } catch (error) {
937
+ return errorResult(error);
938
+ }
939
+ });
940
+ server.registerTool("test_blog_revalidation", {
941
+ title: "Test signed Blog revalidation",
942
+ description: "Requires blog:manage. Make one explicit, SSRF-protected open-world signed request to the configured same-host endpoint and persist only a safe status code.",
943
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, idempotencyKey: z.string().min(8).max(200) },
944
+ outputSchema: import_contracts.AgentBlogRevalidationTestSchema,
945
+ annotations: revalidationTestAnnotations
946
+ }, async ({ projectId, idempotencyKey }) => {
947
+ try {
948
+ return jsonResult(await blogApi().connection.test(projectId, idempotencyKey));
949
+ } catch (error) {
950
+ return errorResult(error);
951
+ }
952
+ });
953
+ server.registerTool("list_blog_publishing_providers", {
954
+ title: "List Blog publishing providers",
955
+ description: "List only providers available to this rollout with safe capabilities and official documentation. Requires blog:manage.",
956
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema },
957
+ outputSchema: z.object({ providers: z.array(import_contracts.AgentBlogPublishingProviderSchema) }),
958
+ annotations: readOnlyAnnotations
959
+ }, async ({ projectId }) => {
960
+ try {
961
+ return jsonResult(await blogApi().publishing.providers(projectId));
962
+ } catch (error) {
963
+ return errorResult(error);
964
+ }
965
+ });
966
+ server.registerTool("list_blog_publishing_destinations", {
967
+ title: "List Blog publishing destinations",
968
+ description: "List safe destination readiness without credentials or private provider data.",
969
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema },
970
+ outputSchema: z.object({ destinations: z.array(import_contracts.AgentBlogPublishingDestinationSchema) }),
971
+ annotations: readOnlyAnnotations
972
+ }, async ({ projectId }) => {
973
+ try {
974
+ return jsonResult(await blogApi().publishing.destinations(projectId));
975
+ } catch (error) {
976
+ return errorResult(error);
977
+ }
978
+ });
979
+ server.registerTool("list_blog_delivery_attempts", {
980
+ title: "List Blog delivery attempts",
981
+ description: "List safe per-destination delivery states and remote URLs. Draft content and provider responses are not returned.",
982
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, articleId: import_contracts.SeoEntityIdSchema.optional() },
983
+ outputSchema: z.object({ deliveries: z.array(import_contracts.AgentBlogDeliveryAttemptSchema) }),
984
+ annotations: readOnlyAnnotations
985
+ }, async ({ projectId, articleId }) => {
986
+ try {
987
+ return jsonResult(await blogApi().publishing.deliveries(projectId, articleId));
988
+ } catch (error) {
989
+ return errorResult(error);
990
+ }
991
+ });
992
+ server.registerTool("list_blog_articles", {
993
+ title: "List Blog Studio articles",
994
+ description: "Read Blog Studio article workflow state for one exact project. Draft content requires blog:read.",
995
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema.describe("Exact Rolino project ID.") },
996
+ outputSchema: z.object({ articles: z.array(import_contracts.AgentBlogArticleSchema) }),
997
+ annotations: readOnlyAnnotations
998
+ }, async ({ projectId }) => {
999
+ try {
1000
+ return jsonResult(await blogApi().articles.list(projectId));
1001
+ } catch (error) {
1002
+ return errorResult(error);
1003
+ }
1004
+ });
1005
+ server.registerTool("get_blog_article", {
1006
+ title: "Read one Blog Studio article",
1007
+ description: "Read one exact Blog Studio draft and its immutable revision history.",
1008
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, articleId: import_contracts.SeoEntityIdSchema },
1009
+ outputSchema: import_contracts.AgentBlogArticleDetailSchema,
1010
+ annotations: readOnlyAnnotations
1011
+ }, async ({ projectId, articleId }) => {
1012
+ try {
1013
+ return jsonResult(await blogApi().articles.get(projectId, articleId));
1014
+ } catch (error) {
1015
+ return errorResult(error);
1016
+ }
1017
+ });
1018
+ server.registerTool("update_blog_draft", {
1019
+ title: "Update one Blog Studio draft",
1020
+ description: "Save a complete Blog draft with optimistic conflict protection. This creates a new immutable revision and cannot publish.",
1021
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, articleId: import_contracts.SeoEntityIdSchema, draft: import_contracts.AgentBlogDraftUpdateSchema },
1022
+ outputSchema: import_contracts.AgentBlogArticleDetailSchema,
1023
+ annotations: createDraftAnnotations
1024
+ }, async ({ projectId, articleId, draft }) => {
1025
+ try {
1026
+ return jsonResult(await blogApi().articles.updateDraft(projectId, articleId, draft));
1027
+ } catch (error) {
1028
+ return errorResult(error);
1029
+ }
1030
+ });
1031
+ server.registerTool("generate_blog_article", {
1032
+ title: "Request Blog article generation",
1033
+ description: "Queue durable generation for one Blog article. It returns a job and never waits for provider work in the request.",
1034
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, articleId: import_contracts.SeoEntityIdSchema, idempotencyKey: z.string().min(8).max(200) },
1035
+ outputSchema: import_contracts.AgentBlogJobSchema,
1036
+ annotations: createDraftAnnotations
1037
+ }, async ({ projectId, articleId, idempotencyKey }) => {
1038
+ try {
1039
+ return jsonResult(await blogApi().articles.generate(projectId, articleId, idempotencyKey));
1040
+ } catch (error) {
1041
+ return errorResult(error);
1042
+ }
1043
+ });
1044
+ server.registerTool("get_blog_job", {
1045
+ title: "Read one Blog job",
1046
+ description: "Read truthful durable job state without exposing prompts, provider details, or secrets.",
1047
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, jobId: import_contracts.SeoEntityIdSchema },
1048
+ outputSchema: import_contracts.AgentBlogJobSchema,
1049
+ annotations: readOnlyAnnotations
1050
+ }, async ({ projectId, jobId }) => {
1051
+ try {
1052
+ return jsonResult(await blogApi().jobs.get(projectId, jobId));
1053
+ } catch (error) {
1054
+ return errorResult(error);
1055
+ }
1056
+ });
1057
+ server.registerTool("preview_blog_publish", {
1058
+ title: "Preview approved Blog publication",
1059
+ description: "Preview an exact user-approved revision and issue a short-lived bound confirmation. This does not publish.",
1060
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, articleId: import_contracts.SeoEntityIdSchema, revisionId: import_contracts.SeoEntityIdSchema, destinationIds: z.array(import_contracts.SeoEntityIdSchema).min(1).max(20).optional() },
1061
+ outputSchema: import_contracts.AgentBlogPublishPreviewSchema,
1062
+ annotations: publishPreviewAnnotations
1063
+ }, async ({ projectId, articleId, revisionId, destinationIds }) => {
1064
+ try {
1065
+ return jsonResult(await blogApi().articles.previewPublish(projectId, articleId, revisionId, void 0, destinationIds));
1066
+ } catch (error) {
1067
+ return errorResult(error);
1068
+ }
1069
+ });
1070
+ server.registerTool("execute_blog_publish", {
1071
+ title: "Publish approved Blog revision",
1072
+ description: "Publish only the same exact user-approved revision from preview. Requires blog:publish, a confirmation token, and an idempotency key.",
1073
+ inputSchema: { projectId: import_contracts.SeoEntityIdSchema, articleId: import_contracts.SeoEntityIdSchema, revisionId: import_contracts.SeoEntityIdSchema, destinationIds: z.array(import_contracts.SeoEntityIdSchema).min(1).max(20).optional(), confirmationToken: z.string().min(1), idempotencyKey: z.string().min(8).max(200) },
1074
+ outputSchema: z.object({ publicationId: z.string(), articleId: z.string(), revisionId: z.string(), publicUrl: z.string().url(), publishedAt: z.string().datetime() }),
1075
+ annotations: publishExecuteAnnotations
1076
+ }, async ({ projectId, articleId, revisionId, destinationIds, confirmationToken, idempotencyKey }) => {
1077
+ try {
1078
+ return jsonResult(await blogApi().articles.executePublish(projectId, articleId, { revisionId, destinationIds, confirmationToken, idempotencyKey }));
1079
+ } catch (error) {
1080
+ return errorResult(error);
1081
+ }
1082
+ });
684
1083
  server.registerTool("list_calendar_events", {
685
1084
  title: "List Rolino calendar events",
686
1085
  description: "List scheduled posts and their enabled destinations in one exact project, including YouTube posts whose private early preparation has started. By default the bounded window spans 30 days in the past through 90 days ahead; provide both from and to for another range and paginate with nextCursor.",