From 4d97cca6c6f8e1b02adb7d8b7ee9653f4eca5dfe Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Wed, 18 Nov 2026 17:23:56 -0800 Subject: [PATCH 1/2] deps: bump github.com/basecamp/mcp to 2026-11-18, titling each domain The toolkit's August pin was 50 commits behind. Since then the catalog refuses a domain without a title, which connector directories require on every tool, so each of hey mcp's domains gets one. go-sdk moves to the pseudo-version the toolkit builds on, and the Nix vendorHash follows go.sum. --- go.mod | 4 ++-- go.sum | 8 ++++---- internal/mcpserver/domains.go | 11 +++++++++-- nix/package.nix | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 8cc58a26..04ace1c4 100644 --- a/go.mod +++ b/go.mod @@ -11,13 +11,13 @@ require ( charm.land/lipgloss/v2 v2.0.6 github.com/basecamp/actioncable-client/go/v2 v2.0.2 github.com/basecamp/hey-sdk/go v0.35.0 - github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d + github.com/basecamp/mcp v0.0.0-20261118214004-663b2e5d2836 github.com/charmbracelet/x/ansi v0.11.9 github.com/fsnotify/fsnotify v1.10.1 github.com/gofrs/flock v0.13.2 github.com/itchyny/gojq v0.12.20 github.com/mattn/go-runewidth v0.0.31 - github.com/modelcontextprotocol/go-sdk v1.8.0 + github.com/modelcontextprotocol/go-sdk v1.8.1-0.20261014132652-7c486efa8223 github.com/rivo/uniseg v0.4.7 github.com/sigstore/sigstore-go v1.4.0 github.com/spf13/cobra v1.10.2 diff --git a/go.sum b/go.sum index 5cf2d796..b908f169 100644 --- a/go.sum +++ b/go.sum @@ -93,8 +93,8 @@ github.com/basecamp/actioncable-client/go/v2 v2.0.2 h1:h2Sl15gj2lI/EX5E0EUxjyYgf github.com/basecamp/actioncable-client/go/v2 v2.0.2/go.mod h1:3Y0N9V5LXclT5nQWcPhq/+6rj4eKXgKAX8dx15X8yB8= github.com/basecamp/hey-sdk/go v0.35.0 h1:gV9Y8JweijV8vKeIQvkYj1Kk+liq3iuJNoOnUgVD4BA= github.com/basecamp/hey-sdk/go v0.35.0/go.mod h1:ILC2upnVketSzbZTcN1iICeCpjCqvYpIflYcEVrgigw= -github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d h1:zEQVGq1x1nhKMZ2TudFAcSJ32CHT8richI1vQakIKz4= -github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d/go.mod h1:Ee2c/q1/pg+5T5741PIuA3s6VJMQC7I0XBNXIHIujzA= +github.com/basecamp/mcp v0.0.0-20261118214004-663b2e5d2836 h1:ND4te8b+HVFFrgcm7+n8P83MKKPqBpIyoJ63tT9liRU= +github.com/basecamp/mcp v0.0.0-20261118214004-663b2e5d2836/go.mod h1:K3sgTH90CIR6Ed0XPnivIBqNIpw6aeOlcXThBrZ+2gc= github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= @@ -287,8 +287,8 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modelcontextprotocol/go-sdk v1.8.0 h1:KIvahhYqwtbeniWVPs3TcXEA7b8jEtwfBpOTAI+Urx4= -github.com/modelcontextprotocol/go-sdk v1.8.0/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= +github.com/modelcontextprotocol/go-sdk v1.8.1-0.20261014132652-7c486efa8223 h1:THyv0oM2i7h3ezGwwXWCOqwsh/C2rUTabh+ukQCiClE= +github.com/modelcontextprotocol/go-sdk v1.8.1-0.20261014132652-7c486efa8223/go.mod h1:dL7u98E/zjJTGzEq+j30jQ8K2k1mb6LeAH4inEcSGts= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0A= diff --git a/internal/mcpserver/domains.go b/internal/mcpserver/domains.go index 75f5f711..2b551c5f 100644 --- a/internal/mcpserver/domains.go +++ b/internal/mcpserver/domains.go @@ -18,38 +18,45 @@ import ( // is a one-line change here plus a snapshot refresh. var DomainSpecs = []catalog.DomainSpec{ { - Key: "boxes", - Tags: []string{"Boxes"}, + Key: "boxes", + Title: "HEY Boxes", + Tags: []string{"Boxes"}, Blurb: "HEY mail boxes: the Imbox, The Feed, the Paper Trail, Reply Later, Set Aside and Bubble Up, box groups and designations, and incremental posting changes. " + boxPaging, }, { Key: "search", + Title: "HEY Search", Tags: []string{"Search"}, Blurb: "Search HEY mail: advanced search with the same refinements the search page offers.", }, { Key: "threads", + Title: "HEY Threads", Tags: []string{"Topics", "Entries", "Messages"}, Blurb: "HEY email threads: topics and their entries, renaming a thread, full message content, replies and forwards, drafts, and triage (trash, spam, restore, move). create_message, create_reply and update_message only ever save drafts: they never send or schedule mail, and a request to send, schedule or triage in the same call is refused. Updating a scheduled draft clears its schedule. The person can have a draft shown or revised as they like, and sends it with one press of their own: from its page in HEY (app_url), with `hey draft send `, or on a confirmation this assistant asks for, where it can. Each draft save's note says which this client has.", }, { Key: "contacts", + Title: "HEY Contacts & Screener", Tags: []string{"Contacts"}, Blurb: "HEY contacts and The Screener: contact records and notes, bundling, and clearance (screening) decisions.", }, { Key: "todos", + Title: "HEY Calendar To-dos", Tags: []string{"Calendar Todos"}, Blurb: "HEY Calendar to-dos: create, update, complete, uncomplete, and delete. Read existing to-dos through the calendar domain's get_calendar_recordings.", }, { Key: "calendar", + Title: "HEY Calendars", Tags: []string{"Calendars"}, Blurb: "HEY Calendars: list calendars, read their recordings (to-dos and events — the to-do read path), and toggle calendar visibility.", }, { Key: "identity", + Title: "HEY Identity", Tags: []string{"Identity"}, Blurb: "Your HEY identity: accounts, senders, and preferences — the acting_sender_id and acting_user_id lookups that replies and contact writes ask for.", }, diff --git a/nix/package.nix b/nix/package.nix index 4a4cdd97..c4dfb2eb 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -18,7 +18,7 @@ buildGoModule.override { inherit go; } (finalAttrs: { # To update: run `make update-nix-hash` (Docker). It rewrites this quoted # value in place, so keep it a string literal rather than lib.fakeHash. - vendorHash = "sha256-eoXYLU8rnusqti2qAtNhIr175ab+MxAQORkn6Kn9AK0="; + vendorHash = "sha256-Ar/FktmqlSCvtrkCwy6zDMpHygeCFPozGzlHjB4kHzQ="; subPackages = [ "cmd/hey" ]; From 522f4d4ca0b0be17081b97ac9e83e1669e9692c3 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Wed, 18 Nov 2026 17:38:11 -0800 Subject: [PATCH 2/2] Describe no wire pagination or retry policy to MCP clients The toolkit's describe now serves each operation's HTTP pagination and retry policy from the model. Neither is how a client talks to hey mcp: a paged read answers its next page as a cursor in the result, never as the Link or X-Total-Count headers the model describes, and every write goes out once, so a client that followed a write's retry policy could save a draft or toggle a calendar twice. Paginated stays, saying a read has more pages. --- internal/mcpserver/catalog.go | 23 +++++++++++++++++++- internal/mcpserver/drafts_test.go | 36 +++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/internal/mcpserver/catalog.go b/internal/mcpserver/catalog.go index b4d2f1fa..8b796666 100644 --- a/internal/mcpserver/catalog.go +++ b/internal/mcpserver/catalog.go @@ -30,9 +30,30 @@ func loadCatalog(readOnly bool) (*catalog.Catalog, error) { if err != nil { return nil, fmt.Errorf("embedded model: %w", err) } - return catalog.Load(catalog.Spec{ + cat, err := catalog.Load(catalog.Spec{ ToolPrefix: "hey_", Domains: domainSpecs(readOnly), Model: model, }) + if err != nil { + return nil, err + } + hideWireMechanics(cat) + return cat, nil +} + +// hideWireMechanics drops each operation's HTTP pagination and retry policy +// from what describe serves. They are how this server talks to HEY, not how a +// client talks to it: a paged read answers its next page as a cursor in the +// result (dispatch.go), never as the Link or X-Total-Count headers the model +// describes, and every write goes out once (the CLI's single-shot client), so +// a client that followed a write's retry policy could save or toggle twice. +// Paginated stays: it says a read has more pages. +func hideWireMechanics(cat *catalog.Catalog) { + for _, d := range cat.Domains { + for _, op := range d.Operations { + op.Pagination = nil + op.Retry = nil + } + } } diff --git a/internal/mcpserver/drafts_test.go b/internal/mcpserver/drafts_test.go index a20d1b71..c39da3b2 100644 --- a/internal/mcpserver/drafts_test.go +++ b/internal/mcpserver/drafts_test.go @@ -498,3 +498,39 @@ func TestEveryServedOpenWorldOperationIsDraftFirst(t *testing.T) { } } } + +// describe serves what a client can use. A paged read answers its next page as +// a cursor in the result, not the Link or X-Total-Count headers HEY's wire +// uses, and writes go out once, so neither HTTP pagination nor a retry policy +// is described. +func TestDescribeServesNoWireMechanics(t *testing.T) { + _, session := connect(t, &fakeAPI{}, Config{}) + for tool, actions := range map[string][]string{ + "hey_contacts": {"list_contacts"}, + "hey_threads": {"create_message", "update_message"}, + "hey_calendar": {"toggle_calendar"}, + } { + for _, action := range actions { + t.Run(action, func(t *testing.T) { + text, isError := mcptest.CallText(t, session, tool, map[string]any{ + "action": "describe", "params": map[string]any{"action": action}, + }) + if isError { + t.Fatal(text) + } + var op map[string]any + if err := json.Unmarshal([]byte(text), &op); err != nil { + t.Fatalf("describe %s: %v", action, err) + } + for _, key := range []string{"pagination", "retry"} { + if _, ok := op[key]; ok { + t.Errorf("describe %s serves %s: %v", action, key, op[key]) + } + } + if strings.Contains(text, "X-Total-Count") { + t.Errorf("describe %s names a header the result never carries", action) + } + }) + } + } +}