@workover/mcp 0.21.0 → 0.23.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/index.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  // Workover MCP server. Lets Claude Code / any MCP client read, create and propose edits to the
3
3
  // signed-in user's Workover documents, and (with `workover login --site`) set up and publish a hosted
4
- // Workover Help Center. Auth = the token stored by `workover login` (~/.workover/config.json).
4
+ // Workover Help Center, and (with `workover login --support`) set up Workover Support.
5
+ // Auth = the token stored by `workover login` (~/.workover/config.json).
5
6
  // Never publishes to WordPress.
6
7
  // The api caller + tool dispatch live in lib.mjs (injectable for tests); this file just wires reality.
7
8
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
@@ -10,11 +11,29 @@ import {
10
11
  ListToolsRequestSchema,
11
12
  CallToolRequestSchema,
12
13
  } from '@modelcontextprotocol/sdk/types.js';
13
- import { readFileSync } from 'fs';
14
+ import { existsSync, readFileSync, writeFileSync, chmodSync } from 'fs';
14
15
  import { homedir } from 'os';
15
16
  import { join } from 'path';
16
17
  import { MDX_FORMAT_NOTE, makeApi, makeDispatch, validAuth } from './lib.mjs';
17
18
  import { FEEDBACK_INPUT_SCHEMA, FEEDBACK_TOOL_DESCRIPTION } from './feedback.mjs';
19
+ import { SOURCE_TOOL_DEFS } from './support-sources.mjs';
20
+ import { AGENT_TEST_TOOL_DEFS } from './support-agent-tests.mjs';
21
+ import { CONFIG_TOOL_DEFS } from './support-config.mjs';
22
+ import { WALTER_TOOL_DEFS } from './support-walter.mjs';
23
+ import { LABEL_TOOL_DEFS } from './support-labels.mjs';
24
+ import { FEEDBACK_BOARD_TOOL_DEFS } from './feedback-board.mjs';
25
+ import { CONTACTS_TOOL_DEFS } from './contacts.mjs';
26
+ import { DOMAINS_TOOL_DEFS } from './domains.mjs';
27
+ import { EMAIL_STUDIO_TOOL_DEFS } from './email-studio.mjs';
28
+ import { JOURNEYS_TOOL_DEFS } from './journeys.mjs';
29
+ import { FIELD_TOOL_DEFS } from './support-fields.mjs';
30
+ import { INBOX_TOOL_DEFS } from './support-inbox.mjs';
31
+ import { LABEL_RULE_TOOL_DEFS } from './support-label-rules.mjs';
32
+ import { SIGNATURE_TOOL_DEFS } from './support-signatures.mjs';
33
+ import { EMAIL_TOOL_DEFS } from './support-email.mjs';
34
+ import { OUTSIDE_BOT_TOOL_DEFS } from './support-outside-bot.mjs';
35
+ import { OUTCOME_TOOL_DEFS } from './support-outcomes.mjs';
36
+ import { FRESHDESK_TOOL_DEFS } from './support-freshdesk.mjs';
18
37
  import {
19
38
  buildToolCallEvent,
20
39
  sendEvent,
@@ -44,7 +63,20 @@ const auth = loadAuth();
44
63
  const dispatch = (name, args) => {
45
64
  const current = loadAuth();
46
65
  const { api, apiPost } = makeApi({ auth: current ?? { api: '', token: '' } });
47
- return makeDispatch({ auth: current, api, apiPost, readFile: readFileSync, clientInfo })(name, args);
66
+ return makeDispatch({ auth: current, api, apiPost, readFile: readFileSync, supportFiles, clientInfo })(name, args);
67
+ };
68
+
69
+ /**
70
+ * The files the Support setup tools touch: the app's own (to find its framework) and the env file
71
+ * the identity secret is written into, owner read/write only, as the CLI writes it.
72
+ */
73
+ const supportFiles = {
74
+ exists: (p) => existsSync(p),
75
+ read: (p) => readFileSync(p, 'utf8'),
76
+ write: (p, text) => {
77
+ writeFileSync(p, text, { mode: 0o600 });
78
+ chmodSync(p, 0o600);
79
+ },
48
80
  };
49
81
 
50
82
  /** The schema for a document argument. Every tool that names a document takes all three forms. */
@@ -643,11 +675,219 @@ const SITE_TOOLS = [
643
675
  },
644
676
  ];
645
677
 
678
+ const WORKSPACE_ARG = {
679
+ type: ['string', 'number'],
680
+ description:
681
+ 'The workspace, by slug or id. Needed only when the account has more than one (workover whoami lists them).',
682
+ };
683
+
684
+ const SUPPORT_SCOPE_NOTE =
685
+ ' Needs a token from `workover login --support` (the person approves "Set up Workover Support" in the browser); without it this returns a permission error naming that command.';
686
+
687
+ /**
688
+ * Agent-first Support setup (WO-1752, S43), mirroring `workover support ...` (support-setup.mjs holds
689
+ * the logic both share). Each answers with the checklist, so the next step is always in the result,
690
+ * and the person can watch "Your agent is setting up Support" tick in the app. The Support tools for
691
+ * conversations, contacts and feedback (S21c) share the `workover_support_` prefix.
692
+ */
693
+ const SUPPORT_TOOLS = [
694
+ {
695
+ name: 'workover_support_status',
696
+ description:
697
+ "Support's setup checklist for the workspace: connect agent, analyze app, configure, install the Messenger, send a test, confirm it arrived, go live. Each step's state, who did it, and the next one, with Support's current settings. Call it first: it also marks you connected on the person's live checklist." +
698
+ SUPPORT_SCOPE_NOTE,
699
+ inputSchema: { type: 'object', properties: { workspace: WORKSPACE_ARG } },
700
+ },
701
+ {
702
+ name: 'workover_support_setup',
703
+ description:
704
+ 'Turn Support on and configure it in one call. Plain settings are set; origins, topics and projectIds are ADDED to what Support has and never remove anything. Safe to repeat: the result says what changed, and nothing does on a re-run. Set enabled: true only once the snippet is installed and the test arrived, and after asking the person: it switches the Messenger on for their visitors.' +
705
+ SUPPORT_SCOPE_NOTE,
706
+ inputSchema: {
707
+ type: 'object',
708
+ properties: {
709
+ workspace: WORKSPACE_ARG,
710
+ name: { type: 'string', description: 'What the Messenger is called on the site (the brand).' },
711
+ color: { type: 'string', description: 'The brand color, #rrggbb.' },
712
+ greeting: { type: 'string', description: 'The first line visitors see, such as "Hi there".' },
713
+ origins: {
714
+ type: 'array',
715
+ items: { type: 'string' },
716
+ description:
717
+ 'Sites the Messenger may appear on, as origins: https://example.com, https://*.example.com, or http://localhost:3000 for development. Added, never replacing.',
718
+ },
719
+ topics: {
720
+ type: 'array',
721
+ items: { type: 'string' },
722
+ description: 'Buttons offered before a chat starts ("Billing", "Report a bug"), five at most. Added.',
723
+ },
724
+ projectIds: {
725
+ type: 'array',
726
+ items: { type: 'number' },
727
+ description: 'Documentation projects the AI agent answers from (workover_list_projects). Added.',
728
+ },
729
+ hours: {
730
+ type: 'object',
731
+ description:
732
+ 'Office hours: { tz: "America/New_York", days: { mon: [540, 1020], ... } }, minutes after midnight. A day left out is closed. null for always open.',
733
+ },
734
+ agentEnabled: { type: 'boolean', description: 'Whether the AI agent answers visitors from the docs.' },
735
+ enabled: { type: 'boolean', description: 'Switch the Messenger on (go live) or off. Ask the person first.' },
736
+ },
737
+ },
738
+ },
739
+ {
740
+ name: 'workover_support_report_step',
741
+ description:
742
+ "Record a setup step only you can see, so the person's live checklist ticks: analyze_app (detail: what the app is built with, e.g. \"Next.js App Router\") or install_snippet (detail: the file you changed). Workover checks every other step itself." +
743
+ SUPPORT_SCOPE_NOTE,
744
+ inputSchema: {
745
+ type: 'object',
746
+ properties: {
747
+ workspace: WORKSPACE_ARG,
748
+ step: { type: 'string', enum: ['analyze_app', 'install_snippet'] },
749
+ detail: { type: 'string', description: 'One line: what you found, or where the snippet went.' },
750
+ failed: { type: 'boolean', description: 'true when the step could not be done.' },
751
+ },
752
+ required: ['step'],
753
+ },
754
+ },
755
+ {
756
+ name: 'workover_support_install',
757
+ description:
758
+ "The code that adds the Messenger to the person's app, for its framework (Next.js App or Pages Router, React, plain HTML, WordPress), found from the files in dir or named in framework; and the server code that signs who is signed in. Add both to the app yourself, then workover_support_report_step install_snippet." +
759
+ SUPPORT_SCOPE_NOTE,
760
+ inputSchema: {
761
+ type: 'object',
762
+ properties: {
763
+ workspace: WORKSPACE_ARG,
764
+ dir: { type: 'string', description: "The app's folder on disk, to find its framework." },
765
+ framework: { type: 'string', enum: ['nextjs-app', 'nextjs-pages', 'react', 'html', 'wordpress'] },
766
+ },
767
+ },
768
+ },
769
+ {
770
+ name: 'workover_support_identity_secret',
771
+ description:
772
+ "Create Support's identity secret and write it into the app's server env file (as WORKOVER_SUPPORT_IDENTITY_SECRET unless varName says otherwise). The secret is never returned to you. An existing secret is kept unless rotate is true, since the site may already sign with it." +
773
+ SUPPORT_SCOPE_NOTE,
774
+ inputSchema: {
775
+ type: 'object',
776
+ properties: {
777
+ workspace: WORKSPACE_ARG,
778
+ envFile: { type: 'string', description: 'The env file on disk, such as /path/to/app/.env.local.' },
779
+ varName: { type: 'string' },
780
+ rotate: { type: 'boolean', description: 'Replace an existing secret. The old one stops working at once.' },
781
+ },
782
+ required: ['envFile'],
783
+ },
784
+ },
785
+ {
786
+ name: 'workover_support_test',
787
+ description:
788
+ 'Send a test conversation into the Support inbox and confirm it arrived. Works before the Messenger is switched on. One per workspace: repeating it finds the first.' +
789
+ SUPPORT_SCOPE_NOTE,
790
+ inputSchema: { type: 'object', properties: { workspace: WORKSPACE_ARG } },
791
+ },
792
+ {
793
+ name: 'workover_support_notifications',
794
+ description:
795
+ "Read, or change, the signed-in person's own Support notification switches (theirs in every workspace, never anyone else's): which events reach them (newConversation, handoff, assigned, mention) and where (inApp, email, slack, push). Call with no switches to read them; pass only the switches to change. Safe to repeat: the result says what changed. Email and push also follow the person's general switches, which this does not change." +
796
+ SUPPORT_SCOPE_NOTE,
797
+ inputSchema: {
798
+ type: 'object',
799
+ properties: {
800
+ newConversation: { type: 'boolean', description: 'A visitor started a conversation nobody is answering (owners and admins hear).' },
801
+ handoff: { type: 'boolean', description: 'Walter AI or a visitor asked for a person.' },
802
+ assigned: { type: 'boolean', description: 'A teammate assigned a conversation to them.' },
803
+ mention: { type: 'boolean', description: 'A teammate @mentioned them in an internal note.' },
804
+ inApp: { type: 'boolean', description: 'In the Workover Inbox, with the bell.' },
805
+ email: { type: 'boolean', description: 'An email for each one.' },
806
+ slack: { type: 'boolean', description: 'A Slack direct message, when the workspace is connected to Slack.' },
807
+ push: { type: 'boolean', description: 'A push notification on the Workover phone app.' },
808
+ },
809
+ additionalProperties: false,
810
+ },
811
+ },
812
+ // Walter AI's sources (WO-1752, S06b), from support-sources.mjs.
813
+ ...SOURCE_TOOL_DEFS,
814
+ // Walter AI's batch test and releases (WO-1752, S06c), from support-agent-tests.mjs.
815
+ ...AGENT_TEST_TOOL_DEFS,
816
+ // The Messenger's settings through the editor's draft (WO-1752, S46), from support-config.mjs.
817
+ ...CONFIG_TOOL_DEFS,
818
+ // Walter AI: Basics, its draft, the preview and the Deploy checklist (WO-1752, S57), from support-walter.mjs.
819
+ ...WALTER_TOOL_DEFS,
820
+ // Support settings > Labels (WO-1752, S63), from support-labels.mjs.
821
+ ...LABEL_TOOL_DEFS,
822
+ // Feedback's posts: list, read, post, vote and move a status (WO-1752, round 3), from feedback-board.mjs.
823
+ ...FEEDBACK_BOARD_TOOL_DEFS,
824
+ // Contacts: stored people, their typed attributes and the workspace's server API keys (WO-1752), from contacts.mjs.
825
+ ...CONTACTS_TOOL_DEFS,
826
+ // Sending domains and addresses: DNS records, checks and the records page (WO-1752), from domains.mjs.
827
+ ...DOMAINS_TOOL_DEFS,
828
+ // Contacts journeys: triggers, waits and emails on stored contacts (WO-1752), from journeys.mjs.
829
+ ...JOURNEYS_TOOL_DEFS,
830
+ // Emails designed in blocks: the catalog, the compiled template and a strict preview (WO-1752), from email-studio.mjs.
831
+ ...EMAIL_STUDIO_TOOL_DEFS,
832
+ // Support settings > Conversation fields (WO-1752, S38), from support-fields.mjs.
833
+ ...FIELD_TOOL_DEFS,
834
+ // Reply targets, auto-assignment and availability (WO-1752, S08), from support-inbox.mjs.
835
+ ...INBOX_TOOL_DEFS,
836
+ // When the AI adds each label (WO-1752, S09), from support-label-rules.mjs.
837
+ ...LABEL_RULE_TOOL_DEFS,
838
+ // Email signatures, the brand's and the person's own (WO-1752, S10b), from support-signatures.mjs.
839
+ ...SIGNATURE_TOOL_DEFS,
840
+ // Email follow-ups, Support settings > Email (WO-1752, real widths M3), from support-email.mjs.
841
+ ...EMAIL_TOOL_DEFS,
842
+ // An outside bot such as RC Brain that answers visitors first (WO-1752, S14), from support-outside-bot.mjs.
843
+ ...OUTSIDE_BOT_TOOL_DEFS,
844
+ // Walter AI's outcome ledger and fair-use usage (WO-1752, S65), from support-outcomes.mjs.
845
+ ...OUTCOME_TOOL_DEFS,
846
+ // Freshdesk escalation setup (WO-1752, S18), from support-freshdesk.mjs.
847
+ ...FRESHDESK_TOOL_DEFS,
848
+ {
849
+ name: 'workover_support_home',
850
+ description:
851
+ "The look of the chat's Home screen: the logo, the AI agent's picture, up to six team faces, the agent's typing intro, and the contrast-safe inks worked out from the brand color. With no other argument it reads them; anything given is set, and the same values again change nothing. Pictures given as addresses must be https and on one of Support's sites or a known photo host (allowedHosts in the answer); to upload a file use `workover support home --upload <file> --slot <slot>` in a terminal." +
852
+ SUPPORT_SCOPE_NOTE,
853
+ inputSchema: {
854
+ type: 'object',
855
+ properties: {
856
+ workspace: WORKSPACE_ARG,
857
+ logoUrl: { type: ['string', 'null'], description: 'https address of the logo shown at the top of Home; null removes it.' },
858
+ botAvatarUrl: { type: ['string', 'null'], description: "https address of the AI agent's picture; null removes it." },
859
+ typingIntro: { type: 'boolean', description: 'Show the agent typing for a moment before its greeting in a new conversation.' },
860
+ showFaces: { type: 'boolean', description: 'Show the team faces at the top of Home.' },
861
+ faces: {
862
+ type: 'array',
863
+ maxItems: 6,
864
+ description: 'Replaces the team faces, in order. Keep an uploaded photo with its photoId (the id of the face photo in the answer).',
865
+ items: {
866
+ type: 'object',
867
+ properties: { name: { type: 'string' }, photoUrl: { type: 'string' }, photoId: { type: 'string' } },
868
+ required: ['name'],
869
+ },
870
+ },
871
+ },
872
+ },
873
+ },
874
+ {
875
+ name: 'workover_support_thread',
876
+ description:
877
+ 'How closed Support conversations behave. With closedStaysClosed true, a visitor writing to a closed conversation starts a new one and the closed one stays closed; false (the default) reopens it. Without closedStaysClosed it only reads the setting. Safe to repeat: setting the value it already has changes nothing.' +
878
+ SUPPORT_SCOPE_NOTE,
879
+ inputSchema: {
880
+ type: 'object',
881
+ properties: { workspace: WORKSPACE_ARG, closedStaysClosed: { type: 'boolean' } },
882
+ },
883
+ },
884
+ ];
885
+
646
886
  const telemetry = telemetryEnabled(process.env, { auth });
647
887
  // Keep in step with package.json. It is what every telemetry event is stamped with, so a stale
648
888
  // value here does not break anything — it quietly attributes this release's behaviour to an older
649
889
  // one, which is worse, because the numbers still look fine.
650
- const VERSION = '0.21.0';
890
+ const VERSION = '0.23.0';
651
891
 
652
892
  /** This release and the connected client, stamped on a feedback report (see feedback.mjs). */
653
893
  function clientInfo() {
@@ -699,6 +939,119 @@ workover_publish_site, workover_unpublish_site, workover_proxy_setup, workover_s
699
939
  DNS records, give the person every one of them exactly as printed: adding them at the DNS provider
700
940
  is their step, as payment is.
701
941
 
942
+ Support setup (workover_support_status, workover_support_setup, workover_support_report_step,
943
+ workover_support_install, workover_support_identity_secret, workover_support_test,
944
+ workover_support_notifications, workover_support_home, workover_support_thread) needs a token
945
+ from \`workover login --support\`, as do the AI agent's sources (workover_support_sources,
946
+ workover_support_add_source, workover_support_update_source, workover_support_sync_source,
947
+ workover_support_remove_source), its batch test and releases (workover_support_agent_releases,
948
+ workover_support_agent_set_live, workover_support_agent_rollback, workover_support_agent_tests,
949
+ workover_support_agent_add_tests, workover_support_agent_generate_tests,
950
+ workover_support_agent_remove_test, workover_support_agent_run_tests,
951
+ workover_support_agent_test_run, workover_support_agent_rate_result), the Messenger's settings draft (workover_support_config,
952
+ workover_support_config_publish, workover_support_config_discard), its labels
953
+ (workover_support_labels, workover_support_create_label, workover_support_update_label,
954
+ workover_support_merge_labels), its custom conversation fields (workover_support_fields,
955
+ workover_support_set_field, workover_support_remove_field, workover_support_order_fields,
956
+ workover_support_conversation_fields, workover_support_set_conversation_fields), the label AI rules (workover_support_label_rules,
957
+ workover_support_set_label_rule, workover_support_remove_label_rule), the inbox rules
958
+ (workover_support_sla, workover_support_assignment, workover_support_availability), the email
959
+ signatures (workover_support_signatures, workover_support_set_signature,
960
+ workover_support_preview_signature), the email follow-ups that send a visitor the replies they
961
+ missed (workover_support_email, workover_support_set_email, workover_support_do_not_email,
962
+ workover_support_test_email), the sending domains Support emails from, with their DNS records,
963
+ forwarding of a brand's own mailbox and a test email (workover_support_email_domains,
964
+ workover_support_email_domain), the outside bot that answers visitors first
965
+ (workover_support_outside_bot, workover_support_set_outside_bot,
966
+ workover_support_check_outside_bot), Walter AI's outcome ledger (workover_support_outcomes,
967
+ workover_support_outcome_mark, workover_support_outcome_usage) and Freshdesk escalation (workover_support_freshdesk,
968
+ workover_support_set_freshdesk, workover_support_check_freshdesk,
969
+ workover_support_remove_freshdesk; going live is the person's call). Start with workover_support_status and follow its next step; ask
970
+ the person before going live (enabled: true).
971
+
972
+ Feedback (the team's board of feature requests, not a report about Workover itself): list posts
973
+ (workover_feedback_posts, sorted by votes, newest, weighted by who asked, or trending), read one with
974
+ its voters and updates (workover_feedback_post), post a request (workover_feedback_create_post; look
975
+ for the same request first and vote instead), vote (workover_feedback_vote), and move a status
976
+ (workover_feedback_set_status). Moving to Planned, In progress or Shipped tells the voters: run it
977
+ with preview: true first, show the person who would be told and the words, and move it when they agree.
978
+
979
+ Contacts (the people a workspace keeps, by external id and email, with typed attributes; needs
980
+ \`workover login --contacts\`): list and search them (workover_contacts_list), read one with its
981
+ attributes (workover_contacts_get), create or update them from a list or a JSON or CSV file
982
+ (workover_contacts_identify; safe to repeat), the attribute definitions (workover_contacts_attributes,
983
+ workover_contacts_define_attribute, workover_contacts_update_attribute to rename, archive or restore),
984
+ and the workspace's server API keys for POST /v1/contacts/identify (workover_contacts_keys,
985
+ workover_contacts_create_key: hand the secret to the person, never write it to a file;
986
+ workover_contacts_revoke_key: ask first). Events (what a person did, such as order.completed): send
987
+ them from a list or a JSON or CSV file (workover_contacts_track; an event for someone not yet a
988
+ contact is kept anonymous for 30 days and attached when they are identified; give each an id so a
989
+ retry records nothing twice), read one contact's (workover_contacts_events), and the names seen
990
+ (workover_contacts_event_names, workover_contacts_update_event_name to rename, archive or restore).
991
+ Segments group contacts (workover_contacts_segments, workover_contacts_segment): a dynamic one is a
992
+ definition of rules on attributes, built-in fields, events and other segments that Workover keeps
993
+ current; a manual one is a list. Preview a definition before saving it and tell the person the count
994
+ (workover_contacts_segment_preview), then workover_contacts_segment_create or
995
+ workover_contacts_segment_update (also to archive or restore). Read the members
996
+ (workover_contacts_segment_members; workover_contacts_list takes a segment too), add to or remove
997
+ from a manual one (workover_contacts_segment_add, workover_contacts_segment_remove), and export CSV
998
+ to a new file only where the person asked (workover_contacts_export; it is personal data).
999
+ Email topics are what a workspace emails about (workover_contacts_topics): opt_in ones reach only
1000
+ people who said yes, opt_out ones everyone until they say no. Create and change them with
1001
+ workover_contacts_topic_create, workover_contacts_topic_update (also archive or restore) and
1002
+ workover_contacts_topics_reorder. Read a contact's subscriptions (workover_contacts_subscriptions)
1003
+ and their append-only consent log (workover_contacts_consent); change them only when the person
1004
+ asked (workover_contacts_set_subscriptions; logged with you as the actor). A preference link
1005
+ (workover_contacts_preferences_link) is that contact's credential: give it only to them.
1006
+ workover_contacts_reset_preference_links breaks every link already sent: ask first. Nothing here
1007
+ sends email.
1008
+ Writes and exports are for owners and admins.
1009
+
1010
+ Journeys (the same \`workover login --contacts\` token) move contacts through waits and emails after
1011
+ a trigger: entering a segment, an event, or an attribute change. List them (workover_journeys_list),
1012
+ read one (workover_journeys_get), create a draft (workover_journeys_create) and change it
1013
+ (workover_journeys_update). Publishing starts email to real people: call workover_journeys_publish
1014
+ WITHOUT confirm first, show the person the impact sentence, and call it again with confirm: true
1015
+ only after they say yes. Pause (workover_journeys_pause) holds everyone; resume
1016
+ (workover_journeys_resume) continues them; archive (workover_journeys_archive) ends every run, so
1017
+ ask first. workover_journeys_test sends one email step to the signed-in person;
1018
+ workover_journeys_report and workover_journeys_runs show how it is doing.
1019
+
1020
+ Sending domains (the domains a workspace sends email from; the same \`workover login --contacts\`
1021
+ token): list them (workover_domains_list) and read one with each DNS record and what the last check
1022
+ found (workover_domains_get). To set one up end to end: workover_domains_add answers every record
1023
+ the domain needs, with the full name and the name relative to its zone; apply each required record
1024
+ at the DNS host through its API, or hand them to whoever runs the DNS (workover_domains_records as
1025
+ bind, text or json; workover_domains_share for a read-only page they open without an account); then
1026
+ workover_domains_check. DNS can take up to an hour: while it is pending, tell the person and check
1027
+ again later rather than in a loop (Workover checks by itself every 15 minutes for 72 hours, then
1028
+ hourly, and fails it after 7 days). Then the addresses it sends from (workover_domains_addresses,
1029
+ workover_domains_address_add with the From name, workover_domains_address_update,
1030
+ workover_domains_address_default, workover_domains_address_remove). Adding again is safe. Removing a
1031
+ domain (workover_domains_remove) and resetting its records link stop things working: ask first.
1032
+ Nothing here sends email.
1033
+
1034
+ Emails designed in blocks (the same \`workover login --contacts\` token): read
1035
+ workover_email_blocks first (each block, what it takes, an example; \`type\` for one in full,
1036
+ \`schema: true\` for the JSON Schema), write the document, then workover_email_render to compile it
1037
+ (a mistake names the JSON pointer of the block and property to fix) and workover_email_preview to
1038
+ see it filled for a contact or sample data (strict: an unknown merge tag is refused with its
1039
+ pointer; \`imagesBlocked: true\` shows it with images blocked). workover_email_check answers whether
1040
+ it is ready to send (each QA check with its pointer, and a score): fix every failure before a send.
1041
+ workover_email_test sends it to you (never to the contact), filled for a contact. Render, preview
1042
+ and check save and send nothing. A journey's email step takes the same document as \`blocks\` in
1043
+ place of \`body\`. workover_email_import brings a Customer.io email across as a NEW draft (try
1044
+ \`dryRun: true\` first and read its report: what was kept as raw HTML or left out, by pointer and
1045
+ source line; the email links to the workspace's brand kit); workover_email_templates lists the
1046
+ emails, or reads one with \`id\` (its draft and revision). workover_email_save creates an email or
1047
+ saves its draft with the revision read; workover_email_publish publishes the draft as the next
1048
+ version once its check passes; workover_email_versions lists the versions and restores one into
1049
+ the draft. workover_email_layouts manages layouts: HTML with {{ content }} once, where a note's
1050
+ HTML blocks go, as Customer.io's rich-text emails are; an import links a rich-text email to the
1051
+ workspace's layout with the same HTML. workover_email_brand_kit reads the brand kit every email is drawn
1052
+ with (tokens by 12-character id, text styles, buttons), and saves the whole kit with the
1053
+ \`version\` read; an email uses a kit token as \`{"token": "colors.<name>_<id>"}\`.
1054
+
702
1055
  When a Workover tool here cannot do what the task needs, gets it wrong, or makes you work around
703
1056
  it, call workover_report_feedback with what you wanted and the fix you would make. It reaches the
704
1057
  Workover team as an issue. Never put the person's document text or any secret in it.`;
@@ -708,7 +1061,7 @@ const server = new Server(
708
1061
  { capabilities: { tools: {} }, instructions: INSTRUCTIONS },
709
1062
  );
710
1063
 
711
- server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [...TOOLS, ...SITE_TOOLS] }));
1064
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [...TOOLS, ...SITE_TOOLS, ...SUPPORT_TOOLS] }));
712
1065
 
713
1066
  /**
714
1067
  * Which tools agents reach for, and where they fail.