posterly-mcp-server 0.54.4 → 0.55.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.
Files changed (87) hide show
  1. package/README.md +48 -5
  2. package/dist/generated/platform-manifest.d.ts +4 -4
  3. package/dist/generated/platform-manifest.js +9 -4
  4. package/dist/index.js +15 -2
  5. package/dist/lib/alias-transport.js +4 -0
  6. package/dist/lib/api-client.d.ts +152 -0
  7. package/dist/lib/api-client.js +88 -0
  8. package/dist/lib/claude-directory-profile.js +4 -2
  9. package/dist/lib/format.d.ts +44 -0
  10. package/dist/lib/format.js +125 -5
  11. package/dist/lib/gbp-location-preview.d.ts +21 -0
  12. package/dist/lib/gbp-location-preview.js +27 -0
  13. package/dist/lib/google-business-review-name.d.ts +36 -0
  14. package/dist/lib/google-business-review-name.js +83 -0
  15. package/dist/lib/id-schema.d.ts +14 -0
  16. package/dist/lib/id-schema.js +82 -0
  17. package/dist/lib/id-text.d.ts +26 -0
  18. package/dist/lib/id-text.js +63 -0
  19. package/dist/lib/reply-window.d.ts +5 -0
  20. package/dist/lib/reply-window.js +14 -0
  21. package/dist/lib/service-area-text.d.ts +27 -0
  22. package/dist/lib/service-area-text.js +41 -0
  23. package/dist/lib/suggestion-accept-note.d.ts +10 -0
  24. package/dist/lib/suggestion-accept-note.js +17 -0
  25. package/dist/lib/tool-registry.js +19 -2
  26. package/dist/lib/version.d.ts +1 -1
  27. package/dist/lib/version.js +1 -1
  28. package/dist/tools/audit-google-business-profile.js +7 -3
  29. package/dist/tools/connect-account.d.ts +2 -2
  30. package/dist/tools/create-connect-session.d.ts +2 -2
  31. package/dist/tools/create-post.d.ts +6 -6
  32. package/dist/tools/create-posts-batch.d.ts +4 -4
  33. package/dist/tools/create-webhook.d.ts +3 -3
  34. package/dist/tools/delete-post.d.ts +4 -4
  35. package/dist/tools/dismiss-suggestion.d.ts +7 -0
  36. package/dist/tools/dismiss-suggestion.js +21 -2
  37. package/dist/tools/find-slot.js +7 -4
  38. package/dist/tools/get-post.js +56 -5
  39. package/dist/tools/list-accounts.d.ts +4 -0
  40. package/dist/tools/list-accounts.js +25 -6
  41. package/dist/tools/list-analytics.d.ts +4 -0
  42. package/dist/tools/list-analytics.js +29 -7
  43. package/dist/tools/list-comments.d.ts +10 -0
  44. package/dist/tools/list-comments.js +54 -22
  45. package/dist/tools/list-conversations.d.ts +19 -4
  46. package/dist/tools/list-conversations.js +55 -15
  47. package/dist/tools/list-google-business-locations.d.ts +27 -0
  48. package/dist/tools/list-google-business-locations.js +35 -0
  49. package/dist/tools/list-google-business-media.d.ts +8 -0
  50. package/dist/tools/list-google-business-media.js +19 -5
  51. package/dist/tools/list-google-business-reviews.js +12 -2
  52. package/dist/tools/list-google-business-service-areas.d.ts +37 -0
  53. package/dist/tools/list-google-business-service-areas.js +33 -0
  54. package/dist/tools/list-media.js +3 -2
  55. package/dist/tools/list-platforms.d.ts +10 -10
  56. package/dist/tools/list-post-suggestions.js +5 -4
  57. package/dist/tools/list-posts.d.ts +8 -2
  58. package/dist/tools/list-posts.js +12 -2
  59. package/dist/tools/list-webhooks.d.ts +18 -1
  60. package/dist/tools/list-webhooks.js +22 -3
  61. package/dist/tools/list-workspace-members.js +3 -1
  62. package/dist/tools/manage-brands.d.ts +47 -0
  63. package/dist/tools/manage-brands.js +89 -0
  64. package/dist/tools/manage-comment.js +5 -1
  65. package/dist/tools/manage-google-business-location.d.ts +123 -0
  66. package/dist/tools/manage-google-business-location.js +97 -0
  67. package/dist/tools/manage-google-business-media.js +2 -0
  68. package/dist/tools/manage-google-business-review.js +31 -5
  69. package/dist/tools/manage-google-business-service-area.d.ts +74 -0
  70. package/dist/tools/manage-google-business-service-area.js +79 -0
  71. package/dist/tools/manage-webhook.d.ts +6 -6
  72. package/dist/tools/manage-x-posting-addon.d.ts +47 -0
  73. package/dist/tools/manage-x-posting-addon.js +92 -0
  74. package/dist/tools/trigger-platform-helper.d.ts +5 -5
  75. package/dist/tools/update-post.d.ts +14 -6
  76. package/dist/tools/update-post.js +23 -2
  77. package/dist/tools/upload-media.d.ts +12 -0
  78. package/dist/tools/upload-media.js +39 -3
  79. package/dist/tools/validate-post.d.ts +4 -4
  80. package/dist/tools/webhook-events.d.ts +2 -2
  81. package/dist/tools/webhook-events.js +2 -0
  82. package/dist/tools/whoami.d.ts +4 -0
  83. package/dist/tools/whoami.js +14 -6
  84. package/package.json +1 -1
  85. package/server.json +2 -2
  86. package/tool-annotations.json +21 -2
  87. package/tool-registry.json +251 -8
package/README.md CHANGED
@@ -123,7 +123,7 @@ Add the same server definition to your Cursor MCP settings:
123
123
 
124
124
  ## Available tools
125
125
 
126
- `posterly-mcp-server@0.54.4` exposes 67 tools covering 103 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 64 tools covering 100 actions.
126
+ `posterly-mcp-server@0.55.0` exposes 73 tools covering 115 actions. The hosted HTTP endpoint exposes the same catalog minus the three signup tools: 70 tools covering 112 actions.
127
127
 
128
128
  Many tools pick what to do with one parameter: `view` (reads), `action` (writes), or `type`. A few pick their mode from which parameters you pass (for example `update_post` with `status` changes the status instead of editing). Every tool description names all of its views and actions.
129
129
 
@@ -303,12 +303,13 @@ Google Business Profile reviews, media, and audits.
303
303
  | --- | --- |
304
304
  | `audit_google_business_profile` | Audit a Google profile |
305
305
  | `list_google_business_media` | Google profile media |
306
+ | `list_google_business_locations` | Google location hours |
306
307
 
307
308
  **`list_google_business_reviews`**: Google reviews
308
309
 
309
310
  | View | What it does |
310
311
  | --- | --- |
311
- | `reviews` (default) | Google reviews |
312
+ | `reviews` (default) | Google reviews, each with `review_name` for a reply |
312
313
  | `review_link` | Google review link |
313
314
 
314
315
  **`manage_google_business_review`**: Manage Google reviews
@@ -319,6 +320,8 @@ Google Business Profile reviews, media, and audits.
319
320
  | `reply` | Reply to a review (preview then confirm) |
320
321
  | `delete_reply` | Delete a review reply (preview then confirm) |
321
322
 
323
+ Each review from `list_google_business_reviews` includes `review_name` (`accounts/{account}/locations/{location}/reviews/{review}`) plus `account_id` and `location_id` when known. Pass that `review_name` with `account_id` (or `location_id`) to `manage_google_business_review` `reply` or `delete_reply`. Do not pass the Place ID from `view=review_link`.
324
+
322
325
  **`manage_google_business_media`**: Manage Google profile media
323
326
 
324
327
  | Action | What it does |
@@ -326,6 +329,26 @@ Google Business Profile reviews, media, and audits.
326
329
  | `add` | Add a photo or video (preview then confirm) |
327
330
  | `delete` | Delete a photo or video (preview then confirm) |
328
331
 
332
+ **`list_google_business_service_areas`**: Google service areas
333
+
334
+ | View | What it does |
335
+ | --- | --- |
336
+ | `areas` (default) | Service areas on a location |
337
+ | `places` | Search towns and postcodes |
338
+
339
+ **`manage_google_business_location`**: Manage a Google location
340
+
341
+ | Action | What it does |
342
+ | --- | --- |
343
+ | `update_hours` | Update regular hours (preview then confirm) |
344
+ | `update_attributes` | Update attributes (preview then confirm) |
345
+
346
+ **`manage_google_business_service_area`**: Update Google service areas
347
+
348
+ | Action | What it does |
349
+ | --- | --- |
350
+ | `update` | Replace service areas (preview then confirm) |
351
+
329
352
  ### Admin (`admin`)
330
353
 
331
354
  API keys, OAuth clients, webhooks, workspace members, and the publishing pause.
@@ -337,7 +360,6 @@ API keys, OAuth clients, webhooks, workspace members, and the publishing pause.
337
360
  | `list_workspace_members` | Workspace members |
338
361
  | `list_publishing_pauses` | Publishing pause: whether the workspace or any brand is paused, and what you may do |
339
362
  | `list_oauth_clients` | OAuth clients |
340
- | `list_webhooks` | Webhooks |
341
363
  | `create_webhook` | Create a webhook |
342
364
 
343
365
  **`manage_workspace_member`**: Manage a workspace member
@@ -364,6 +386,21 @@ API keys, OAuth clients, webhooks, workspace members, and the publishing pause.
364
386
  | `update` | Update an OAuth client |
365
387
  | `delete` | Delete an OAuth client (preview then confirm) |
366
388
 
389
+ **`list_webhooks`**: Webhooks
390
+
391
+ | View | What it does |
392
+ | --- | --- |
393
+ | `webhooks` (default) | Webhook subscriptions |
394
+ | `deliveries` | Webhook deliveries |
395
+
396
+ **`manage_brand`**: Create, update, or archive a brand
397
+
398
+ | Action | What it does |
399
+ | --- | --- |
400
+ | `create` | Create a brand |
401
+ | `update` | Update a brand |
402
+ | `archive` | Archive a brand (preview then confirm) |
403
+
367
404
  **`manage_webhook`**: Manage a webhook
368
405
 
369
406
  | Action | What it does |
@@ -390,6 +427,12 @@ Subscription changes and Agency extra accounts.
390
427
  | --- | --- |
391
428
  | `upgrade` | Move to a higher plan: quote the exact charge, then upgrade after `confirm: true` with the `preview_id` (preview then confirm) |
392
429
 
430
+ **`manage_x_posting_addon`**: Buy an X posting add-on
431
+
432
+ | Action | What it does |
433
+ | --- | --- |
434
+ | `buy` | Buy an X posting add-on: opens Stripe Checkout, and nothing is charged until that page is paid (preview then confirm) |
435
+
393
436
  **`manage_extra_account`**: Buy or remove extra accounts
394
437
 
395
438
  | Action | What it does |
@@ -548,8 +591,8 @@ The package reads:
548
591
 
549
592
  ## Claude directory profile
550
593
 
551
- The optional directory profile provides 52 tools over HTTP or 55 tools over local stdio for social publishing, existing-media uploads, analytics, and inbox work. AI image and video generation, generation-job helpers, billing mutations, and legacy tool aliases are unavailable in this profile. Text caption suggestions and read-only subscription information remain available. Tool descriptions are functional summaries; input schemas retain their validation constraints.
594
+ The optional directory profile provides 54 tools over HTTP or 57 tools over local stdio for social publishing, existing-media uploads, analytics, and inbox work. AI image and video generation, generation-job helpers, billing mutations, and legacy tool aliases are unavailable in this profile. Text caption suggestions and read-only subscription information remain available. Tool descriptions are functional summaries; input schemas retain their validation constraints.
552
595
 
553
- Hosted endpoint: `https://www.poster.ly/api/mcp?profile=claude`. For local stdio, set `POSTERLY_DIRECTORY_PROFILE=claude` alongside the existing API key. The default catalogs remain 64 hosted tools and 67 local tools. This profile does not grant authorization, bypass scopes, or change the existing preview and confirmation checks.
596
+ Hosted endpoint: `https://www.poster.ly/api/mcp?profile=claude`. For local stdio, set `POSTERLY_DIRECTORY_PROFILE=claude` alongside the existing API key. The default catalogs remain 70 hosted tools and 73 local tools. This profile does not grant authorization, bypass scopes, or change the existing preview and confirmation checks.
554
597
 
555
598
  Directory approval remains Anthropic's decision. This profile addresses the generation and financial-transaction restrictions in the [Anthropic Software Directory Policy](https://support.claude.com/en/articles/13145358-anthropic-software-directory-policy).
@@ -33,7 +33,7 @@ export declare const PLATFORM_MANIFEST: {
33
33
  readonly x: "twitter";
34
34
  readonly youtube: "youtube";
35
35
  };
36
- readonly helperNames: readonly ["linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota"];
36
+ readonly helperNames: readonly ["linkedin.company_lookup", "linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota", "youtube.playlists"];
37
37
  readonly analyticsPlatformIds: readonly ["instagram", "facebook", "twitter", "linkedin", "youtube", "pinterest", "threads", "google_business"];
38
38
  readonly connectTargetIds: readonly ["instagram", "meta", "facebook", "youtube", "tiktok", "linkedin", "linkedin_page", "threads", "google_business", "pinterest", "twitter", "telegram", "bluesky", "discord", "slack", "mastodon", "devto", "hashnode", "wordpress", "lemmy", "reddit", "medium", "skool", "whop"];
39
39
  readonly connectInputs: readonly ["bluesky", "devto", "discord", "facebook", "facebook_instagram", "facebook_pages", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "instagram_direct", "lemmy", "linkedin", "linkedin-company", "linkedin-page", "linkedin_company", "linkedin_page", "linkedin_personal", "mastodon", "medium", "meta", "meta_business", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "x_twitter", "youtube"];
@@ -113,7 +113,7 @@ export declare const PLATFORM_MANIFEST: {
113
113
  readonly aliases: readonly [];
114
114
  readonly postTypes: readonly ["text", "image", "video", "carousel", "document"];
115
115
  readonly analyticsSupported: true;
116
- readonly helpers: readonly ["linkedin.recent_mentions"];
116
+ readonly helpers: readonly ["linkedin.recent_mentions", "linkedin.company_lookup"];
117
117
  }, {
118
118
  readonly id: "youtube";
119
119
  readonly label: "YouTube";
@@ -121,7 +121,7 @@ export declare const PLATFORM_MANIFEST: {
121
121
  readonly aliases: readonly [];
122
122
  readonly postTypes: readonly ["video"];
123
123
  readonly analyticsSupported: true;
124
- readonly helpers: readonly [];
124
+ readonly helpers: readonly ["youtube.playlists"];
125
125
  }, {
126
126
  readonly id: "pinterest";
127
127
  readonly label: "Pinterest";
@@ -402,7 +402,7 @@ export declare const PLANNED_PLATFORM_IDS: readonly ["reddit", "medium", "skool"
402
402
  export declare const ALL_PLATFORM_IDS: readonly ["instagram", "facebook", "tiktok", "twitter", "linkedin", "youtube", "pinterest", "threads", "google_business", "telegram", "bluesky", "discord", "slack", "mastodon", "devto", "hashnode", "wordpress", "lemmy", "reddit", "medium", "skool", "whop"];
403
403
  export declare const SUPPORTED_PLATFORM_INPUTS: readonly ["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"];
404
404
  export declare const ALL_PLATFORM_INPUTS: readonly ["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "medium", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "youtube"];
405
- export declare const PLATFORM_HELPER_NAMES: readonly ["linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota"];
405
+ export declare const PLATFORM_HELPER_NAMES: readonly ["linkedin.company_lookup", "linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota", "youtube.playlists"];
406
406
  export declare const CONNECT_TARGET_IDS: readonly ["instagram", "meta", "facebook", "youtube", "tiktok", "linkedin", "linkedin_page", "threads", "google_business", "pinterest", "twitter", "telegram", "bluesky", "discord", "slack", "mastodon", "devto", "hashnode", "wordpress", "lemmy", "reddit", "medium", "skool", "whop"];
407
407
  export declare const CONNECT_INPUTS: readonly ["bluesky", "devto", "discord", "facebook", "facebook_instagram", "facebook_pages", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "instagram_direct", "lemmy", "linkedin", "linkedin-company", "linkedin-page", "linkedin_company", "linkedin_page", "linkedin_personal", "mastodon", "medium", "meta", "meta_business", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "x_twitter", "youtube"];
408
408
  export declare const ANALYTICS_PLATFORM_IDS: readonly ["instagram", "facebook", "twitter", "linkedin", "youtube", "pinterest", "threads", "google_business"];
@@ -134,10 +134,12 @@ export const PLATFORM_MANIFEST = {
134
134
  "youtube": "youtube"
135
135
  },
136
136
  "helperNames": [
137
+ "linkedin.company_lookup",
137
138
  "linkedin.recent_mentions",
138
139
  "pinterest.boards",
139
140
  "tiktok.creator_info",
140
- "x.quota"
141
+ "x.quota",
142
+ "youtube.playlists"
141
143
  ],
142
144
  "analyticsPlatformIds": [
143
145
  "instagram",
@@ -335,7 +337,8 @@ export const PLATFORM_MANIFEST = {
335
337
  ],
336
338
  "analyticsSupported": true,
337
339
  "helpers": [
338
- "linkedin.recent_mentions"
340
+ "linkedin.recent_mentions",
341
+ "linkedin.company_lookup"
339
342
  ]
340
343
  },
341
344
  {
@@ -347,7 +350,9 @@ export const PLATFORM_MANIFEST = {
347
350
  "video"
348
351
  ],
349
352
  "analyticsSupported": true,
350
- "helpers": []
353
+ "helpers": [
354
+ "youtube.playlists"
355
+ ]
351
356
  },
352
357
  {
353
358
  "id": "pinterest",
@@ -747,7 +752,7 @@ export const PLANNED_PLATFORM_IDS = ["reddit", "medium", "skool", "whop"];
747
752
  export const ALL_PLATFORM_IDS = ["instagram", "facebook", "tiktok", "twitter", "linkedin", "youtube", "pinterest", "threads", "google_business", "telegram", "bluesky", "discord", "slack", "mastodon", "devto", "hashnode", "wordpress", "lemmy", "reddit", "medium", "skool", "whop"];
748
753
  export const SUPPORTED_PLATFORM_INPUTS = ["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "pinterest", "slack", "telegram", "threads", "tiktok", "twitter", "wordpress", "x", "youtube"];
749
754
  export const ALL_PLATFORM_INPUTS = ["bluesky", "devto", "discord", "facebook", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "lemmy", "linkedin", "mastodon", "medium", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "youtube"];
750
- export const PLATFORM_HELPER_NAMES = ["linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota"];
755
+ export const PLATFORM_HELPER_NAMES = ["linkedin.company_lookup", "linkedin.recent_mentions", "pinterest.boards", "tiktok.creator_info", "x.quota", "youtube.playlists"];
751
756
  export const CONNECT_TARGET_IDS = ["instagram", "meta", "facebook", "youtube", "tiktok", "linkedin", "linkedin_page", "threads", "google_business", "pinterest", "twitter", "telegram", "bluesky", "discord", "slack", "mastodon", "devto", "hashnode", "wordpress", "lemmy", "reddit", "medium", "skool", "whop"];
752
757
  export const CONNECT_INPUTS = ["bluesky", "devto", "discord", "facebook", "facebook_instagram", "facebook_pages", "gmb", "google-business", "google_business", "google_business_profile", "hashnode", "instagram", "instagram-standalone", "instagram_direct", "lemmy", "linkedin", "linkedin-company", "linkedin-page", "linkedin_company", "linkedin_page", "linkedin_personal", "mastodon", "medium", "meta", "meta_business", "pinterest", "reddit", "skool", "slack", "telegram", "threads", "tiktok", "twitter", "whop", "wordpress", "x", "x_twitter", "youtube"];
753
758
  export const ANALYTICS_PLATFORM_IDS = ["instagram", "facebook", "twitter", "linkedin", "youtube", "pinterest", "threads", "google_business"];
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ import { CLAUDE_DIRECTORY_INSTRUCTIONS, isClaudeDirectoryTool } from './lib/clau
9
9
  import { McpError, ErrorCode } from '@modelcontextprotocol/sdk/types.js';
10
10
  import { AliasTransport } from './lib/alias-transport.js';
11
11
  import { StdioPreviewTokens } from './lib/preview-token.js';
12
+ import { loosenIdObject, loosenIdShape } from './lib/id-schema.js';
12
13
  import { parseToolsets, toolsetInstructions, visibleTools } from './lib/tool-registry.js';
13
14
  import { getAgentSignupInfoTool } from './tools/get-agent-signup-info.js';
14
15
  import { getSignupSessionTool } from './tools/get-signup-session.js';
@@ -38,6 +39,7 @@ import { manageOAuthClientTool } from './tools/manage-oauth-client.js';
38
39
  import { listPlatformsTool } from './tools/list-platforms.js';
39
40
  import { triggerPlatformHelperTool } from './tools/trigger-platform-helper.js';
40
41
  import { listBrandsTool } from './tools/list-brands.js';
42
+ import { manageBrandsTool } from './tools/manage-brands.js';
41
43
  import { listPostSuggestionsTool } from './tools/list-post-suggestions.js';
42
44
  import { dismissSuggestionTool } from './tools/dismiss-suggestion.js';
43
45
  import { submitAgentFeedbackTool } from './tools/submit-agent-feedback.js';
@@ -67,6 +69,10 @@ import { auditGoogleBusinessProfileTool } from './tools/audit-google-business-pr
67
69
  import { manageGoogleBusinessReviewTool } from './tools/manage-google-business-review.js';
68
70
  import { listGoogleBusinessMediaTool } from './tools/list-google-business-media.js';
69
71
  import { manageGoogleBusinessMediaTool } from './tools/manage-google-business-media.js';
72
+ import { listGoogleBusinessServiceAreasTool } from './tools/list-google-business-service-areas.js';
73
+ import { manageGoogleBusinessServiceAreaTool } from './tools/manage-google-business-service-area.js';
74
+ import { listGoogleBusinessLocationsTool } from './tools/list-google-business-locations.js';
75
+ import { manageGoogleBusinessLocationTool } from './tools/manage-google-business-location.js';
70
76
  import { listConversationsTool } from './tools/list-conversations.js';
71
77
  import { manageConversationTool } from './tools/manage-conversation.js';
72
78
  import { listCommentsTool } from './tools/list-comments.js';
@@ -77,6 +83,7 @@ import { listWebhooksTool } from './tools/list-webhooks.js';
77
83
  import { createWebhookTool } from './tools/create-webhook.js';
78
84
  import { manageWebhookTool } from './tools/manage-webhook.js';
79
85
  import { getXPostingQuotaTool } from './tools/get-x-posting-quota.js';
86
+ import { manageXPostingAddonTool } from './tools/manage-x-posting-addon.js';
80
87
  /**
81
88
  * Every stdio tool, in registration order. The order is what tools/list
82
89
  * returns, so keep new tools appended where they belong rather than
@@ -110,6 +117,7 @@ const STDIO_TOOLS = [
110
117
  listPlatformsTool,
111
118
  triggerPlatformHelperTool,
112
119
  listBrandsTool,
120
+ manageBrandsTool,
113
121
  listPostSuggestionsTool,
114
122
  dismissSuggestionTool,
115
123
  submitAgentFeedbackTool,
@@ -139,6 +147,10 @@ const STDIO_TOOLS = [
139
147
  manageGoogleBusinessReviewTool,
140
148
  listGoogleBusinessMediaTool,
141
149
  manageGoogleBusinessMediaTool,
150
+ listGoogleBusinessServiceAreasTool,
151
+ manageGoogleBusinessServiceAreaTool,
152
+ listGoogleBusinessLocationsTool,
153
+ manageGoogleBusinessLocationTool,
142
154
  listConversationsTool,
143
155
  manageConversationTool,
144
156
  listCommentsTool,
@@ -149,6 +161,7 @@ const STDIO_TOOLS = [
149
161
  createWebhookTool,
150
162
  manageWebhookTool,
151
163
  getXPostingQuotaTool,
164
+ manageXPostingAddonTool,
152
165
  posterlyStatusTool,
153
166
  ];
154
167
  // The tool registry (sets, labels, aliases) ships at the package root next to
@@ -192,7 +205,7 @@ setMcpClientNameResolver(() => server.server.getClientVersion()?.name);
192
205
  const LEGACY_SCHEMAS = new Map();
193
206
  for (const tool of STDIO_TOOLS) {
194
207
  for (const [alias, schema] of Object.entries(tool.legacySchemas ?? {}))
195
- LEGACY_SCHEMAS.set(alias, schema);
208
+ LEGACY_SCHEMAS.set(alias, loosenIdObject(schema));
196
209
  }
197
210
  /**
198
211
  * Validates an alias call against the old tool's own schema, so a call the
@@ -218,7 +231,7 @@ const transport = new AliasTransport(new StdioServerTransport(), registry, tools
218
231
  const previews = new StdioPreviewTokens();
219
232
  function registerAll(tools) {
220
233
  for (const tool of tools) {
221
- server.tool(tool.name, tool.description, tool.inputSchema.shape, getToolAnnotations(tool.name), async (input, extra) => {
234
+ server.tool(tool.name, tool.description, loosenIdShape(tool.inputSchema.shape), getToolAnnotations(tool.name), async (input, extra) => {
222
235
  // The CALLED name (an alias, or the tool itself) is what telemetry
223
236
  // records as X-Posterly-Tool. The per-call context lives only here:
224
237
  // never in the arguments, never on shared state.
@@ -30,6 +30,7 @@
30
30
  * Only the public Transport interface is used; no SDK private fields.
31
31
  */
32
32
  import { claudeDirectoryDescription, claudeDirectorySchema, isClaudeDirectoryTool } from './claude-directory-profile.js';
33
+ import { normalizeIdArgs } from './id-text.js';
33
34
  import { DEPRECATION_META_KEY, deprecationNote, resolveAlias, translateArgs, validateMode, } from './tool-registry.js';
34
35
  function requestKey(id) {
35
36
  return `${typeof id}:${String(id)}`;
@@ -107,6 +108,9 @@ export class AliasTransport {
107
108
  this.onmessage?.(message, extra);
108
109
  return;
109
110
  }
111
+ if (Object.prototype.hasOwnProperty.call(request.params, 'arguments')) {
112
+ request.params = { ...request.params, arguments: normalizeIdArgs(request.params.arguments) };
113
+ }
110
114
  const name = request.params.name;
111
115
  if (this.claudeDirectoryProfile && (typeof name !== 'string' || !isClaudeDirectoryTool(name))) {
112
116
  // Omitted tools and legacy aliases reach the SDK unchanged and fail as
@@ -14,9 +14,14 @@ export interface Account {
14
14
  platform: string;
15
15
  username: string;
16
16
  account_type?: string;
17
+ /** Google Business numeric location id (platform_user_id). Absent on other platforms. */
18
+ location_id?: string | null;
17
19
  profile_picture_url?: string;
18
20
  workspace_id?: string | null;
19
21
  connection_mode?: 'meta' | 'instagram_direct' | null;
22
+ connection_status?: 'ok' | 'needs_reconnect';
23
+ connection_reason?: 'reconnect_required' | 'access_token_expired' | null;
24
+ connection_since?: string | null;
20
25
  instagram_tagging?: {
21
26
  media_user_tags?: {
22
27
  supported?: boolean;
@@ -144,6 +149,13 @@ export interface DismissSuggestionResponse {
144
149
  ok: boolean;
145
150
  status: string;
146
151
  }
152
+ export interface AcceptSuggestionResponse {
153
+ ok: boolean;
154
+ /** draft for a new save; the existing post's real status when already_saved (null if that post is gone). */
155
+ status: string | null;
156
+ post_id: number | null;
157
+ already_saved: boolean;
158
+ }
147
159
  export type ApiPostApprovalStatus = 'none' | 'pending_client' | 'approved' | 'changes_requested' | 'rejected';
148
160
  export interface ApiPostApproval {
149
161
  status: ApiPostApprovalStatus;
@@ -173,6 +185,15 @@ export interface Post {
173
185
  media_urls?: string[];
174
186
  status: string;
175
187
  post_type?: string;
188
+ platform?: string | string[] | null;
189
+ post_group_id?: string | null;
190
+ platform_post_id?: string | null;
191
+ failure?: {
192
+ message?: string | null;
193
+ code?: string | null;
194
+ platform?: string | null;
195
+ at?: string | null;
196
+ } | null;
176
197
  platform_post_url?: string;
177
198
  published_at?: string;
178
199
  workspace_id?: string | null;
@@ -187,6 +208,8 @@ export interface Post {
187
208
  /** Filters shared by GET /posts and GET /posts/counts. */
188
209
  export interface ListPostsParams {
189
210
  status?: string;
211
+ group_id?: string;
212
+ release_id?: string;
190
213
  platform?: string;
191
214
  account_id?: string;
192
215
  workspace_id?: string;
@@ -972,6 +995,12 @@ export interface AccountAnalyticsResponse {
972
995
  };
973
996
  summary: AccountAnalyticsSummary;
974
997
  snapshots: AccountAnalyticsSnapshot[];
998
+ extras?: {
999
+ enabled: boolean;
1000
+ demographics?: Array<Record<string, unknown>> | null;
1001
+ sync_status?: Record<string, unknown> | null;
1002
+ entity_snapshots?: Array<Record<string, unknown>> | null;
1003
+ };
975
1004
  }
976
1005
  export interface PostAnalyticsRow {
977
1006
  id: number | null;
@@ -1016,6 +1045,8 @@ export interface PostAnalyticsResponse {
1016
1045
  }
1017
1046
  export interface GoogleBusinessReview {
1018
1047
  name?: string;
1048
+ /** Same resource name as `name`, the value reply and delete_reply accept. */
1049
+ review_name?: string;
1019
1050
  reviewId?: string;
1020
1051
  reviewer?: {
1021
1052
  displayName?: string;
@@ -1096,6 +1127,8 @@ export interface InboxListParams {
1096
1127
  search?: string;
1097
1128
  limit?: number;
1098
1129
  offset?: number;
1130
+ since?: string;
1131
+ until?: string;
1099
1132
  }
1100
1133
  export interface InboxConversationsResponse {
1101
1134
  conversations: Array<Record<string, unknown>>;
@@ -1496,6 +1529,16 @@ export declare class PosterlyClient {
1496
1529
  startSignup(data: PublicSignupPayload): Promise<PublicSignupResponse>;
1497
1530
  getSignupSession(sessionId: string): Promise<PublicSignupSessionResponse>;
1498
1531
  whoami(): Promise<Whoami>;
1532
+ listApiKeys(): Promise<{
1533
+ api_keys: Array<{
1534
+ id: string;
1535
+ name: string;
1536
+ key_prefix: string;
1537
+ scopes: string[];
1538
+ created_at: string;
1539
+ last_used_at: string | null;
1540
+ }>;
1541
+ }>;
1499
1542
  createApiKey(data: CreateApiKeyPayload): Promise<CreateApiKeyResponse>;
1500
1543
  deleteApiKey(keyId: string, data: {
1501
1544
  confirm: true;
@@ -1574,6 +1617,7 @@ export declare class PosterlyClient {
1574
1617
  }): Promise<ExtraAccountsChangeResponse>;
1575
1618
  listAccounts(params?: {
1576
1619
  workspace_id?: string;
1620
+ connection?: 'ok' | 'needs_reconnect';
1577
1621
  }): Promise<Account[]>;
1578
1622
  disconnectAccount(accountId: string): Promise<Record<string, any>>;
1579
1623
  getConnectLink(params?: {
@@ -1634,6 +1678,26 @@ export declare class PosterlyClient {
1634
1678
  getBrand(id: string): Promise<{
1635
1679
  brand: Brand;
1636
1680
  }>;
1681
+ createBrand(data: {
1682
+ workspace_id?: string;
1683
+ name: string;
1684
+ timezone?: string;
1685
+ website_url?: string | null;
1686
+ confirm: true;
1687
+ }): Promise<{
1688
+ brand: Record<string, unknown>;
1689
+ }>;
1690
+ updateBrand(id: string, data: {
1691
+ name?: string;
1692
+ timezone?: string;
1693
+ website_url?: string | null;
1694
+ confirm: true;
1695
+ }): Promise<{
1696
+ brand: Record<string, unknown>;
1697
+ }>;
1698
+ archiveBrand(id: string, data: {
1699
+ confirm?: boolean;
1700
+ }): Promise<Record<string, unknown>>;
1637
1701
  listBrandAccounts(id: string): Promise<Account[]>;
1638
1702
  getBrandProfile(id: string): Promise<{
1639
1703
  brand_profile: BrandProfile;
@@ -1655,6 +1719,22 @@ export declare class PosterlyClient {
1655
1719
  offset?: number;
1656
1720
  }): Promise<PostSuggestionsResponse>;
1657
1721
  dismissSuggestion(id: string): Promise<DismissSuggestionResponse>;
1722
+ acceptSuggestion(id: string): Promise<AcceptSuggestionResponse>;
1723
+ getMediaAsset(id: string): Promise<{
1724
+ media: {
1725
+ id: string;
1726
+ filename: string;
1727
+ mime: string | null;
1728
+ bytes: number | null;
1729
+ created_at: string;
1730
+ };
1731
+ }>;
1732
+ deleteMediaAsset(id: string): Promise<{
1733
+ ok: boolean;
1734
+ deleted: boolean;
1735
+ id: string;
1736
+ filename: string;
1737
+ }>;
1658
1738
  listPosts(params?: ListPostsParams & {
1659
1739
  limit?: number;
1660
1740
  offset?: number;
@@ -1681,6 +1761,8 @@ export declare class PosterlyClient {
1681
1761
  media_url?: string;
1682
1762
  media_urls?: string[];
1683
1763
  post_type?: string;
1764
+ account_id?: string;
1765
+ thread_posts?: string[];
1684
1766
  metadata?: Record<string, unknown>;
1685
1767
  settings?: PlatformPostSettings;
1686
1768
  reel_cover_url?: string | null;
@@ -1797,6 +1879,7 @@ export declare class PosterlyClient {
1797
1879
  account_id: number;
1798
1880
  from?: string;
1799
1881
  to?: string;
1882
+ include_extras?: boolean;
1800
1883
  }): Promise<AccountAnalyticsResponse>;
1801
1884
  getPostAnalytics(params: {
1802
1885
  account_id: number;
@@ -1848,6 +1931,34 @@ export declare class PosterlyClient {
1848
1931
  location_id?: string;
1849
1932
  review_name: string;
1850
1933
  }): Promise<Record<string, any>>;
1934
+ getGoogleBusinessServiceArea(params: {
1935
+ workspace_id?: string;
1936
+ account_id?: number;
1937
+ location_id?: string;
1938
+ }): Promise<Record<string, any>>;
1939
+ searchGoogleBusinessServiceAreaPlaces(params: {
1940
+ workspace_id?: string;
1941
+ q: string;
1942
+ region_code?: string;
1943
+ }): Promise<{
1944
+ query: string;
1945
+ places: Array<{
1946
+ place_id: string;
1947
+ place_name: string;
1948
+ }>;
1949
+ }>;
1950
+ updateGoogleBusinessServiceArea(data: {
1951
+ workspace_id?: string;
1952
+ account_id?: number;
1953
+ location_id?: string;
1954
+ business_type: string;
1955
+ region_code?: string | null;
1956
+ places: Array<{
1957
+ place_id: string;
1958
+ place_name: string;
1959
+ }>;
1960
+ clear_storefront_address?: boolean;
1961
+ }): Promise<Record<string, any>>;
1851
1962
  listGoogleBusinessMedia(params?: {
1852
1963
  workspace_id?: string;
1853
1964
  account_id?: number;
@@ -1867,6 +1978,13 @@ export declare class PosterlyClient {
1867
1978
  location_id?: string;
1868
1979
  media_name: string;
1869
1980
  }): Promise<Record<string, any>>;
1981
+ listGoogleBusinessLocation(params?: {
1982
+ workspace_id?: string;
1983
+ account_id?: number;
1984
+ location_id?: string;
1985
+ }): Promise<Record<string, any>>;
1986
+ updateGoogleBusinessHours(data: Record<string, any>): Promise<Record<string, any>>;
1987
+ updateGoogleBusinessAttributes(data: Record<string, any>): Promise<Record<string, any>>;
1870
1988
  listActivity(params?: {
1871
1989
  workspace_id?: string;
1872
1990
  post_id?: number;
@@ -1886,6 +2004,10 @@ export declare class PosterlyClient {
1886
2004
  }): Promise<{
1887
2005
  webhooks: ApiWebhook[];
1888
2006
  }>;
2007
+ listWebhookDeliveries(webhookId: string, params?: {
2008
+ limit?: number;
2009
+ offset?: number;
2010
+ }): Promise<Record<string, any>>;
1889
2011
  createWebhook(data: {
1890
2012
  url: string;
1891
2013
  events?: string[];
@@ -1932,6 +2054,36 @@ export declare class PosterlyClient {
1932
2054
  account: Record<string, unknown> | null;
1933
2055
  result: unknown;
1934
2056
  }>;
2057
+ quoteXPostingAddon(data: {
2058
+ plan_code?: string;
2059
+ workspace_id?: string;
2060
+ }): Promise<{
2061
+ dry_run: true;
2062
+ charged: false;
2063
+ quote: {
2064
+ mode?: string;
2065
+ plan_code?: string | null;
2066
+ plan_name?: string | null;
2067
+ monthly_posts?: number | null;
2068
+ price_usd?: number | null;
2069
+ current_addon_status?: string;
2070
+ current_plan_code?: string | null;
2071
+ effect?: string;
2072
+ };
2073
+ }>;
2074
+ buyXPostingAddon(data: {
2075
+ confirm: true;
2076
+ plan_code?: string;
2077
+ workspace_id?: string;
2078
+ expected_addon_status: string;
2079
+ expected_plan_code: string | null;
2080
+ expected_price_usd: number | null;
2081
+ }): Promise<{
2082
+ charged: false;
2083
+ mode?: string;
2084
+ url?: string;
2085
+ effect?: string;
2086
+ }>;
1935
2087
  getXPostingQuota(params?: {
1936
2088
  workspace_id?: string;
1937
2089
  }): Promise<XPostingQuotaResponse>;