hollerpost-mcp 0.2.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,6 +1,33 @@
1
1
  # Changelog
2
2
 
3
- ## 0.2.1 (unreleased)
3
+ ## 0.3.0 (2026-11-04)
4
+
5
+ New tools for Your page, calendar events and social posts. Not yet on npm or
6
+ mcp.hollerpost.com at the time of writing.
7
+
8
+ - Your page: `page_get`, `page_update`, `page_link_add`, `page_link_update`,
9
+ `page_link_remove`, `page_links_reorder`. Arrays in updates replace the
10
+ existing ones; the API enforces HTTPS links, contrast and the Free badge.
11
+ - Calendar events: `event_list`, `event_create`, `event_update`,
12
+ `event_cancel` (on `/api/v1/page/events`; `events_recent` is still
13
+ delivery activity).
14
+ - Publishing needs explicit approval: `page_update` with `published: true`,
15
+ and `event_create` / `event_update` that publish, require
16
+ `confirm_publish: true`. `page_link_remove` and `event_cancel` require
17
+ `confirm: true`.
18
+ - Social posts (beta): 17 tools for channels (connect by a one-time link, so
19
+ no password or token passes through the assistant), media upload, post
20
+ draft, AI draft from a brief or an email, preview, schedule, cancel, queue,
21
+ delivery status and usage. They register only when the key holds a social
22
+ scope; `social_post_schedule` needs `preview_revision` and `confirm: true`.
23
+ - Connector requests never follow redirects; media import follows at most 3
24
+ and re-checks each hop. API error wording matches the codes the API returns.
25
+ - The remote server sends `Strict-Transport-Security` on https responses.
26
+ - README: Claude connector setup uses the URL with the key in it (the
27
+ dashboard shows it ready to copy when you create a key); page and event
28
+ tool docs.
29
+
30
+ ## 0.2.1 (2026-10-28)
4
31
 
5
32
  Security hardening before launch. No new tools.
6
33
 
package/README.md CHANGED
@@ -31,7 +31,7 @@ Needs Node.js 20 or newer.
31
31
 
32
32
  ### Claude.ai and Claude Desktop connectors (remote)
33
33
 
34
- Settings, Connectors, Add custom connector. Connectors cannot send a custom header yet, so put the key in the URL:
34
+ Settings, Connectors, Add custom connector. Use the URL with the key in it and leave authentication and request headers empty. The URL is the setup tested end to end with Claude connectors (2026-11-02). The dashboard shows this URL, ready to copy, when you create a key:
35
35
 
36
36
  ```
37
37
  https://mcp.hollerpost.com/mcp?key=hp_live_your_key_here
@@ -138,6 +138,25 @@ If a tool needs a scope the key lacks, the tool answers `insufficient_scope`, na
138
138
  | `survey_create` | draft | Create a draft survey (1 to 30 questions) |
139
139
  | `survey_update` | draft | Edit a survey, or open or close it |
140
140
  | `billing_portal_link` | account | A short-lived Stripe portal link for the person to open |
141
+ | `page_get` | read | Read Your page, links, calendar events and plan settings |
142
+ | `page_update` | draft | Save page fields via `updates`; publishing changes the public page immediately and needs `confirm_publish: true` after the person approves |
143
+ | `page_link_add` | draft | Add a HTTPS link via `link` (max 30) |
144
+ | `page_link_update` | draft | Update a link by `id` and `updates` |
145
+ | `page_link_remove` | draft | Permanently remove a link (`confirm: true`) |
146
+ | `page_links_reorder` | draft | Supply all link `ids` exactly once in display order |
147
+ | `event_list` | read | List calendar events, upcoming and past 90 days |
148
+ | `event_create` | draft | Create an `event`, draft by default; creating it as published needs `confirm_publish: true` |
149
+ | `event_update` | draft | Update an event by `id` and `updates` |
150
+ | `event_cancel` | draft | Cancel and retain an event (`confirm: true`) |
151
+
152
+ Your page tools use `/api/v1/page` and `/api/v1/page/links`. Calendar events
153
+ use `/api/v1/page/events`; `/api/v1/events` remains delivery activity for
154
+ `events_recent`. Tenant API keys require `mcp_enabled` and read/draft scopes.
155
+ The API enforces workspace ownership, URL safety, contrast, badge and date
156
+ rules shared with the dashboard. `page_get` returns an unsaved brand draft
157
+ when no page exists. Claim a handle in the dashboard before publishing.
158
+ Arrays in page updates replace the existing arrays. The two removal/cancel
159
+ tools have `destructiveHint: true`; page/event reads have `readOnlyHint: true`.
141
160
 
142
161
  Resources (context a client can attach without a tool call): `hollerpost://brand`, `hollerpost://templates`, `hollerpost://quota`, `hollerpost://domains`.
143
162
 
@@ -153,7 +172,7 @@ These are built into the server and the API, not left to the agent:
153
172
  - **First campaign review.** A new workspace's first campaign is held for a one-time human review by the Hollerpost team. `campaign_schedule` then reports `review_pending`, says plainly that nothing was sent, and tells the agent not to retry.
154
173
  - **Consent.** Contacts can only be added with `consent: true`, and addresses that unsubscribed, bounced or complained can never be re-added.
155
174
  - **No money moves.** No tool changes a plan, buys a send pack or touches a card. `billing_portal_link` hands back a URL for you to open in your browser. This is a permanent rule.
156
- - **Almost nothing destructive.** There is no contact delete, campaign delete or webhook delete. The only destructive tool is `domain_remove` (needs `confirm: true`, refused while a campaign is scheduled on the domain). `campaign_cancel` is the undo for a scheduled send.
175
+ - **Almost nothing destructive.** There is no contact delete, campaign delete or webhook delete. `domain_remove`, `page_link_remove` and `event_cancel` require `confirm: true`; domain removal is refused while a campaign is scheduled on the domain. `campaign_cancel` is the undo for a scheduled send.
157
176
  - **Quota.** A send larger than the remaining monthly quota is refused with `quota_exceeded`, with a link where you can buy a send pack yourself.
158
177
  - **Your key stays yours.** The remote server forwards your `Authorization` header to the API on each request and stores nothing. Keys are never echoed in tool output and never logged; anything shaped like a key is redacted from output even if the API were to return it.
159
178
 
@@ -219,7 +238,7 @@ Add `HOLLERPOST_MCP_URL=https://mcp.hollerpost.com/mcp` to go through the deploy
219
238
  ## Layout
220
239
 
221
240
  ```
222
- src/tools.ts the 29 tools: schemas, descriptions, handlers (transport agnostic)
241
+ src/tools.ts the 39 core tools: schemas, descriptions, handlers (transport agnostic)
223
242
  src/client.ts fetch wrapper: auth passthrough, 429 retry, User-Agent, key redaction
224
243
  src/format.ts tool results, 50-row truncation, API error messages
225
244
  src/resources.ts hollerpost://brand, templates, quota, domains
package/dist/client.d.ts CHANGED
@@ -13,6 +13,8 @@ export interface ClientOptions {
13
13
  fetch?: FetchLike;
14
14
  /** Injected for tests. */
15
15
  sleep?: (ms: number) => Promise<void>;
16
+ /** Optional active scopes allowed for this client. */
17
+ scopes?: string[];
16
18
  }
17
19
  export interface RequestOptions {
18
20
  query?: Record<string, string | number | boolean | undefined | null>;
@@ -28,19 +30,27 @@ export declare class ApiError extends Error {
28
30
  readonly local: boolean;
29
31
  constructor(status: number, code: string, body?: Record<string, unknown>, local?: boolean);
30
32
  }
31
- /** Replace anything that looks like a Hollerpost key with a fixed marker. */
32
- export declare function redactString(text: string, secrets?: string[]): string;
33
+ /** Replace anything that looks like a Hollerpost key or OAuth credential with a fixed marker. */
34
+ export declare function redactSecrets(text: string, secrets?: string[]): string;
35
+ export declare const redactString: typeof redactSecrets;
33
36
  /** Deep copy of a JSON value with every string passed through redactString. */
34
37
  export declare function redactDeep<T>(value: T, secrets?: string[]): T;
35
38
  /** Parse Retry-After (delta seconds or HTTP date) into milliseconds. */
36
39
  export declare function parseRetryAfter(header: string | null, now?: number): number | null;
37
40
  export declare class HollerpostClient {
38
41
  readonly transport: TransportKind;
42
+ readonly scopes?: string[];
39
43
  private readonly authorization;
40
44
  private readonly baseUrl;
41
45
  private readonly fetchImpl;
42
46
  private readonly sleep;
43
47
  constructor(opts: ClientOptions);
48
+ /**
49
+ * The scopes this key holds (from /me), or [] when that can't be read
50
+ * (no key, a network error). Used only to decide which optional tools to
51
+ * offer; the API enforces scopes on every call either way.
52
+ */
53
+ keyScopes(): Promise<string[]>;
44
54
  get userAgent(): string;
45
55
  /** Strings that must never appear in output: the raw key and the header. */
46
56
  get secrets(): string[];
package/dist/client.js CHANGED
@@ -32,15 +32,24 @@ export class ApiError extends Error {
32
32
  }
33
33
  }
34
34
  const KEY_PATTERN = /\b(hp|uc)_(live|test)_[A-Za-z0-9_\-]+/g;
35
- /** Replace anything that looks like a Hollerpost key with a fixed marker. */
36
- export function redactString(text, secrets = []) {
37
- let out = text.replace(KEY_PATTERN, '[redacted key]');
35
+ const BEARER_PATTERN = /\bBearer\s+[A-Za-z0-9._\-~+/]+=*/gi;
36
+ const SENSITIVE_JSON_KEY_PATTERN = /"(access_token|refresh_token|client_secret|app_password)"\s*:\s*"[^"]+"/gi;
37
+ const SENSITIVE_PARAM_PATTERN = /\b(access_token|refresh_token|client_secret|app_password)=(\[redacted secret\]|[^\s&"']+)/gi;
38
+ const SENSITIVE_KEY_NAMES = new Set(['access_token', 'refresh_token', 'client_secret', 'app_password']);
39
+ /** Replace anything that looks like a Hollerpost key or OAuth credential with a fixed marker. */
40
+ export function redactSecrets(text, secrets = []) {
41
+ let out = text
42
+ .replace(KEY_PATTERN, '[redacted key]')
43
+ .replace(BEARER_PATTERN, 'Bearer [redacted token]')
44
+ .replace(SENSITIVE_JSON_KEY_PATTERN, '"$1": "[redacted secret]"')
45
+ .replace(SENSITIVE_PARAM_PATTERN, '$1=[redacted secret]');
38
46
  for (const s of secrets) {
39
47
  if (s && s.length >= 6)
40
48
  out = out.split(s).join('[redacted key]');
41
49
  }
42
50
  return out;
43
51
  }
52
+ export const redactString = redactSecrets;
44
53
  /** Deep copy of a JSON value with every string passed through redactString. */
45
54
  export function redactDeep(value, secrets = []) {
46
55
  if (typeof value === 'string')
@@ -50,7 +59,12 @@ export function redactDeep(value, secrets = []) {
50
59
  if (value && typeof value === 'object') {
51
60
  const out = {};
52
61
  for (const [k, v] of Object.entries(value)) {
53
- out[k] = redactDeep(v, secrets);
62
+ if (typeof v === 'string' && SENSITIVE_KEY_NAMES.has(k.toLowerCase())) {
63
+ out[k] = '[redacted secret]';
64
+ }
65
+ else {
66
+ out[k] = redactDeep(v, secrets);
67
+ }
54
68
  }
55
69
  return out;
56
70
  }
@@ -71,17 +85,35 @@ export function parseRetryAfter(header, now = Date.now()) {
71
85
  const defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
72
86
  export class HollerpostClient {
73
87
  transport;
88
+ scopes;
74
89
  authorization;
75
90
  baseUrl;
76
91
  fetchImpl;
77
92
  sleep;
78
93
  constructor(opts) {
79
94
  this.transport = opts.transport;
95
+ this.scopes = opts.scopes;
80
96
  this.authorization = opts.authorization?.trim() || null;
81
97
  this.baseUrl = (opts.baseUrl || DEFAULT_API_BASE).replace(/\/+$/, '');
82
98
  this.fetchImpl = opts.fetch ?? ((input, init) => fetch(input, init));
83
99
  this.sleep = opts.sleep ?? defaultSleep;
84
100
  }
101
+ /**
102
+ * The scopes this key holds (from /me), or [] when that can't be read
103
+ * (no key, a network error). Used only to decide which optional tools to
104
+ * offer; the API enforces scopes on every call either way.
105
+ */
106
+ async keyScopes() {
107
+ if (!this.authorization)
108
+ return [];
109
+ try {
110
+ const me = (await this.request('GET', '/me'));
111
+ return Array.isArray(me?.scopes) ? me.scopes.filter((s) => typeof s === 'string') : [];
112
+ }
113
+ catch {
114
+ return [];
115
+ }
116
+ }
85
117
  get userAgent() {
86
118
  return `hollerpost-mcp/${VERSION} (${this.transport})`;
87
119
  }
package/dist/format.js CHANGED
@@ -146,6 +146,33 @@ export function describeApiError(err) {
146
146
  return `${head} api.hollerpost.com did not answer within ${Math.round(REQUEST_TIMEOUT_MS / 1000)} seconds. The request may or may not have completed; check with the matching list tool before retrying a write.`;
147
147
  case 'tenant_key_required':
148
148
  return `${head} This is a platform key. The MCP server needs a workspace key (hp_live_... or uc_live_...).`;
149
+ case 'social_coming_soon':
150
+ return `${head} Hollerpost Social isn't switched on for this workspace yet.`;
151
+ case 'provider_not_available':
152
+ return `${head} That network can't be connected yet. social_capabilities_list shows the ones that can.`;
153
+ case 'channel_limit':
154
+ return `${head} This workspace has connected the most channels its plan allows${b.limit !== undefined ? ` (${num(b.limit)})` : ''}. Disconnect one, or the person can upgrade with billing_portal_link.`;
155
+ case 'publication_limit':
156
+ return `${head} Nothing was scheduled: this period's publications are used up${b.limit !== undefined ? ` (${num(b.limit)})` : ''}. Each channel a post goes to counts as one. See social_usage_get.`;
157
+ case 'channel_pending_limit':
158
+ case 'workspace_pending_limit':
159
+ return `${head} Nothing was scheduled: too many posts are already waiting to go out${b.limit !== undefined ? ` (limit ${num(b.limit)})` : ''}. Wait for some to publish or cancel one.`;
160
+ case 'draft_limit':
161
+ return `${head} This workspace has the most drafts its plan allows. Schedule or delete some first.`;
162
+ case 'storage_limit':
163
+ case 'monthly_upload_limit':
164
+ return `${head} This workspace's media ${err.code === 'storage_limit' ? 'storage' : 'uploads for this period'} are used up. See social_usage_get.`;
165
+ case 'media_too_large':
166
+ case 'unsupported_media':
167
+ return `${head} ${typeof b.message === 'string' ? b.message : 'That file can\'t be used.'}`;
168
+ case 'preview_revision_mismatch':
169
+ return `${head} The post or its channels changed after that preview. Run social_post_preview again, show the person, and use the new preview_revision.`;
170
+ case 'post_not_draft':
171
+ return `${head} Only drafts can be changed or scheduled${typeof b.status === 'string' ? `; this post is ${b.status}` : ''}. Cancel it first to edit it.`;
172
+ case 'beyond_scheduling_horizon':
173
+ return `${head} That time is further ahead than this plan can schedule${b.limit_days ? ` (${num(b.limit_days)} days)` : ''}.`;
174
+ case 'not_available_yet':
175
+ return `${head} That part of Hollerpost Social comes in a later beta release.`;
149
176
  default: {
150
177
  const extra = { ...b };
151
178
  delete extra.error;
package/dist/server.d.ts CHANGED
@@ -2,6 +2,6 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import type { ServerOptions } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { HollerpostClient, type ClientOptions } from './client.js';
4
4
  export declare const SERVER_INSTRUCTIONS: string;
5
- export declare function createServer(client: HollerpostClient, options?: Pick<ServerOptions, 'jsonSchemaValidator'>): McpServer;
5
+ export declare function createServer(client: HollerpostClient, options?: Pick<ServerOptions, 'jsonSchemaValidator'>, scopes?: string[] | null): McpServer;
6
6
  export { HollerpostClient };
7
7
  export type { ClientOptions };
package/dist/server.js CHANGED
@@ -14,11 +14,14 @@ export const SERVER_INSTRUCTIONS = [
14
14
  'A workspace first campaign is held for a one-time human review (review_pending): it is not sent yet, do not retry.',
15
15
  'Surveys: survey_create makes a draft survey; campaign_draft can ask one of its rating, nps or single-choice questions in the email; open the survey with survey_update before testing or scheduling; read answers with survey_results.',
16
16
  'Only add contacts who agreed to receive email. No tool can change billing; billing_portal_link gives the person a link.',
17
+ 'Social posts (beta, only when this key has social scopes): the person connects an account by opening the link from social_channel_connect, never by giving you a password. Draft, run social_post_preview, show the person each network\'s text, and only after their yes call social_post_schedule with that preview_revision and confirm: true.',
17
18
  UNTRUSTED_DATA_NOTICE,
18
19
  ].join(' ');
19
- export function createServer(client, options = {}) {
20
+ // scopes: the key's scopes (client.keyScopes()), which decide whether the
21
+ // social tools are offered.
22
+ export function createServer(client, options = {}, scopes = null) {
20
23
  const server = new McpServer({ name: 'hollerpost-mcp', title: 'Hollerpost', version: VERSION, websiteUrl: 'https://hollerpost.com/docs/mcp/' }, { instructions: SERVER_INSTRUCTIONS, ...options });
21
- registerTools(server, client);
24
+ registerTools(server, client, { scopes });
22
25
  registerResources(server, client);
23
26
  registerPrompts(server);
24
27
  return server;
package/dist/stdio.js CHANGED
@@ -16,7 +16,7 @@ async function main() {
16
16
  transport: 'stdio',
17
17
  baseUrl: process.env.HOLLERPOST_API_BASE || DEFAULT_API_BASE,
18
18
  });
19
- const server = createServer(client);
19
+ const server = createServer(client, {}, await client.keyScopes());
20
20
  await server.connect(new StdioServerTransport());
21
21
  process.stderr.write(`hollerpost-mcp ${VERSION} ready on stdio\n`);
22
22
  }
package/dist/tools.d.ts CHANGED
@@ -2,7 +2,9 @@ import { z } from 'zod';
2
2
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
3
  import type { CallToolResult, ToolAnnotations } from '@modelcontextprotocol/sdk/types.js';
4
4
  import { type HollerpostClient } from './client.js';
5
- export type Scope = 'read' | 'contacts' | 'draft' | 'send' | 'webhooks' | 'account';
5
+ export type Scope = 'read' | 'contacts' | 'draft' | 'send' | 'webhooks' | 'account' | 'social_read' | 'social_connect' | 'social_draft' | 'social_publish' | 'social_reply';
6
+ export declare const DEFAULT_ASSUMED_SCOPES: Scope[];
7
+ export declare const ALL_SCOPES: Scope[];
6
8
  export interface ToolOutcome {
7
9
  /** One or two plain sentences that lead the text content. */
8
10
  lead: string;
@@ -33,7 +35,12 @@ export declare const ANSWER_TEXT_LIMIT = 2000;
33
35
  */
34
36
  export declare function clipWrittenAnswers(data: unknown): unknown;
35
37
  export declare const TOOLS: ToolDef[];
38
+ export declare const CORE_TOOL_NAMES: string[];
36
39
  export declare const TOOL_NAMES: string[];
40
+ export declare const ALL_TOOL_NAMES: string[];
41
+ export declare const SOCIAL_TOOL_NAMES: string[];
37
42
  /** Run one tool and turn its outcome (or failure) into an MCP result. */
38
43
  export declare function runTool(def: ToolDef, api: HollerpostClient, args: unknown): Promise<CallToolResult>;
39
- export declare function registerTools(server: McpServer, api: HollerpostClient): void;
44
+ export declare function registerTools(server: McpServer, api: HollerpostClient, options?: {
45
+ scopes?: string[] | null;
46
+ }): void;
package/dist/tools.js CHANGED
@@ -5,13 +5,27 @@
5
5
  // adds schemas, careful descriptions and readable results on top.
6
6
  //
7
7
  // Safety rules baked in here (plan 4.4):
8
- // - No destructive tools except domain_remove, which needs confirm: true.
8
+ // - Destructive removals/cancellations require confirm: true.
9
9
  // - No tool moves money. billing_portal_link only hands back a URL.
10
10
  // - consent and confirm fields are z.literal(true): the call cannot even be
11
11
  // formed without them.
12
12
  import { z } from 'zod';
13
13
  import { ApiError } from './client.js';
14
14
  import { errorResult, InputError, okResult } from './format.js';
15
+ export const DEFAULT_ASSUMED_SCOPES = ['read', 'contacts', 'draft', 'send', 'webhooks', 'account'];
16
+ export const ALL_SCOPES = [
17
+ 'read',
18
+ 'contacts',
19
+ 'draft',
20
+ 'send',
21
+ 'webhooks',
22
+ 'account',
23
+ 'social_read',
24
+ 'social_connect',
25
+ 'social_draft',
26
+ 'social_publish',
27
+ 'social_reply',
28
+ ];
15
29
  function defineTool(def) {
16
30
  return def;
17
31
  }
@@ -20,11 +34,15 @@ const READ = { readOnlyHint: true, destructiveHint: false, idempotentHint: true,
20
34
  const WRITE_SAFE = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
21
35
  const WRITE_IDEMPOTENT = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
22
36
  const SENDS_MAIL = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true };
37
+ const SOCIAL_PUBLISH = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true };
23
38
  // ---------------------------------------------------------------------------
24
39
  // Shared schema pieces
25
40
  // Ids are UUIDs (the API's UUID_RE); anything else is refused before any
26
41
  // request goes out.
27
42
  const campaignId = z.string().uuid().describe('Campaign id (a UUID), as returned by campaign_draft or campaigns_list.');
43
+ const postId = z.string().uuid().describe('Social post id (a UUID), as returned by social_post_draft.');
44
+ const mediaId = z.string().uuid().describe('Social media item id (a UUID), as returned by social_media_upload.');
45
+ const deliveryId = z.string().uuid().describe('Social delivery id (a UUID).');
28
46
  const domainName = z
29
47
  .string()
30
48
  .min(3)
@@ -171,7 +189,48 @@ function verifyLines(domain) {
171
189
  }
172
190
  // ---------------------------------------------------------------------------
173
191
  // The 29 tools
192
+ const pageLinkSchema = z.object({
193
+ label: z.string().min(1).max(80), url: z.string().max(2048),
194
+ thumbnail_url: z.union([z.string().max(2048), z.null()]).optional(), starts_at: z.union([z.string().max(2048), z.null()]).optional(),
195
+ ends_at: z.union([z.string().max(2048), z.null()]).optional(), enabled: z.boolean().optional(), position: z.number().int().min(0).max(29).optional(),
196
+ });
197
+ const pageEventSchema = z.object({
198
+ title: z.string().min(1).max(120), starts_at: z.string(), timezone: z.string(),
199
+ description: z.union([z.string().max(2000), z.null()]).optional(), ends_at: z.union([z.string().max(2048), z.null()]).optional(),
200
+ venue_name: z.union([z.string().max(2048), z.null()]).optional(), address: z.union([z.string().max(2048), z.null()]).optional(),
201
+ online_url: z.union([z.string().max(2048), z.null()]).optional(), ticket_url: z.union([z.string().max(2048), z.null()]).optional(), image_url: z.union([z.string().max(2048), z.null()]).optional(),
202
+ status: z.enum(['draft', 'published', 'canceled']).optional(), show_on_page: z.boolean().optional(),
203
+ });
204
+ const pageUpdateSchema = z.object({
205
+ title: z.string().max(120).optional(), tagline: z.string().max(240).optional(), avatar_url: z.union([z.string().max(2048), z.null()]).optional(),
206
+ theme: z.object({ brandColor: z.string().optional(), backgroundColor: z.string().optional(), textColor: z.string().optional(), buttonTextColor: z.string().optional(), fontFamily: z.string().optional(), buttonRadius: z.number().int().min(0).max(40).optional() }).optional(),
207
+ show_badge: z.boolean().optional(), signup_form_id: z.string().uuid().nullable().optional(),
208
+ socials: z.array(z.object({ network: z.enum(['instagram', 'tiktok', 'facebook', 'youtube', 'x', 'threads', 'bluesky', 'linkedin', 'pinterest', 'snapchat', 'twitch', 'discord', 'whatsapp', 'spotify', 'website']), url: z.string() })).max(15).optional(),
209
+ info: z.object({ website: z.union([z.string().max(2048), z.null()]).optional(), phone: z.string().optional(), email: z.string().optional(), address_mode: z.enum(['none', 'city', 'full']).optional(), hours: z.string().optional() }).optional(),
210
+ show_events: z.boolean().optional(), published: z.boolean().optional(),
211
+ });
212
+ const PAGE_DESTRUCTIVE = { ...WRITE_IDEMPOTENT, destructiveHint: true };
174
213
  export const TOOLS = [
214
+ defineTool({ name: 'page_get', title: 'Get Your page', scope: 'read', description: 'Read Your page, links, events, handle and plan settings. An unsaved draft from the brand kit is returned if no page exists.', input: {}, annotations: READ, untrusted: true,
215
+ run: async (api) => ({ lead: 'Your page and workspace settings.', data: await api.request('GET', '/page') }) }),
216
+ defineTool({ name: 'page_update', title: 'Update Your page', scope: 'draft', description: 'Update Your page fields. Arrays replace existing values. Publishing (published: true) changes the public page immediately: ask the person first and pass confirm_publish: true. Requires a claimed handle; Free must show the badge. HTTPS destinations and contrast are enforced by the API.', input: { updates: pageUpdateSchema, confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
217
+ run: async (api, { updates, confirm_publish }) => ({ lead: 'Your page updated.', data: await api.request('PATCH', '/page', { body: updates, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
218
+ defineTool({ name: 'page_link_add', title: 'Add page link', scope: 'draft', description: 'Add a HTTPS link to Your page (maximum 30). Known URL shorteners are refused. Visible immediately on published pages unless disabled or scheduled.', input: { link: pageLinkSchema }, annotations: WRITE_SAFE, untrusted: true,
219
+ run: async (api, { link }) => ({ lead: 'Page link added.', data: await api.request('POST', '/page/links', { body: link }) }) }),
220
+ defineTool({ name: 'page_link_update', title: 'Update page link', scope: 'draft', description: 'Update a workspace page link by ID. Omitted fields stay unchanged.', input: { id: z.string().uuid(), updates: pageLinkSchema.partial() }, annotations: WRITE_IDEMPOTENT, untrusted: true,
221
+ run: async (api, { id, updates }) => ({ lead: 'Page link updated.', data: await api.request('PATCH', `/page/links/${seg(id)}`, { body: updates }) }) }),
222
+ defineTool({ name: 'page_link_remove', title: 'Remove page link', scope: 'draft', description: 'Permanently remove a page link. Ask for confirmation before calling; requires confirm: true.', input: { id: z.string().uuid(), confirm: z.literal(true) }, annotations: PAGE_DESTRUCTIVE,
223
+ run: async (api, { id }) => ({ lead: 'Page link removed.', data: await api.request('DELETE', `/page/links/${seg(id)}`) }) }),
224
+ defineTool({ name: 'page_links_reorder', title: 'Reorder page links', scope: 'draft', description: 'Replace link ordering. Include every workspace link ID exactly once.', input: { ids: z.array(z.string().uuid()).max(30) }, annotations: WRITE_IDEMPOTENT,
225
+ run: async (api, { ids }) => ({ lead: 'Page links reordered.', data: await api.request('PUT', '/page/links/order', { body: { ids } }) }) }),
226
+ defineTool({ name: 'event_list', title: 'List calendar events', scope: 'read', description: 'List workspace calendar events, including upcoming and the past 90 days. These are calendar events, not email delivery events.', input: {}, annotations: READ, untrusted: true,
227
+ run: async (api) => ({ lead: 'Workspace calendar events.', data: await api.request('GET', '/page/events') }) }),
228
+ defineTool({ name: 'event_create', title: 'Create calendar event', scope: 'draft', description: 'Create a calendar event. Defaults to draft. Status published shows it on Your page right away: ask the person first and pass confirm_publish: true. Use an IANA timezone and ISO dates with offsets.', input: { event: pageEventSchema, confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_SAFE, untrusted: true,
229
+ run: async (api, { event, confirm_publish }) => ({ lead: 'Calendar event created.', data: await api.request('POST', '/page/events', { body: event, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
230
+ defineTool({ name: 'event_update', title: 'Update calendar event', scope: 'draft', description: 'Update a calendar event by ID. Fields omitted are unchanged. Changes to a published event affect Your page. Setting status published needs the person\'s approval and confirm_publish: true.', input: { id: z.string().uuid(), updates: pageEventSchema.omit({ status: true }).extend({ status: z.enum(['draft', 'published']).optional() }).partial(), confirm_publish: z.literal(true).optional().describe('true only after the person explicitly approved publishing; required whenever this call publishes.') }, annotations: WRITE_IDEMPOTENT, untrusted: true,
231
+ run: async (api, { id, updates, confirm_publish }) => ({ lead: 'Calendar event updated.', data: await api.request('PATCH', `/page/events/${seg(id)}`, { body: updates, ...(confirm_publish ? { headers: { 'X-Hollerpost-Confirm': 'publish' } } : {}) }) }) }),
232
+ defineTool({ name: 'event_cancel', title: 'Cancel calendar event', scope: 'draft', description: 'Cancel an event and remove it from the public page, retaining its record. Ask for confirmation before calling; requires confirm: true.', input: { id: z.string().uuid(), confirm: z.literal(true) }, annotations: PAGE_DESTRUCTIVE, untrusted: true,
233
+ run: async (api, { id }) => ({ lead: 'Calendar event canceled.', data: await api.request('PATCH', `/page/events/${seg(id)}`, { body: { status: 'canceled' } }) }) }),
175
234
  defineTool({
176
235
  name: 'workspace_info',
177
236
  title: 'Workspace info',
@@ -725,8 +784,307 @@ export const TOOLS = [
725
784
  return { lead: `Billing portal link for the person to open: ${get(data, 'url') ?? 'unavailable'}`, data };
726
785
  },
727
786
  }),
787
+ // ---------------------------------------------------------------------------
788
+ // Hollerpost Social (beta). Registered only for keys that hold a social_*
789
+ // scope. Publishing follows the campaign rule: draft, preview, the person
790
+ // approves, then schedule with the preview_revision and confirm: true.
791
+ defineTool({
792
+ name: 'social_capabilities_list',
793
+ title: 'Social networks',
794
+ scope: 'social_read',
795
+ description: 'Lists the social networks this workspace can connect right now, what each takes (characters, images, video), and the networks that are planned but not available yet. Also returns the plan tier and its allowances. Read only.',
796
+ input: {},
797
+ annotations: READ,
798
+ run: async (api) => {
799
+ const data = await api.request('GET', '/social/capabilities');
800
+ const nets = get(data, 'networks') || [];
801
+ const on = nets.filter((n) => n.available).map((n) => n.name || n.provider);
802
+ return { lead: on.length ? `Available now: ${on.join(', ')}.` : 'No social networks are available for this workspace yet.', data };
803
+ },
804
+ }),
805
+ defineTool({
806
+ name: 'social_channels_list',
807
+ title: 'Social channels',
808
+ scope: 'social_read',
809
+ description: 'Lists the connected social channels (accounts, channels, webhooks) with their status. A channel in reconnect_required needs social_channel_connect again. Read only.',
810
+ input: {
811
+ provider: z.string().max(40).optional().describe('Only this network, for example bluesky.'),
812
+ },
813
+ annotations: READ,
814
+ untrusted: true,
815
+ run: async (api, { provider }) => {
816
+ const data = await api.request('GET', '/social/channels', { query: { provider } });
817
+ const n = (get(data, 'channels') || []).length;
818
+ return { lead: `${n} connected channel${n === 1 ? '' : 's'}.`, data };
819
+ },
820
+ }),
821
+ defineTool({
822
+ name: 'social_channel_connect',
823
+ title: 'Connect a social channel',
824
+ scope: 'social_connect',
825
+ description: 'Returns a one-time Hollerpost link (valid 30 minutes) where the person enters the account details themselves, for example a Bluesky app password or a Mastodon access token. Give the link to the person; never ask them to paste a password or token into the chat. Call social_capabilities_list first for the available networks.',
826
+ input: {
827
+ provider: z.string().min(1).max(40).describe('Network id from social_capabilities_list, for example bluesky, mastodon, telegram or discord.'),
828
+ },
829
+ annotations: WRITE_SAFE,
830
+ run: async (api, { provider }) => {
831
+ const data = await api.request('POST', '/social/channels/connect', { body: { provider } });
832
+ return { lead: `Give the person this link to connect ${provider}: ${get(data, 'connect_url') ?? 'unavailable'} (expires in 30 minutes, works once).`, data };
833
+ },
834
+ }),
835
+ defineTool({
836
+ name: 'social_channel_disconnect',
837
+ title: 'Disconnect a social channel',
838
+ scope: 'social_connect',
839
+ description: 'Disconnects a channel: its stored credential is deleted and its scheduled posts that have not started are canceled. History stays. Ask the person first.',
840
+ input: {
841
+ id: z.string().uuid().describe('Channel id from social_channels_list.'),
842
+ },
843
+ annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
844
+ run: async (api, { id }) => {
845
+ const data = await api.request('DELETE', `/social/channels/${seg(id)}`);
846
+ return { lead: `Channel ${id} disconnected.`, data };
847
+ },
848
+ }),
849
+ defineTool({
850
+ name: 'social_channel_priority',
851
+ title: 'Order social channels',
852
+ scope: 'social_connect',
853
+ description: 'Sets the order of connected channels, first is highest. If the plan changes to one with fewer channels, the highest ones stay active.',
854
+ input: {
855
+ channel_ids: z.array(z.string().uuid()).min(1).max(50).describe('Channel ids in order, highest first.'),
856
+ },
857
+ annotations: WRITE_IDEMPOTENT,
858
+ run: async (api, { channel_ids }) => {
859
+ const data = await api.request('POST', '/social/channels/priority', { body: { channel_ids } });
860
+ return { lead: 'Channel order saved.', data };
861
+ },
862
+ }),
863
+ defineTool({
864
+ name: 'social_media_upload',
865
+ title: 'Add an image or video',
866
+ scope: 'social_draft',
867
+ description: 'Imports an image (JPEG, PNG, GIF, WebP, up to 20 MB) or video (MP4, MOV, WebM, up to 50 MB) from a public https URL for use in social posts. The file type is read from the file itself. Publishes nothing. Always give alt_text for images.',
868
+ input: {
869
+ media_url: z.string().url().max(2000).describe('Public https URL of the file.'),
870
+ alt_text: z.string().max(2000).optional().describe('What the image shows, for people who can\'t see it.'),
871
+ title: z.string().max(200).optional().describe('A file name to show later.'),
872
+ },
873
+ annotations: WRITE_SAFE,
874
+ run: async (api, args) => {
875
+ const body = Object.fromEntries(Object.entries(args).filter(([, v]) => v !== undefined));
876
+ const data = await api.request('POST', '/social/media/upload', { body });
877
+ return { lead: `Media ${get(data, 'media.id') ?? ''} is ready.`, data };
878
+ },
879
+ }),
880
+ defineTool({
881
+ name: 'social_media_status',
882
+ title: 'Social media file',
883
+ scope: 'social_read',
884
+ description: 'Returns one uploaded media file: type, size, dimensions, alt text and status. Read only.',
885
+ input: { id: mediaId },
886
+ annotations: READ,
887
+ run: async (api, { id }) => {
888
+ const data = await api.request('GET', `/social/media/${seg(id)}`);
889
+ return { lead: `Media ${id}: ${get(data, 'media.status') ?? 'unknown'}.`, data };
890
+ },
891
+ }),
892
+ defineTool({
893
+ name: 'social_post_draft',
894
+ title: 'Draft a social post',
895
+ scope: 'social_draft',
896
+ description: 'Creates a draft social post. Publishes nothing. variants may override the text or media per network ("bluesky") or per channel id. Next: social_post_preview.',
897
+ input: {
898
+ text: z.string().min(1).max(50000).describe('The post text.'),
899
+ channel_ids: z.array(z.string().uuid()).min(1).max(20).describe('Channels to post to, from social_channels_list.'),
900
+ media_ids: z.array(z.string().uuid()).max(10).optional().describe('Media from social_media_upload.'),
901
+ variants: z.record(z.string(), z.object({ text: z.string().max(50000).optional(), media_ids: z.array(z.string().uuid()).max(10).optional() })).optional()
902
+ .describe('Overrides keyed by network or channel id, for example {"bluesky": {"text": "Shorter version"}}.'),
903
+ title: z.string().max(200).optional().describe('A name for your own reference.'),
904
+ },
905
+ annotations: WRITE_SAFE,
906
+ run: async (api, { text, ...rest }) => {
907
+ const body = Object.fromEntries(Object.entries({ base_text: text, ...rest }).filter(([, v]) => v !== undefined));
908
+ const data = await api.request('POST', '/social/posts', { body });
909
+ return { lead: `Draft ${get(data, 'post.id') ?? ''} created. Preview it with social_post_preview.`, data };
910
+ },
911
+ }),
912
+ defineTool({
913
+ name: 'social_ai_draft',
914
+ title: 'Write a social draft with AI',
915
+ scope: 'social_draft',
916
+ description: 'Writes a draft social post in the business\'s voice, from a short brief or by repurposing an email campaign (campaign_id), with a version per network sized to fit. Creates a draft only; nothing is posted. Uses the workspace\'s monthly AI allowance (shared with email). Next: social_post_preview.',
917
+ input: {
918
+ channel_ids: z.array(z.string().uuid()).min(1).max(20).describe('Channels it is for, from social_channels_list.'),
919
+ brief: z.string().max(4000).optional().describe('What the post is about. Include the facts: dates, prices, offers.'),
920
+ campaign_id: z.string().uuid().optional().describe('An email campaign to turn into social posts instead of a brief.'),
921
+ link_url: z.string().url().max(2000).optional().describe('An https link to include once.'),
922
+ },
923
+ annotations: WRITE_SAFE,
924
+ run: async (api, args) => {
925
+ if (!args.brief && !args.campaign_id)
926
+ throw new InputError('Pass a brief or a campaign_id.');
927
+ const body = Object.fromEntries(Object.entries(args).filter(([, v]) => v !== undefined));
928
+ const data = await api.request('POST', '/social/ai/draft', { body });
929
+ const warnings = get(data, 'warnings') || [];
930
+ return { lead: `Draft ${get(data, 'post.id') ?? ''} written.${warnings.length ? ` Check: ${warnings.join(' ')}` : ''} Preview it with social_post_preview.`, data };
931
+ },
932
+ }),
933
+ defineTool({
934
+ name: 'social_post_update',
935
+ title: 'Edit a social draft',
936
+ scope: 'social_draft',
937
+ description: 'Edits a draft social post. Any edit means it must be previewed again before scheduling. Only drafts can be edited; cancel a scheduled post first.',
938
+ input: {
939
+ id: postId,
940
+ text: z.string().min(1).max(50000).optional(),
941
+ channel_ids: z.array(z.string().uuid()).max(20).optional(),
942
+ media_ids: z.array(z.string().uuid()).max(10).optional(),
943
+ variants: z.record(z.string(), z.object({ text: z.string().max(50000).optional(), media_ids: z.array(z.string().uuid()).max(10).optional() })).optional(),
944
+ title: z.string().max(200).optional(),
945
+ },
946
+ annotations: WRITE_IDEMPOTENT,
947
+ run: async (api, { id, text, ...rest }) => {
948
+ const body = Object.fromEntries(Object.entries({ base_text: text, ...rest }).filter(([, v]) => v !== undefined));
949
+ if (!Object.keys(body).length)
950
+ throw new InputError('Nothing to update: pass at least one field to change.');
951
+ const data = await api.request('PATCH', `/social/posts/${seg(id)}`, { body });
952
+ return { lead: `Draft ${id} updated. Preview it again before scheduling.`, data };
953
+ },
954
+ }),
955
+ defineTool({
956
+ name: 'social_post_get',
957
+ title: 'Social post',
958
+ scope: 'social_read',
959
+ description: 'Returns one social post and, once scheduled, each destination\'s status and link. Read only.',
960
+ input: { id: postId },
961
+ annotations: READ,
962
+ untrusted: true,
963
+ run: async (api, { id }) => {
964
+ const data = await api.request('GET', `/social/posts/${seg(id)}`);
965
+ return { lead: `Post ${id}: ${get(data, 'post.status') ?? 'unknown'}.`, data };
966
+ },
967
+ }),
968
+ defineTool({
969
+ name: 'social_post_preview',
970
+ title: 'Preview a social post',
971
+ scope: 'social_draft',
972
+ description: 'Checks a draft against every destination and returns exactly what each will get, any problems, and a preview_revision. Show the person the text per network and wait for their yes before social_post_schedule. Publishes nothing.',
973
+ input: { id: postId },
974
+ annotations: WRITE_IDEMPOTENT,
975
+ run: async (api, { id }) => {
976
+ const data = await api.request('POST', `/social/posts/${seg(id)}/preview`, { body: {} });
977
+ const ok = get(data, 'ok') === true;
978
+ return { lead: ok ? `Ready. preview_revision: ${get(data, 'preview_revision')}. Show the person the preview and ask before scheduling.` : 'Not ready: fix the errors listed, then preview again.', data };
979
+ },
980
+ }),
981
+ defineTool({
982
+ name: 'social_post_schedule',
983
+ title: 'Schedule a social post',
984
+ scope: 'social_publish',
985
+ description: 'Publishes a previewed post now or at a set time, to every destination in that preview. Only after the person said yes to that preview. Needs the preview_revision from social_post_preview and confirm: true. It can be canceled until each destination starts.',
986
+ input: {
987
+ id: postId,
988
+ send_at: z.string().min(1).describe('"now", or an ISO 8601 time such as 2026-11-01T15:00:00Z.'),
989
+ preview_revision: z.string().min(1).describe('From social_post_preview.'),
990
+ confirm: z.literal(true).describe('true: the person approved this preview.'),
991
+ },
992
+ annotations: SOCIAL_PUBLISH,
993
+ run: async (api, { id, send_at, preview_revision, confirm }) => {
994
+ const data = await api.request('POST', `/social/posts/${seg(id)}/schedule`, { body: { send_at, preview_revision, confirm } });
995
+ return { lead: `Post ${id} scheduled for ${get(data, 'send_at') ?? send_at}.`, data };
996
+ },
997
+ }),
998
+ defineTool({
999
+ name: 'social_post_cancel',
1000
+ title: 'Cancel a scheduled social post',
1001
+ scope: 'social_publish',
1002
+ description: 'Cancels the destinations of a scheduled post that have not started. If none had started, the post becomes a draft again.',
1003
+ input: { id: postId },
1004
+ annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
1005
+ run: async (api, { id }) => {
1006
+ const data = await api.request('POST', `/social/posts/${seg(id)}/cancel`, { body: {} });
1007
+ return { lead: get(data, 'status') === 'draft' ? `Post ${id} canceled; it is a draft again.` : `Canceled what had not started on post ${id}.`, data };
1008
+ },
1009
+ }),
1010
+ defineTool({
1011
+ name: 'social_queue_list',
1012
+ title: 'Social queue',
1013
+ scope: 'social_read',
1014
+ description: 'Lists scheduled and in-progress social deliveries (one per destination), soonest first, or any status you name. Read only.',
1015
+ input: {
1016
+ status: z.enum(['pending', 'publishing', 'reconcile_needed', 'published', 'failed', 'canceled']).optional(),
1017
+ limit: z.number().int().min(1).max(200).optional(),
1018
+ },
1019
+ annotations: READ,
1020
+ untrusted: true,
1021
+ run: async (api, { status, limit }) => {
1022
+ const data = await api.request('GET', '/social/queue', { query: { status, limit } });
1023
+ const n = (get(data, 'deliveries') || []).length;
1024
+ return { lead: `${n} deliver${n === 1 ? 'y' : 'ies'}.`, data };
1025
+ },
1026
+ }),
1027
+ defineTool({
1028
+ name: 'social_delivery_status',
1029
+ title: 'Social delivery',
1030
+ scope: 'social_read',
1031
+ description: 'Returns one delivery (one post to one channel) with each attempt. error_code outcome_unknown means we could not confirm whether it posted and did not retry, so it cannot post twice: ask the person to check the channel. Read only.',
1032
+ input: { id: deliveryId },
1033
+ annotations: READ,
1034
+ untrusted: true,
1035
+ run: async (api, { id }) => {
1036
+ const data = await api.request('GET', `/social/deliveries/${seg(id)}`);
1037
+ return { lead: `Delivery ${id}: ${get(data, 'delivery.status') ?? 'unknown'}.`, data };
1038
+ },
1039
+ }),
1040
+ defineTool({
1041
+ name: 'social_usage_get',
1042
+ title: 'Social usage',
1043
+ scope: 'social_read',
1044
+ description: 'Returns this period\'s use against the plan: channels, pending posts, publications, uploads and storage. Read only.',
1045
+ input: {},
1046
+ annotations: READ,
1047
+ run: async (api) => {
1048
+ const data = await api.request('GET', '/social/usage');
1049
+ return { lead: `Social plan: ${get(data, 'tier') ?? 'free'}.`, data };
1050
+ },
1051
+ }),
1052
+ ];
1053
+ export const CORE_TOOL_NAMES = [
1054
+ 'page_get', 'page_update', 'page_link_add', 'page_link_update', 'page_link_remove', 'page_links_reorder', 'event_list', 'event_create', 'event_update', 'event_cancel',
1055
+ 'workspace_info',
1056
+ 'brand_get',
1057
+ 'brand_set_voice',
1058
+ 'templates_list',
1059
+ 'segments_list',
1060
+ 'contacts_search',
1061
+ 'contacts_add',
1062
+ 'campaign_draft',
1063
+ 'campaign_update',
1064
+ 'campaign_preview',
1065
+ 'campaign_send_test',
1066
+ 'campaign_schedule',
1067
+ 'campaign_cancel',
1068
+ 'campaigns_list',
1069
+ 'campaign_stats',
1070
+ 'email_send',
1071
+ 'events_recent',
1072
+ 'account_get',
1073
+ 'account_update',
1074
+ 'domain_add',
1075
+ 'domain_list',
1076
+ 'domain_verify',
1077
+ 'domain_remove',
1078
+ 'sms_setup_status',
1079
+ 'surveys_list',
1080
+ 'survey_results',
1081
+ 'survey_create',
1082
+ 'survey_update',
1083
+ 'billing_portal_link',
728
1084
  ];
729
- export const TOOL_NAMES = TOOLS.map((t) => t.name);
1085
+ export const TOOL_NAMES = CORE_TOOL_NAMES;
1086
+ export const ALL_TOOL_NAMES = TOOLS.map((t) => t.name);
1087
+ export const SOCIAL_TOOL_NAMES = TOOLS.filter((t) => t.scope.startsWith('social_')).map((t) => t.name);
730
1088
  /** Run one tool and turn its outcome (or failure) into an MCP result. */
731
1089
  export async function runTool(def, api, args) {
732
1090
  try {
@@ -737,8 +1095,13 @@ export async function runTool(def, api, args) {
737
1095
  return errorResult(err, api.secrets);
738
1096
  }
739
1097
  }
740
- export function registerTools(server, api) {
741
- for (const def of TOOLS) {
1098
+ // Core tools always register (the API answers insufficient_scope for a key
1099
+ // that lacks one), as before social. Social tools register only when the
1100
+ // key holds that social scope, so keys without social see no social tools.
1101
+ export function registerTools(server, api, options) {
1102
+ const scopes = options?.scopes ?? api.scopes ?? [];
1103
+ const toolsToRegister = TOOLS.filter((def) => !def.scope.startsWith('social_') || scopes.includes(def.scope));
1104
+ for (const def of toolsToRegister) {
742
1105
  server.registerTool(def.name, {
743
1106
  title: def.title,
744
1107
  description: `${def.description} Requires API key scope: ${def.scope}.`,
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.2.1";
1
+ export declare const VERSION = "0.3.0";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Kept in sync with package.json "version" (a test checks it).
2
- export const VERSION = '0.2.1';
2
+ export const VERSION = '0.3.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hollerpost-mcp",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "MCP server for Hollerpost: let your own AI agent draft, preview, schedule and report on email campaigns in your Hollerpost workspace.",
5
5
  "license": "MIT",
6
6
  "type": "module",