honeybook-mcp 0.9.0 → 0.10.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "HoneyBook client-portal tools for Claude Code",
10
- "version": "0.9.0"
10
+ "version": "0.10.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "HoneyBook",
16
16
  "source": "./",
17
17
  "description": "HoneyBook client-portal MCP for Claude — view wedding-vendor contracts and invoices via MCP",
18
- "version": "0.9.0",
18
+ "version": "0.10.0",
19
19
  "author": {
20
20
  "name": "Chris Chall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "honeybook",
3
3
  "displayName": "HoneyBook",
4
- "version": "0.9.0",
4
+ "version": "0.10.0",
5
5
  "description": "HoneyBook client-portal MCP for Claude — view wedding-vendor contracts and invoices via MCP",
6
6
  "author": {
7
7
  "name": "Chris Chall",
package/dist/bundle.js CHANGED
@@ -35016,12 +35016,40 @@ function messageOf(err) {
35016
35016
  return String(err);
35017
35017
  }
35018
35018
 
35019
- // node_modules/@chrischall/mcp-utils/dist/response/index.js
35020
- function textResult(data) {
35021
- return {
35022
- content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
35023
- };
35019
+ // node_modules/@chrischall/mcp-utils/dist/response/view.js
35020
+ var VIEWS = ["compact", "full", "raw"];
35021
+ var DEFAULT_VIEW = "compact";
35022
+ var BLURB = {
35023
+ compact: '"compact" (default) drops fields the response already carries elsewhere',
35024
+ full: '"full" returns every field this server understands',
35025
+ raw: '"raw" returns the upstream payload unprojected'
35026
+ };
35027
+ function viewParam(honoured, opts = {}) {
35028
+ if (honoured.length < 2) {
35029
+ throw new Error("viewParam needs at least two rungs: a parameter offering one value decides nothing");
35030
+ }
35031
+ if (!honoured.includes("compact")) {
35032
+ throw new Error('viewParam must offer "compact": a tool with no cheap rung has nothing to default to');
35033
+ }
35034
+ const ordered = VIEWS.filter((v) => honoured.includes(v));
35035
+ const sentence = `Response shape: ${ordered.map((v) => BLURB[v]).join("; ")}.`;
35036
+ return external_exports.enum(Object.fromEntries(ordered.map((v) => [v, v]))).optional().describe(opts.note ? `${sentence} ${opts.note}` : sentence);
35037
+ }
35038
+ function resolveView(value, honoured) {
35039
+ return value !== void 0 && honoured.includes(value) ? value : DEFAULT_VIEW;
35040
+ }
35041
+ function minifiedResult(data) {
35042
+ return { content: [{ type: "text", text: JSON.stringify(data) }] };
35043
+ }
35044
+ function viewResult(view, data) {
35045
+ return view === "raw" ? { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] } : minifiedResult(data);
35024
35046
  }
35047
+
35048
+ // node_modules/@chrischall/mcp-utils/dist/response/media.js
35049
+ var MEDIA_NOUN = "(?:avatar|tall_avatar|cover_photo|cover_image|picture|photo|thumbnail|thumb|image|icon|banner|profile_pic(?:ture)?|logo)";
35050
+ var MEDIA_KEY = new RegExp(`^${MEDIA_NOUN}s?(?:(?:link|uri|url)s?)?$`, "i");
35051
+
35052
+ // node_modules/@chrischall/mcp-utils/dist/response/index.js
35025
35053
  function rawTextResult(text) {
35026
35054
  return { content: [{ type: "text", text }] };
35027
35055
  }
@@ -39758,6 +39786,13 @@ function registerCredentialHealthcheckTool(args) {
39758
39786
 
39759
39787
  // node_modules/@chrischall/mcp-utils/dist/fetchproxy/index.js
39760
39788
  function bridgeErrorInfo(err) {
39789
+ if (err instanceof FetchproxySessionNotReadyError) {
39790
+ return {
39791
+ type: "session_not_ready",
39792
+ message: truncateErrorMessage(messageOf(err).replace(err.hint, "").trim()),
39793
+ hint: err.hint
39794
+ };
39795
+ }
39761
39796
  const kind = classifyBridgeError(err);
39762
39797
  const message = truncateErrorMessage(messageOf(err));
39763
39798
  switch (kind) {
@@ -39792,7 +39827,7 @@ function bridgeErrorInfo(err) {
39792
39827
  // package.json
39793
39828
  var package_default = {
39794
39829
  name: "honeybook-mcp",
39795
- version: "0.9.0",
39830
+ version: "0.10.0",
39796
39831
  mcpName: "io.github.chrischall/honeybook-mcp",
39797
39832
  description: "HoneyBook client-portal MCP server for Claude",
39798
39833
  author: "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -39836,7 +39871,7 @@ var package_default = {
39836
39871
  typecheck: "tsc -p tsconfig.json --noEmit"
39837
39872
  },
39838
39873
  dependencies: {
39839
- "@chrischall/mcp-utils": "^0.19.3",
39874
+ "@chrischall/mcp-utils": "^0.23.0",
39840
39875
  "@fetchproxy/bootstrap": "^2.2.0",
39841
39876
  "@fetchproxy/server": "^2.2.0",
39842
39877
  "@modelcontextprotocol/sdk": "^1.29.0",
@@ -39999,7 +40034,7 @@ async function useMagicLink(args) {
39999
40034
  const portalOrigin = normalizeOrigin(args.magic_link_url);
40000
40035
  const session = await captureSessionViaFetchproxy({ portalOrigin });
40001
40036
  clearClientCache();
40002
- return textResult({
40037
+ return minifiedResult({
40003
40038
  ok: true,
40004
40039
  portalOrigin: session.portalOrigin,
40005
40040
  companyName: session.companyName,
@@ -40024,7 +40059,7 @@ async function listActiveSessions() {
40024
40059
  isRealChargeableUser: c.isRealChargeableUser ?? null,
40025
40060
  capturedAt: new Date(c.capturedAt).toISOString()
40026
40061
  }));
40027
- return textResult({ portalSessions, flowCredentials });
40062
+ return minifiedResult({ portalSessions, flowCredentials });
40028
40063
  }
40029
40064
  function registerSessionTools(server) {
40030
40065
  server.registerTool(
@@ -40271,7 +40306,7 @@ async function useFlowLink(args) {
40271
40306
  return flowCaptureResult(credential);
40272
40307
  }
40273
40308
  function flowCaptureResult(credential) {
40274
- return textResult({
40309
+ return minifiedResult({
40275
40310
  ok: true,
40276
40311
  kind: "flow-credential",
40277
40312
  flowId: credential.flowId,
@@ -40291,7 +40326,9 @@ function flowCaptureResult(credential) {
40291
40326
  });
40292
40327
  }
40293
40328
  var MAX_FLOW_BYTES = 2e5;
40329
+ var FLOW_VIEWS = ["compact", "raw"];
40294
40330
  async function getFlow(args) {
40331
+ const view = resolveView(args.view, FLOW_VIEWS);
40295
40332
  const client = await getActiveFlowClient(args.flow_id);
40296
40333
  const flowId = client.credential.flowId;
40297
40334
  const minimal = await fetchFlowMinimal(flowId, {
@@ -40312,16 +40349,16 @@ async function getFlow(args) {
40312
40349
  // a normal outcome, not an error — the read does not require one.
40313
40350
  contextId
40314
40351
  };
40315
- if (args.section === "raw") return textResult({ ...head, flow });
40352
+ if (view === "raw") return viewResult(view, { ...head, flow });
40316
40353
  const bytes = Buffer.byteLength(JSON.stringify(flow ?? null), "utf8");
40317
- if (bytes <= MAX_FLOW_BYTES) return textResult({ ...head, flow });
40318
- return textResult({
40354
+ if (bytes <= MAX_FLOW_BYTES) return viewResult(view, { ...head, flow });
40355
+ return viewResult(view, {
40319
40356
  ...head,
40320
40357
  truncated: {
40321
40358
  bytes,
40322
40359
  limit: MAX_FLOW_BYTES,
40323
40360
  topLevelKeys: flow && typeof flow === "object" && !Array.isArray(flow) ? Object.keys(flow).sort() : [],
40324
- hint: 'This questionnaire is larger than the default ceiling. Call get_flow again with section="raw" for the full payload (may exceed MCP size limits).'
40361
+ hint: 'This questionnaire is larger than the default ceiling. Call get_flow again with view="raw" for the full payload (may exceed MCP size limits).'
40325
40362
  }
40326
40363
  });
40327
40364
  }
@@ -40342,14 +40379,14 @@ function registerFlowTools(server) {
40342
40379
  server.registerTool(
40343
40380
  "get_flow",
40344
40381
  {
40345
- description: 'Read a HoneyBook questionnaire (flow) \u2014 its pages, questions and any answers already submitted \u2014 using a credential captured by `use_flow_link`. Requires a flow credential; a client-portal session will NOT work here, and vice versa. Defaults to the most recently captured flow. Makes two calls: the public /api/v2/flow/<id>/minimal for the vendor company id, then /api/v2/client/flow/<id>/active, passing that id as ?ctxc= when /minimal supplied one. A questionnaire larger than the default ceiling answers with its size and top-level keys instead; call again with section="raw" for the whole thing.',
40382
+ description: 'Read a HoneyBook questionnaire (flow) \u2014 its pages, questions and any answers already submitted \u2014 using a credential captured by `use_flow_link`. Requires a flow credential; a client-portal session will NOT work here, and vice versa. Defaults to the most recently captured flow. Makes two calls: the public /api/v2/flow/<id>/minimal for the vendor company id, then /api/v2/client/flow/<id>/active, passing that id as ?ctxc= when /minimal supplied one. A questionnaire larger than the default ceiling answers with its size and top-level keys instead; call again with view="raw" for the whole thing.',
40346
40383
  inputSchema: {
40347
40384
  flow_id: external_exports.string().optional().describe(
40348
40385
  "Flow id to read. Omit to use the most recently captured flow credential. Run `list_active_sessions` to see the active flow ids."
40349
40386
  ),
40350
- section: external_exports.enum(["summary", "raw"]).optional().describe(
40351
- 'Default "summary" returns the questionnaire unless it exceeds a byte ceiling, in which case it answers with its size and top-level keys instead. "raw" returns the full payload however large (may exceed MCP size limits).'
40352
- )
40387
+ view: viewParam(FLOW_VIEWS, {
40388
+ note: 'compact returns the questionnaire unless it exceeds a byte ceiling, in which case it answers with its size and top-level keys instead; "raw" returns the full payload however large (may exceed MCP size limits).'
40389
+ })
40353
40390
  },
40354
40391
  annotations: { readOnlyHint: true }
40355
40392
  },
@@ -40616,7 +40653,7 @@ async function getWorkspaceFile(args) {
40616
40653
  body = buildSummary(raw);
40617
40654
  break;
40618
40655
  }
40619
- return textResult(body);
40656
+ return minifiedResult(body);
40620
40657
  }
40621
40658
  function registerWorkspaceFileTools(server) {
40622
40659
  server.registerTool(
@@ -40659,7 +40696,7 @@ async function getWorkspace(args) {
40659
40696
  "GET",
40660
40697
  `/api/v2/workspaces/${args.workspace_id}`
40661
40698
  );
40662
- return textResult(res);
40699
+ return minifiedResult(res);
40663
40700
  }
40664
40701
  function registerWorkspaceTools(server) {
40665
40702
  server.registerTool(
@@ -40685,7 +40722,7 @@ async function listPaymentMethods(args) {
40685
40722
  "GET",
40686
40723
  `/api/v2/users/${client.scope.userId}/payment_methods`
40687
40724
  );
40688
- return textResult(res);
40725
+ return minifiedResult(res);
40689
40726
  }
40690
40727
  function registerPaymentMethodTools(server) {
40691
40728
  server.registerTool(
@@ -40805,7 +40842,7 @@ async function listProjects(args) {
40805
40842
  const client = await getActiveClient(args.origin);
40806
40843
  const path = args.page ? `/api/v2/client/events?page=${args.page}` : "/api/v2/client/events";
40807
40844
  const res = await client.request("GET", path);
40808
- return textResult({
40845
+ return minifiedResult({
40809
40846
  projects: (res.data ?? []).map((e) => ({
40810
40847
  project_id: e._id,
40811
40848
  workspace_id: e.workspace_id,
@@ -40864,10 +40901,12 @@ function summarizeProject(d) {
40864
40901
  last_activity_date: d.last_activity_date ?? null
40865
40902
  };
40866
40903
  }
40904
+ var PROJECT_VIEWS = ["compact", "raw"];
40867
40905
  async function getProject(args) {
40906
+ const view = resolveView(args.view, PROJECT_VIEWS);
40868
40907
  const client = await getActiveClient(args.origin);
40869
40908
  const res = await client.request("GET", `/api/v2/events/${args.project_id}/details`);
40870
- return textResult(args.section === "raw" ? res : summarizeProject(res));
40909
+ return viewResult(view, view === "raw" ? res : summarizeProject(res));
40871
40910
  }
40872
40911
  function registerProjectTools(server) {
40873
40912
  server.registerTool(
@@ -40887,10 +40926,12 @@ function registerProjectTools(server) {
40887
40926
  server.registerTool(
40888
40927
  "get_project",
40889
40928
  {
40890
- description: `Project details \u2014 the portal's Overview "Project details" card plus the people on it: name, date, time, timezone, location, guest count, custom fields, cover image, and each participant's name / email / phone / role. section="raw" returns the untrimmed response (large: it embeds the vendor's account).`,
40929
+ description: `Project details \u2014 the portal's Overview "Project details" card plus the people on it: name, date, time, timezone, location, guest count, custom fields, cover image, and each participant's name / email / phone / role. view="raw" returns the untrimmed response (large: it embeds the vendor's account).`,
40891
40930
  inputSchema: {
40892
40931
  project_id: external_exports.string().describe("The project (event) _id from list_projects."),
40893
- section: external_exports.enum(["summary", "raw"]).optional().describe('Default "summary".'),
40932
+ view: viewParam(PROJECT_VIEWS, {
40933
+ note: `compact returns the Overview card plus participants; "raw" returns the untrimmed /details response, which embeds the vendor's whole account.`
40934
+ }),
40894
40935
  origin: schemaOrigin.describe(
40895
40936
  "Portal origin (e.g. https://<vendor>.hbportal.co). Optional when only one session is active."
40896
40937
  )
@@ -41202,7 +41243,7 @@ async function listMessages(args) {
41202
41243
  const unseen = selected.filter(
41203
41244
  (item) => isMessageItem(item) && !item.seen_at && item.sender_id !== meId
41204
41245
  ).length;
41205
- return textResult({
41246
+ return minifiedResult({
41206
41247
  workspace_id: args.workspace_id,
41207
41248
  kind,
41208
41249
  participants: participants(feed),
@@ -41229,7 +41270,7 @@ async function getMessage(args) {
41229
41270
  `Feed item "${args.message_id}" is a "${String(item.type)}" activity item, not a message. list_messages with kind="activity" already shows everything it carries.`
41230
41271
  );
41231
41272
  }
41232
- return textResult(expandMessage(item, feed, client.scope.userId, args.format ?? "text"));
41273
+ return minifiedResult(expandMessage(item, feed, client.scope.userId, args.format ?? "text"));
41233
41274
  }
41234
41275
  var HTML_TAG = /<\/?(p|br|div|a|b|i|u|strong|em|ul|ol|li|span|h[1-6]|table|tr|td|th|img|blockquote|pre|code|hr)\b[^>]*>/i;
41235
41276
  function bodyToHtml(body) {
@@ -41293,7 +41334,7 @@ Re-run send_message with { confirm: true } to send it.`
41293
41334
  `HoneyBook reported the message as not delivered to every recipient: ${JSON.stringify(failed.length ? failed : sendResults)}`
41294
41335
  );
41295
41336
  }
41296
- return textResult({
41337
+ return minifiedResult({
41297
41338
  status: "sent",
41298
41339
  task_id,
41299
41340
  workspace_id: args.workspace_id,
@@ -41308,7 +41349,7 @@ async function markMessagesSeen(args) {
41308
41349
  await client.request("PUT", `/api/v2/workspaces/${args.workspace_id}/feed_items/seen`, {
41309
41350
  item_ids: args.message_ids
41310
41351
  });
41311
- return textResult({ workspace_id: args.workspace_id, marked: args.message_ids });
41352
+ return minifiedResult({ workspace_id: args.workspace_id, marked: args.message_ids });
41312
41353
  }
41313
41354
  function registerMessageTools(server) {
41314
41355
  server.registerTool(
@@ -41399,7 +41440,7 @@ function meetingsFromFeed(items) {
41399
41440
  async function listMeetings(args) {
41400
41441
  const client = await getActiveClient(args.origin);
41401
41442
  const feed = await fetchWorkspaceFeed(client, args.workspace_id);
41402
- return textResult({ workspace_id: args.workspace_id, meetings: meetingsFromFeed(feed.items) });
41443
+ return minifiedResult({ workspace_id: args.workspace_id, meetings: meetingsFromFeed(feed.items) });
41403
41444
  }
41404
41445
  function registerMeetingTools(server) {
41405
41446
  server.registerTool(
@@ -41446,7 +41487,7 @@ async function listTasks(args) {
41446
41487
  "GET",
41447
41488
  `/api/v2/workspaces/${args.workspace_id}/taskgroup`
41448
41489
  );
41449
- return textResult({
41490
+ return minifiedResult({
41450
41491
  workspace_id: args.workspace_id,
41451
41492
  page,
41452
41493
  per_page: perPage,
@@ -41483,7 +41524,7 @@ async function listNotes(args) {
41483
41524
  "GET",
41484
41525
  `/api/v2/notes/workspace/${args.workspace_id}`
41485
41526
  );
41486
- return textResult({ workspace_id: args.workspace_id, notes: notes ?? [] });
41527
+ return minifiedResult({ workspace_id: args.workspace_id, notes: notes ?? [] });
41487
41528
  }
41488
41529
  function registerNoteTools(server) {
41489
41530
  server.registerTool(
@@ -41510,7 +41551,7 @@ async function listAttachments(args) {
41510
41551
  `/api/v2/workspaces/${args.workspace_id}/attachments`
41511
41552
  );
41512
41553
  const a = res?.attachments ?? {};
41513
- return textResult({
41554
+ return minifiedResult({
41514
41555
  workspace_id: args.workspace_id,
41515
41556
  images: a.images ?? [],
41516
41557
  files: a.files ?? [],
@@ -41578,7 +41619,7 @@ async function listPayments(args) {
41578
41619
  payments
41579
41620
  };
41580
41621
  });
41581
- return textResult({ workspace_id: args.workspace_id, totals, files });
41622
+ return minifiedResult({ workspace_id: args.workspace_id, totals, files });
41582
41623
  }
41583
41624
  function registerPaymentTools(server) {
41584
41625
  server.registerTool(
@@ -41602,7 +41643,7 @@ var __dirname = dirname2(fileURLToPath(import.meta.url));
41602
41643
  await loadDotenvSafely({ path: join6(__dirname, "..", ".env"), override: false });
41603
41644
  await runMcp({
41604
41645
  name: "honeybook-mcp",
41605
- version: "0.9.0",
41646
+ version: "0.10.0",
41606
41647
  // x-release-please-version
41607
41648
  tools: [
41608
41649
  registerSessionTools,
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import { registerAttachmentTools } from './tools/attachments.js';
20
20
  import { registerPaymentTools } from './tools/payments.js';
21
21
  await runMcp({
22
22
  name: 'honeybook-mcp',
23
- version: '0.9.0', // x-release-please-version
23
+ version: '0.10.0', // x-release-please-version
24
24
  tools: [
25
25
  registerSessionTools,
26
26
  registerFlowTools,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  /**
5
5
  * The Files tab's "attachments" bucket: loose images, files and bookmarks
@@ -10,7 +10,7 @@ export async function listAttachments(args) {
10
10
  const client = await getActiveClient(args.origin);
11
11
  const res = await client.request('GET', `/api/v2/workspaces/${args.workspace_id}/attachments`);
12
12
  const a = res?.attachments ?? {};
13
- return textResult({
13
+ return minifiedResult({
14
14
  workspace_id: args.workspace_id,
15
15
  images: a.images ?? [],
16
16
  files: a.files ?? [],
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, resolveView, viewParam, viewResult } from '@chrischall/mcp-utils';
3
3
  import { captureFlowCredentialViaFetchproxy } from '../flow-auth.js';
4
4
  import { fetchFlowMinimal, flowContextId, getActiveFlowClient } from '../flow-client.js';
5
5
  /**
@@ -19,7 +19,7 @@ export async function useFlowLink(args) {
19
19
  * the browser — and so the "never return the hash" rule has one place to hold.
20
20
  */
21
21
  export function flowCaptureResult(credential) {
22
- return textResult({
22
+ return minifiedResult({
23
23
  ok: true,
24
24
  kind: 'flow-credential',
25
25
  flowId: credential.flowId,
@@ -74,7 +74,13 @@ const MAX_FLOW_BYTES = 200_000;
74
74
  * (`submit`, `answer_question`, `select_service`, `sign_contract`, `auth`, the
75
75
  * payment routes), and none of them are exposed here.
76
76
  */
77
+ /**
78
+ * The rungs this tool honours. No `full`: `raw` already IS the whole payload
79
+ * we received, so a third value would silently alias to another.
80
+ */
81
+ export const FLOW_VIEWS = ['compact', 'raw'];
77
82
  export async function getFlow(args) {
83
+ const view = resolveView(args.view, FLOW_VIEWS);
78
84
  const client = await getActiveFlowClient(args.flow_id);
79
85
  const flowId = client.credential.flowId;
80
86
  const minimal = await fetchFlowMinimal(flowId, {
@@ -100,20 +106,20 @@ export async function getFlow(args) {
100
106
  // a normal outcome, not an error — the read does not require one.
101
107
  contextId,
102
108
  };
103
- if (args.section === 'raw')
104
- return textResult({ ...head, flow });
109
+ if (view === 'raw')
110
+ return viewResult(view, { ...head, flow });
105
111
  const bytes = Buffer.byteLength(JSON.stringify(flow ?? null), 'utf8');
106
112
  if (bytes <= MAX_FLOW_BYTES)
107
- return textResult({ ...head, flow });
113
+ return viewResult(view, { ...head, flow });
108
114
  // The keys are the navigational half: a caller has to be able to learn what
109
115
  // IS in there without being handed the whole thing to find out.
110
- return textResult({
116
+ return viewResult(view, {
111
117
  ...head,
112
118
  truncated: {
113
119
  bytes,
114
120
  limit: MAX_FLOW_BYTES,
115
121
  topLevelKeys: flow && typeof flow === 'object' && !Array.isArray(flow) ? Object.keys(flow).sort() : [],
116
- hint: 'This questionnaire is larger than the default ceiling. Call get_flow again with section="raw" for the full payload (may exceed MCP size limits).',
122
+ hint: 'This questionnaire is larger than the default ceiling. Call get_flow again with view="raw" for the full payload (may exceed MCP size limits).',
117
123
  },
118
124
  });
119
125
  }
@@ -129,16 +135,15 @@ export function registerFlowTools(server) {
129
135
  annotations: { readOnlyHint: false },
130
136
  }, useFlowLink);
131
137
  server.registerTool('get_flow', {
132
- description: 'Read a HoneyBook questionnaire (flow) — its pages, questions and any answers already submitted — using a credential captured by `use_flow_link`. Requires a flow credential; a client-portal session will NOT work here, and vice versa. Defaults to the most recently captured flow. Makes two calls: the public /api/v2/flow/<id>/minimal for the vendor company id, then /api/v2/client/flow/<id>/active, passing that id as ?ctxc= when /minimal supplied one. A questionnaire larger than the default ceiling answers with its size and top-level keys instead; call again with section="raw" for the whole thing.',
138
+ description: 'Read a HoneyBook questionnaire (flow) — its pages, questions and any answers already submitted — using a credential captured by `use_flow_link`. Requires a flow credential; a client-portal session will NOT work here, and vice versa. Defaults to the most recently captured flow. Makes two calls: the public /api/v2/flow/<id>/minimal for the vendor company id, then /api/v2/client/flow/<id>/active, passing that id as ?ctxc= when /minimal supplied one. A questionnaire larger than the default ceiling answers with its size and top-level keys instead; call again with view="raw" for the whole thing.',
133
139
  inputSchema: {
134
140
  flow_id: z
135
141
  .string()
136
142
  .optional()
137
143
  .describe('Flow id to read. Omit to use the most recently captured flow credential. Run `list_active_sessions` to see the active flow ids.'),
138
- section: z
139
- .enum(['summary', 'raw'])
140
- .optional()
141
- .describe('Default "summary" returns the questionnaire unless it exceeds a byte ceiling, in which case it answers with its size and top-level keys instead. "raw" returns the full payload however large (may exceed MCP size limits).'),
144
+ view: viewParam(FLOW_VIEWS, {
145
+ note: 'compact returns the questionnaire unless it exceeds a byte ceiling, in which case it answers with its size and top-level keys instead; "raw" returns the full payload however large (may exceed MCP size limits).',
146
+ }),
142
147
  },
143
148
  annotations: { readOnlyHint: true },
144
149
  }, getFlow);
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  import { fetchWorkspaceFeed, compactCalendarItem, itemDate } from '../feed.js';
5
5
  /**
@@ -37,7 +37,7 @@ export function meetingsFromFeed(items) {
37
37
  export async function listMeetings(args) {
38
38
  const client = await getActiveClient(args.origin);
39
39
  const feed = await fetchWorkspaceFeed(client, args.workspace_id);
40
- return textResult({ workspace_id: args.workspace_id, meetings: meetingsFromFeed(feed.items) });
40
+ return minifiedResult({ workspace_id: args.workspace_id, meetings: meetingsFromFeed(feed.items) });
41
41
  }
42
42
  export function registerMeetingTools(server) {
43
43
  server.registerTool('list_meetings', {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, rawTextResult, schemaOrigin, schemaConfirm } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, rawTextResult, schemaConfirm, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  import { fetchWorkspaceFeed, isMessageItem, itemDate, summarizeMessage, summarizeActivity, expandMessage, } from '../feed.js';
5
5
  import { runClientPendingTask } from '../pending-tasks.js';
@@ -37,7 +37,7 @@ export async function listMessages(args) {
37
37
  .slice(0, limit)
38
38
  .map((item) => isMessageItem(item) ? summarizeMessage(item, feed, meId) : summarizeActivity(item));
39
39
  const unseen = selected.filter((item) => isMessageItem(item) && !item.seen_at && item.sender_id !== meId).length;
40
- return textResult({
40
+ return minifiedResult({
41
41
  workspace_id: args.workspace_id,
42
42
  kind,
43
43
  participants: participants(feed),
@@ -61,7 +61,7 @@ export async function getMessage(args) {
61
61
  throw new Error(`Feed item "${args.message_id}" is a "${String(item.type)}" activity item, not a message. ` +
62
62
  `list_messages with kind="activity" already shows everything it carries.`);
63
63
  }
64
- return textResult(expandMessage(item, feed, client.scope.userId, args.format ?? 'text'));
64
+ return minifiedResult(expandMessage(item, feed, client.scope.userId, args.format ?? 'text'));
65
65
  }
66
66
  /**
67
67
  * The composer sends HTML. Plain text is escaped and line breaks become
@@ -126,7 +126,7 @@ export async function sendMessage(args) {
126
126
  const failed = (sendResults ?? []).filter((r) => r.success === false);
127
127
  throw new Error(`HoneyBook reported the message as not delivered to every recipient: ${JSON.stringify(failed.length ? failed : sendResults)}`);
128
128
  }
129
- return textResult({
129
+ return minifiedResult({
130
130
  status: 'sent',
131
131
  task_id,
132
132
  workspace_id: args.workspace_id,
@@ -141,7 +141,7 @@ export async function markMessagesSeen(args) {
141
141
  await client.request('PUT', `/api/v2/workspaces/${args.workspace_id}/feed_items/seen`, {
142
142
  item_ids: args.message_ids,
143
143
  });
144
- return textResult({ workspace_id: args.workspace_id, marked: args.message_ids });
144
+ return minifiedResult({ workspace_id: args.workspace_id, marked: args.message_ids });
145
145
  }
146
146
  export function registerMessageTools(server) {
147
147
  server.registerTool('list_messages', {
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  export async function listNotes(args) {
5
5
  const client = await getActiveClient(args.origin);
6
6
  const notes = await client.request('GET', `/api/v2/notes/workspace/${args.workspace_id}`);
7
- return textResult({ workspace_id: args.workspace_id, notes: notes ?? [] });
7
+ return minifiedResult({ workspace_id: args.workspace_id, notes: notes ?? [] });
8
8
  }
9
9
  export function registerNoteTools(server) {
10
10
  server.registerTool('list_notes', {
@@ -1,9 +1,9 @@
1
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
1
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
2
2
  import { getActiveClient } from '../client.js';
3
3
  export async function listPaymentMethods(args) {
4
4
  const client = await getActiveClient(args.origin);
5
5
  const res = await client.request('GET', `/api/v2/users/${client.scope.userId}/payment_methods`);
6
- return textResult(res);
6
+ return minifiedResult(res);
7
7
  }
8
8
  export function registerPaymentMethodTools(server) {
9
9
  server.registerTool('list_payment_methods', {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  function num(v) {
5
5
  return typeof v === 'number' ? v : undefined;
@@ -51,7 +51,7 @@ export async function listPayments(args) {
51
51
  payments,
52
52
  };
53
53
  });
54
- return textResult({ workspace_id: args.workspace_id, totals, files });
54
+ return minifiedResult({ workspace_id: args.workspace_id, totals, files });
55
55
  }
56
56
  export function registerPaymentTools(server) {
57
57
  server.registerTool('list_payments', {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, resolveView, schemaOrigin, viewParam, viewResult } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  /**
5
5
  * HoneyBook calls a client's project an **event** (`/api/v2/client/events`);
@@ -10,7 +10,7 @@ export async function listProjects(args) {
10
10
  const client = await getActiveClient(args.origin);
11
11
  const path = args.page ? `/api/v2/client/events?page=${args.page}` : '/api/v2/client/events';
12
12
  const res = await client.request('GET', path);
13
- return textResult({
13
+ return minifiedResult({
14
14
  projects: (res.data ?? []).map((e) => ({
15
15
  project_id: e._id,
16
16
  workspace_id: e.workspace_id,
@@ -78,10 +78,16 @@ function summarizeProject(d) {
78
78
  last_activity_date: d.last_activity_date ?? null,
79
79
  };
80
80
  }
81
+ /**
82
+ * The rungs this tool honours. No `full`: `raw` already IS every field we
83
+ * received, so a third value would silently alias to another.
84
+ */
85
+ export const PROJECT_VIEWS = ['compact', 'raw'];
81
86
  export async function getProject(args) {
87
+ const view = resolveView(args.view, PROJECT_VIEWS);
82
88
  const client = await getActiveClient(args.origin);
83
89
  const res = await client.request('GET', `/api/v2/events/${args.project_id}/details`);
84
- return textResult(args.section === 'raw' ? res : summarizeProject(res));
90
+ return viewResult(view, view === 'raw' ? res : summarizeProject(res));
85
91
  }
86
92
  export function registerProjectTools(server) {
87
93
  server.registerTool('list_projects', {
@@ -96,10 +102,12 @@ export function registerProjectTools(server) {
96
102
  server.registerTool('get_project', {
97
103
  description: 'Project details — the portal\'s Overview "Project details" card plus the people on it: name, date, ' +
98
104
  'time, timezone, location, guest count, custom fields, cover image, and each participant\'s name / ' +
99
- 'email / phone / role. section="raw" returns the untrimmed response (large: it embeds the vendor\'s account).',
105
+ 'email / phone / role. view="raw" returns the untrimmed response (large: it embeds the vendor\'s account).',
100
106
  inputSchema: {
101
107
  project_id: z.string().describe('The project (event) _id from list_projects.'),
102
- section: z.enum(['summary', 'raw']).optional().describe('Default "summary".'),
108
+ view: viewParam(PROJECT_VIEWS, {
109
+ note: 'compact returns the Overview card plus participants; "raw" returns the untrimmed /details response, which embeds the vendor\'s whole account.',
110
+ }),
103
111
  origin: schemaOrigin.describe('Portal origin (e.g. https://<vendor>.hbportal.co). Optional when only one session is active.'),
104
112
  },
105
113
  annotations: { readOnlyHint: true },
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult } from '@chrischall/mcp-utils';
2
+ import { minifiedResult } from '@chrischall/mcp-utils';
3
3
  import { sessionStore, normalizeOrigin } from '../sessions.js';
4
4
  import { clearClientCache } from '../client.js';
5
5
  import { captureSessionViaFetchproxy } from '../auth.js';
@@ -35,7 +35,7 @@ export async function useMagicLink(args) {
35
35
  const session = await captureSessionViaFetchproxy({ portalOrigin });
36
36
  // Clear client cache so getActiveClient rebuilds against the fresh token.
37
37
  clearClientCache();
38
- return textResult({
38
+ return minifiedResult({
39
39
  ok: true,
40
40
  portalOrigin: session.portalOrigin,
41
41
  companyName: session.companyName,
@@ -70,7 +70,7 @@ export async function listActiveSessions() {
70
70
  isRealChargeableUser: c.isRealChargeableUser ?? null,
71
71
  capturedAt: new Date(c.capturedAt).toISOString(),
72
72
  }));
73
- return textResult({ portalSessions, flowCredentials });
73
+ return minifiedResult({ portalSessions, flowCredentials });
74
74
  }
75
75
  export function registerSessionTools(server) {
76
76
  server.registerTool('use_magic_link', {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  /** Today in the caller's LOCAL timezone — the UTC date is a day off for an evening west of Greenwich. */
5
5
  export function today(now = new Date()) {
@@ -35,7 +35,7 @@ export async function listTasks(args) {
35
35
  const tasks = await client.request('GET', `${base}?page=${page}&perPage=${perPage}&sort_by=due_date&sort_desc=false&curr_date=${apiDate}`);
36
36
  const counts = await client.request('GET', `${base}/counts?curr_date=${apiDate}`);
37
37
  const groups = await client.request('GET', `/api/v2/workspaces/${args.workspace_id}/taskgroup`);
38
- return textResult({
38
+ return minifiedResult({
39
39
  workspace_id: args.workspace_id,
40
40
  page,
41
41
  per_page: perPage,
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { textResult, rawTextResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, rawTextResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  import { FILE_TYPES } from '../types.js';
5
5
  /**
@@ -235,7 +235,7 @@ export async function getWorkspaceFile(args) {
235
235
  body = buildSummary(raw);
236
236
  break;
237
237
  }
238
- return textResult(body);
238
+ return minifiedResult(body);
239
239
  }
240
240
  export function registerWorkspaceFileTools(server) {
241
241
  server.registerTool('list_workspace_files', {
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { textResult, schemaOrigin } from '@chrischall/mcp-utils';
2
+ import { minifiedResult, schemaOrigin } from '@chrischall/mcp-utils';
3
3
  import { getActiveClient } from '../client.js';
4
4
  export async function getWorkspace(args) {
5
5
  const client = await getActiveClient(args.origin);
6
6
  const res = await client.request('GET', `/api/v2/workspaces/${args.workspace_id}`);
7
- return textResult(res);
7
+ return minifiedResult(res);
8
8
  }
9
9
  export function registerWorkspaceTools(server) {
10
10
  server.registerTool('get_workspace', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "honeybook-mcp",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "mcpName": "io.github.chrischall/honeybook-mcp",
5
5
  "description": "HoneyBook client-portal MCP server for Claude",
6
6
  "author": "Claude Code (AI) <https://www.anthropic.com/claude>",
@@ -44,7 +44,7 @@
44
44
  "typecheck": "tsc -p tsconfig.json --noEmit"
45
45
  },
46
46
  "dependencies": {
47
- "@chrischall/mcp-utils": "^0.19.3",
47
+ "@chrischall/mcp-utils": "^0.23.0",
48
48
  "@fetchproxy/bootstrap": "^2.2.0",
49
49
  "@fetchproxy/server": "^2.2.0",
50
50
  "@modelcontextprotocol/sdk": "^1.29.0",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/chrischall/honeybook-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.9.0",
9
+ "version": "0.10.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "honeybook-mcp",
14
- "version": "0.9.0",
14
+ "version": "0.10.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },