@rolino/mcp 0.4.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.4.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.4.0",
111
- "@rolino/local-auth": "0.4.0",
112
- "@rolino/sdk": "0.4.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: {
@@ -195,7 +195,7 @@ var mcpDraftInputShape = {
195
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."
196
196
  ),
197
197
  youtubeSettings: import_contracts.DraftPostInputSchema.shape.youtubeSettings.describe(
198
- "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."
199
199
  )
200
200
  };
201
201
  var mcpDraftUpdateInputShape = {
@@ -217,6 +217,8 @@ var mcpScheduleExecuteOutputSchema = z.object({
217
217
  provider: import_contracts.PostSchedulePendingSchema.shape.provider.optional(),
218
218
  mutationId: import_contracts.PostSchedulePendingSchema.shape.mutationId.optional(),
219
219
  operation: import_contracts.PostSchedulePendingSchema.shape.operation.optional(),
220
+ phase: import_contracts.PostSchedulePendingSchema.shape.phase.optional(),
221
+ videoUploaded: import_contracts.PostSchedulePendingSchema.shape.videoUploaded.optional(),
220
222
  message: import_contracts.PostSchedulePendingSchema.shape.message.optional()
221
223
  }).passthrough();
222
224
  function jsonResult(structuredContent) {
@@ -316,6 +318,18 @@ var publishExecuteAnnotations = {
316
318
  idempotentHint: true,
317
319
  openWorldHint: true
318
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
+ };
319
333
  function defaultClient(options) {
320
334
  return new import_sdk2.RolinoClient({
321
335
  baseUrl: options.baseUrl ?? "https://getrolino.com",
@@ -326,6 +340,10 @@ function defaultClient(options) {
326
340
  }
327
341
  function createRolinoMcpServer(options = {}) {
328
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
+ };
329
347
  const server = new import_mcp.McpServer({
330
348
  name: "rolino",
331
349
  version: ROLINO_MCP_VERSION,
@@ -547,7 +565,7 @@ function createRolinoMcpServer(options = {}) {
547
565
  });
548
566
  server.registerTool("preview_post_schedule", {
549
567
  title: "Preview a Rolino post schedule",
550
- 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.",
551
569
  inputSchema: {
552
570
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
553
571
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -570,7 +588,7 @@ function createRolinoMcpServer(options = {}) {
570
588
  });
571
589
  server.registerTool("execute_post_schedule", {
572
590
  title: "Execute a confirmed Rolino post schedule",
573
- 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.",
574
592
  inputSchema: {
575
593
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
576
594
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -602,7 +620,7 @@ function createRolinoMcpServer(options = {}) {
602
620
  });
603
621
  server.registerTool("preview_post_publish", {
604
622
  title: "Preview immediate Rolino post publishing",
605
- 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.",
606
624
  inputSchema: {
607
625
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
608
626
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -625,7 +643,7 @@ function createRolinoMcpServer(options = {}) {
625
643
  });
626
644
  server.registerTool("execute_post_publish", {
627
645
  title: "Execute confirmed immediate Rolino post publishing",
628
- description: "Begin external publishing only after preview_post_publish. Pass the unchanged destinations, post version, and returned one-time confirmation token. 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.",
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.",
629
647
  inputSchema: {
630
648
  projectId: z.string().min(1).describe("Exact Rolino project ID."),
631
649
  postId: z.string().min(1).describe("Exact Rolino post ID."),
@@ -689,6 +707,379 @@ function createRolinoMcpServer(options = {}) {
689
707
  return errorResult(error);
690
708
  }
691
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
+ });
692
1083
  server.registerTool("list_calendar_events", {
693
1084
  title: "List Rolino calendar events",
694
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.",