@motiblog/mcp 0.1.0 → 0.1.2
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/README.md +18 -10
- package/dist/http.js +65 -17
- package/dist/http.js.map +1 -1
- package/dist/index.js +65 -17
- package/dist/index.js.map +1 -1
- package/dist/lib.d.ts +18 -4
- package/dist/lib.js +65 -17
- package/dist/lib.js.map +1 -1
- package/package.json +3 -1
package/dist/lib.js
CHANGED
|
@@ -495,7 +495,7 @@ var toolDefinitions = [
|
|
|
495
495
|
name: "get_digest",
|
|
496
496
|
description: "One-call morning check-in for a project: article counts by lifecycle status, the REVIEW queue (what is waiting to be published, with word counts), posts published in the last 7 days, content plans due in the next 7 days, the latest published post, quota usage, and the project's current autonomy level (L1 = nothing ships without agent review; L2 = clean articles auto-publish). Start every check-in here.",
|
|
497
497
|
inputSchema: { ...projectIdArg },
|
|
498
|
-
annotations: { readOnlyHint: true },
|
|
498
|
+
annotations: { title: "Morning Digest", readOnlyHint: true, destructiveHint: false },
|
|
499
499
|
async handler(args, ctx) {
|
|
500
500
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
501
501
|
const [project, articles, plans] = await Promise.all([
|
|
@@ -512,7 +512,7 @@ var toolDefinitions = [
|
|
|
512
512
|
name: "list_projects",
|
|
513
513
|
description: "List every MotiBlog project the API key can access, with settings that matter to agents: requireApproval (REVIEW vs APPROVED after generation), autoPublish, factCheckStrict, selfHostedBlog, and article quota usage.",
|
|
514
514
|
inputSchema: {},
|
|
515
|
-
annotations: { readOnlyHint: true },
|
|
515
|
+
annotations: { title: "List Projects", readOnlyHint: true, destructiveHint: false },
|
|
516
516
|
async handler(_args, ctx) {
|
|
517
517
|
return json(await ctx.client.listProjects());
|
|
518
518
|
}
|
|
@@ -521,7 +521,7 @@ var toolDefinitions = [
|
|
|
521
521
|
name: "get_project",
|
|
522
522
|
description: "Get one MotiBlog project in detail: pipeline settings (aiModel, language, internalLinks, banner), positioning inputs (businessProfile, productTruth, manualPositioning) and quota state.",
|
|
523
523
|
inputSchema: { ...projectIdArg },
|
|
524
|
-
annotations: { readOnlyHint: true },
|
|
524
|
+
annotations: { title: "Project Details", readOnlyHint: true, destructiveHint: false },
|
|
525
525
|
async handler(args, ctx) {
|
|
526
526
|
return json(await ctx.client.getProject(resolveProjectId(ctx, args.project_id)));
|
|
527
527
|
}
|
|
@@ -531,6 +531,7 @@ var toolDefinitions = [
|
|
|
531
531
|
name: "start_pipeline",
|
|
532
532
|
description: "Start the autonomous pipeline for a project: site crawl/analysis \u2192 topic selection \u2192 article generation for scheduled plans. Returns immediately; poll get_pipeline_status or list_articles(status=GENERATING) to follow progress.",
|
|
533
533
|
inputSchema: { ...projectIdArg },
|
|
534
|
+
annotations: { title: "Start Content Pipeline", readOnlyHint: false, destructiveHint: false },
|
|
534
535
|
async handler(args, ctx) {
|
|
535
536
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
536
537
|
return json(await ctx.client.pipelineStart(projectId));
|
|
@@ -540,7 +541,7 @@ var toolDefinitions = [
|
|
|
540
541
|
name: "get_pipeline_status",
|
|
541
542
|
description: "Get current pipeline run state for a project: whether a run is active, its steps, and recent run history. Use after start_pipeline or generate_article.",
|
|
542
543
|
inputSchema: { ...projectIdArg },
|
|
543
|
-
annotations: { readOnlyHint: true },
|
|
544
|
+
annotations: { title: "Pipeline Status", readOnlyHint: true, destructiveHint: false },
|
|
544
545
|
async handler(args, ctx) {
|
|
545
546
|
return json(
|
|
546
547
|
await ctx.client.pipelineStatus(resolveProjectId(ctx, args.project_id))
|
|
@@ -555,6 +556,7 @@ var toolDefinitions = [
|
|
|
555
556
|
topic: import_zod.z.string().min(1).describe('The proposed topic/title, e.g. "How headless CMSs serve AI agents"'),
|
|
556
557
|
...projectIdArg
|
|
557
558
|
},
|
|
559
|
+
annotations: { title: "Suggest Topics", readOnlyHint: false, destructiveHint: false },
|
|
558
560
|
async handler(args, ctx) {
|
|
559
561
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
560
562
|
return json(await ctx.client.createContentPlanFromGap(projectId, String(args.topic)));
|
|
@@ -564,7 +566,7 @@ var toolDefinitions = [
|
|
|
564
566
|
name: "list_content_plans",
|
|
565
567
|
description: "List the content plan queue for a project with each entry status: DRAFT (proposed), APPROVED (cleared for generation), IN_PROGRESS, COMPLETED.",
|
|
566
568
|
inputSchema: { ...projectIdArg },
|
|
567
|
-
annotations: { readOnlyHint: true },
|
|
569
|
+
annotations: { title: "List Content Plans", readOnlyHint: true, destructiveHint: false },
|
|
568
570
|
async handler(args, ctx) {
|
|
569
571
|
return json(await ctx.client.listContentPlans(resolveProjectId(ctx, args.project_id)));
|
|
570
572
|
}
|
|
@@ -576,6 +578,7 @@ var toolDefinitions = [
|
|
|
576
578
|
plan_id: import_zod.z.string().describe("Content plan entry id (from list_content_plans)"),
|
|
577
579
|
...projectIdArg
|
|
578
580
|
},
|
|
581
|
+
annotations: { title: "Approve Content Plan", readOnlyHint: false, destructiveHint: false },
|
|
579
582
|
async handler(args, ctx) {
|
|
580
583
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
581
584
|
return json(await ctx.client.approveContentPlan(projectId, String(args.plan_id)));
|
|
@@ -588,6 +591,7 @@ var toolDefinitions = [
|
|
|
588
591
|
plan_id: import_zod.z.string().describe("Content plan entry id"),
|
|
589
592
|
...projectIdArg
|
|
590
593
|
},
|
|
594
|
+
annotations: { title: "Regenerate Content Plan", readOnlyHint: false, destructiveHint: true },
|
|
591
595
|
async handler(args, ctx) {
|
|
592
596
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
593
597
|
return json(await ctx.client.regenerateContentPlan(projectId, String(args.plan_id)));
|
|
@@ -600,6 +604,7 @@ var toolDefinitions = [
|
|
|
600
604
|
plan_id: import_zod.z.string().describe("Content plan entry id (must be APPROVED)"),
|
|
601
605
|
...projectIdArg
|
|
602
606
|
},
|
|
607
|
+
annotations: { title: "Generate Article", readOnlyHint: false, destructiveHint: false },
|
|
603
608
|
async handler(args, ctx) {
|
|
604
609
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
605
610
|
return json(await ctx.client.generateArticleFromPlan(projectId, String(args.plan_id)));
|
|
@@ -613,7 +618,7 @@ var toolDefinitions = [
|
|
|
613
618
|
end_date: import_zod.z.string().describe("ISO date, e.g. 2026-09-30"),
|
|
614
619
|
...projectIdArg
|
|
615
620
|
},
|
|
616
|
-
annotations: { readOnlyHint: true },
|
|
621
|
+
annotations: { title: "Content Calendar", readOnlyHint: true, destructiveHint: false },
|
|
617
622
|
async handler(args, ctx) {
|
|
618
623
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
619
624
|
return json(
|
|
@@ -633,7 +638,7 @@ var toolDefinitions = [
|
|
|
633
638
|
status: import_zod.z.enum(ARTICLE_STATUSES).optional().describe("Filter by lifecycle status (default REVIEW)"),
|
|
634
639
|
...projectIdArg
|
|
635
640
|
},
|
|
636
|
-
annotations: { readOnlyHint: true },
|
|
641
|
+
annotations: { title: "Review Queue", readOnlyHint: true, destructiveHint: false },
|
|
637
642
|
async handler(args, ctx) {
|
|
638
643
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
639
644
|
const status = typeof args.status === "string" ? args.status : "REVIEW";
|
|
@@ -649,7 +654,7 @@ var toolDefinitions = [
|
|
|
649
654
|
include_logs: import_zod.z.boolean().optional().describe("Include pipeline phase logs (default false)"),
|
|
650
655
|
...projectIdArg
|
|
651
656
|
},
|
|
652
|
-
annotations: { readOnlyHint: true },
|
|
657
|
+
annotations: { title: "Get Article", readOnlyHint: true, destructiveHint: false },
|
|
653
658
|
async handler(args, ctx) {
|
|
654
659
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
655
660
|
const article = await ctx.client.getArticle(projectId, String(args.article_id));
|
|
@@ -671,6 +676,7 @@ var toolDefinitions = [
|
|
|
671
676
|
status: import_zod.z.enum(["DRAFT", "REVIEW", "APPROVED"]).optional(),
|
|
672
677
|
...projectIdArg
|
|
673
678
|
},
|
|
679
|
+
annotations: { title: "Update Article", readOnlyHint: false, destructiveHint: true },
|
|
674
680
|
async handler(args, ctx) {
|
|
675
681
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
676
682
|
const patch = {};
|
|
@@ -689,6 +695,12 @@ var toolDefinitions = [
|
|
|
689
695
|
publish_now: import_zod.z.boolean().optional().describe("Also trigger publishing now (default false)"),
|
|
690
696
|
...projectIdArg
|
|
691
697
|
},
|
|
698
|
+
annotations: {
|
|
699
|
+
title: "Approve & Publish",
|
|
700
|
+
readOnlyHint: false,
|
|
701
|
+
destructiveHint: true,
|
|
702
|
+
openWorldHint: true
|
|
703
|
+
},
|
|
692
704
|
async handler(args, ctx) {
|
|
693
705
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
694
706
|
const articleId = String(args.article_id);
|
|
@@ -707,6 +719,7 @@ var toolDefinitions = [
|
|
|
707
719
|
clear_schedule: import_zod.z.boolean().optional().describe("Clear any scheduled date instead of setting one"),
|
|
708
720
|
...projectIdArg
|
|
709
721
|
},
|
|
722
|
+
annotations: { title: "Schedule Publication", readOnlyHint: false, destructiveHint: false },
|
|
710
723
|
async handler(args, ctx) {
|
|
711
724
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
712
725
|
const value = args.clear_schedule === true ? null : args.scheduled_for ?? null;
|
|
@@ -721,7 +734,7 @@ var toolDefinitions = [
|
|
|
721
734
|
article_id: import_zod.z.string().describe("Article id"),
|
|
722
735
|
...projectIdArg
|
|
723
736
|
},
|
|
724
|
-
annotations: { destructiveHint: true },
|
|
737
|
+
annotations: { title: "Regenerate Article", readOnlyHint: false, destructiveHint: true },
|
|
725
738
|
async handler(args, ctx) {
|
|
726
739
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
727
740
|
return json(await ctx.client.regenerateArticle(projectId, String(args.article_id)));
|
|
@@ -735,6 +748,7 @@ var toolDefinitions = [
|
|
|
735
748
|
chapter_index: import_zod.z.number().int().min(0).describe("Zero-based chapter index"),
|
|
736
749
|
...projectIdArg
|
|
737
750
|
},
|
|
751
|
+
annotations: { title: "Regenerate Chapter", readOnlyHint: false, destructiveHint: true },
|
|
738
752
|
async handler(args, ctx) {
|
|
739
753
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
740
754
|
return json(
|
|
@@ -753,7 +767,7 @@ var toolDefinitions = [
|
|
|
753
767
|
article_id: import_zod.z.string().describe("Article id"),
|
|
754
768
|
...projectIdArg
|
|
755
769
|
},
|
|
756
|
-
annotations: { readOnlyHint: true },
|
|
770
|
+
annotations: { title: "Pipeline Logs", readOnlyHint: true, destructiveHint: false },
|
|
757
771
|
async handler(args, ctx) {
|
|
758
772
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
759
773
|
return json(await ctx.client.getPipelineLogs(projectId, String(args.article_id)));
|
|
@@ -763,7 +777,7 @@ var toolDefinitions = [
|
|
|
763
777
|
name: "list_refresh_suggestions",
|
|
764
778
|
description: "Across ALL your projects: published articles whose Search Console stats suggest they are decaying and would benefit from a refresh. Feed these back into planning via suggest_topics or update_article.",
|
|
765
779
|
inputSchema: {},
|
|
766
|
-
annotations: { readOnlyHint: true },
|
|
780
|
+
annotations: { title: "Refresh Suggestions", readOnlyHint: true, destructiveHint: false },
|
|
767
781
|
async handler(_args, ctx) {
|
|
768
782
|
return json(await ctx.client.listRefreshSuggestions());
|
|
769
783
|
}
|
|
@@ -773,7 +787,7 @@ var toolDefinitions = [
|
|
|
773
787
|
name: "list_integrations",
|
|
774
788
|
description: "List configured publishing targets (integrations) for a project: WEBHOOK, WORDPRESS, GHOST, WEBFLOW, SHOPIFY, DEVTO, SANITY, CUSTOM_API \u2014 with enabled state.",
|
|
775
789
|
inputSchema: { ...projectIdArg },
|
|
776
|
-
annotations: { readOnlyHint: true },
|
|
790
|
+
annotations: { title: "List Integrations", readOnlyHint: true, destructiveHint: false },
|
|
777
791
|
async handler(args, ctx) {
|
|
778
792
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
779
793
|
const integrations = await ctx.client.listIntegrations(projectId);
|
|
@@ -790,6 +804,12 @@ var toolDefinitions = [
|
|
|
790
804
|
method: import_zod.z.enum(["POST", "PUT", "PATCH"]).optional().describe("HTTP method (default POST)"),
|
|
791
805
|
...projectIdArg
|
|
792
806
|
},
|
|
807
|
+
annotations: {
|
|
808
|
+
title: "Create Webhook Integration",
|
|
809
|
+
readOnlyHint: false,
|
|
810
|
+
destructiveHint: false,
|
|
811
|
+
openWorldHint: true
|
|
812
|
+
},
|
|
793
813
|
async handler(args, ctx) {
|
|
794
814
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
795
815
|
const config = { url: String(args.url) };
|
|
@@ -813,6 +833,12 @@ var toolDefinitions = [
|
|
|
813
833
|
mode: import_zod.z.enum(["ping", "full"]).optional(),
|
|
814
834
|
...projectIdArg
|
|
815
835
|
},
|
|
836
|
+
annotations: {
|
|
837
|
+
title: "Test Integration",
|
|
838
|
+
readOnlyHint: false,
|
|
839
|
+
destructiveHint: false,
|
|
840
|
+
openWorldHint: true
|
|
841
|
+
},
|
|
816
842
|
async handler(args, ctx) {
|
|
817
843
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
818
844
|
return json(
|
|
@@ -832,6 +858,12 @@ var toolDefinitions = [
|
|
|
832
858
|
integration_id: import_zod.z.string().describe("Target integration id"),
|
|
833
859
|
...projectIdArg
|
|
834
860
|
},
|
|
861
|
+
annotations: {
|
|
862
|
+
title: "Publish to CMS",
|
|
863
|
+
readOnlyHint: false,
|
|
864
|
+
destructiveHint: true,
|
|
865
|
+
openWorldHint: true
|
|
866
|
+
},
|
|
835
867
|
async handler(args, ctx) {
|
|
836
868
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
837
869
|
return json(
|
|
@@ -851,6 +883,12 @@ var toolDefinitions = [
|
|
|
851
883
|
integration_id: import_zod.z.string(),
|
|
852
884
|
...projectIdArg
|
|
853
885
|
},
|
|
886
|
+
annotations: {
|
|
887
|
+
title: "Retry Publish",
|
|
888
|
+
readOnlyHint: false,
|
|
889
|
+
destructiveHint: true,
|
|
890
|
+
openWorldHint: true
|
|
891
|
+
},
|
|
854
892
|
async handler(args, ctx) {
|
|
855
893
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
856
894
|
return json(
|
|
@@ -870,7 +908,7 @@ var toolDefinitions = [
|
|
|
870
908
|
limit: import_zod.z.number().int().min(1).max(200).optional(),
|
|
871
909
|
...projectIdArg
|
|
872
910
|
},
|
|
873
|
-
annotations: { readOnlyHint: true },
|
|
911
|
+
annotations: { title: "Publish Logs", readOnlyHint: true, destructiveHint: false },
|
|
874
912
|
async handler(args, ctx) {
|
|
875
913
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
876
914
|
return json(
|
|
@@ -887,7 +925,7 @@ var toolDefinitions = [
|
|
|
887
925
|
name: "list_keywords",
|
|
888
926
|
description: "List tracked keywords for a project (search volume, difficulty, intent, status). Keywords drive topic relevance in generation.",
|
|
889
927
|
inputSchema: { ...projectIdArg },
|
|
890
|
-
annotations: { readOnlyHint: true },
|
|
928
|
+
annotations: { title: "List Keywords", readOnlyHint: true, destructiveHint: false },
|
|
891
929
|
async handler(args, ctx) {
|
|
892
930
|
return json(await ctx.client.listKeywords(resolveProjectId(ctx, args.project_id)));
|
|
893
931
|
}
|
|
@@ -902,6 +940,7 @@ var toolDefinitions = [
|
|
|
902
940
|
intent: import_zod.z.enum(["INFORMATIONAL", "NAVIGATIONAL", "TRANSACTIONAL", "COMMERCIAL"]).optional(),
|
|
903
941
|
...projectIdArg
|
|
904
942
|
},
|
|
943
|
+
annotations: { title: "Add Keyword", readOnlyHint: false, destructiveHint: false },
|
|
905
944
|
async handler(args, ctx) {
|
|
906
945
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
907
946
|
return json(
|
|
@@ -921,7 +960,7 @@ var toolDefinitions = [
|
|
|
921
960
|
active_only: import_zod.z.boolean().optional().describe("Only active facts (default false = all)"),
|
|
922
961
|
...projectIdArg
|
|
923
962
|
},
|
|
924
|
-
annotations: { readOnlyHint: true },
|
|
963
|
+
annotations: { title: "List Product Facts", readOnlyHint: true, destructiveHint: false },
|
|
925
964
|
async handler(args, ctx) {
|
|
926
965
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
927
966
|
return json(
|
|
@@ -939,6 +978,7 @@ var toolDefinitions = [
|
|
|
939
978
|
active: import_zod.z.boolean().optional().describe("Set active flag when updating"),
|
|
940
979
|
...projectIdArg
|
|
941
980
|
},
|
|
981
|
+
annotations: { title: "Supply Product Fact", readOnlyHint: false, destructiveHint: false },
|
|
942
982
|
async handler(args, ctx) {
|
|
943
983
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
944
984
|
const category = Array.isArray(args.category) ? args.category.map(String) : void 0;
|
|
@@ -969,6 +1009,12 @@ var toolDefinitions = [
|
|
|
969
1009
|
limit: import_zod.z.number().int().min(1).max(500).optional().describe("Max articles to export (default 100)"),
|
|
970
1010
|
...projectIdArg
|
|
971
1011
|
},
|
|
1012
|
+
annotations: {
|
|
1013
|
+
title: "Export Blog to Files",
|
|
1014
|
+
readOnlyHint: false,
|
|
1015
|
+
destructiveHint: true,
|
|
1016
|
+
openWorldHint: true
|
|
1017
|
+
},
|
|
972
1018
|
async handler(args, ctx) {
|
|
973
1019
|
const projectId = resolveProjectId(ctx, args.project_id);
|
|
974
1020
|
const status = typeof args.status === "string" ? args.status : "PUBLISHED";
|
|
@@ -1005,10 +1051,12 @@ function buildServer(config) {
|
|
|
1005
1051
|
register(
|
|
1006
1052
|
tool.name,
|
|
1007
1053
|
{
|
|
1008
|
-
title
|
|
1054
|
+
// The human-readable title, not the wire name — a picker showing
|
|
1055
|
+
// "approve_publication" tells a person nothing about what it does.
|
|
1056
|
+
title: tool.annotations.title,
|
|
1009
1057
|
description: tool.description,
|
|
1010
1058
|
inputSchema: tool.inputSchema,
|
|
1011
|
-
|
|
1059
|
+
annotations: tool.annotations
|
|
1012
1060
|
},
|
|
1013
1061
|
async (args) => {
|
|
1014
1062
|
let result;
|