Repository navigation
API: operation summaries are names, so every docs title fits in 60 characters - #989
Merged
Merged
Conversation
…tions
52 operation summaries were sentences (up to 103 characters). A summary is the docs page's title
in the browser tab and search results ("<summary> · Nightmail API docs"), the docs sidebar entry
and the SDK's comment, so those 52 docs titles ran past the 60 characters a search result shows
(the worst at 124). Each now has a short name, and its sentence moved word for word to the start
of the operation's description (a new description where it had none), unless the description
already said it (11, listed in the PR). "Password shown once; a billable day starts immediately"
is the first thing createInboxAppPassword's description says.
- Only words: openapi.json is identical apart from operation summaries and descriptions;
check-api-contract reports 0 breaking changes; the regenerated sdk/src/sdk.gen.ts is identical
once comments are removed (TypeScript printer); no MCP tool is added, removed or renamed (244).
- MCP: a tool's description is its summary, then the description's sentences up to 400
characters (mcp-catalog.ts descriptionFor). Where the description now opens with the words the
summary had, descriptionFor says them once instead of twice, so the moved sentences don't
push a later sentence past the 400 (listInboundEndpoints would have lost one). That rule
reaches only the moved operations (at the base only sendFeedback's description opened with its
summary, and it has its own text). 220 of 244 tool descriptions are unchanged; 24 gain the
short name (+553 bytes on a 1.03 MB Code Mode listing). The plain tools/list the 50,000-byte
budget measures is built from resource labels and action notes, not summaries: byte-identical.
- scripts/check-premerge.ts (12, docs/ci.md "Operation summaries") refuses a summary with a full
stop, colon or semicolon followed by more words, or one that makes the docs title longer than
60 characters (39 for a summary), using the app's own docsTitle. It fails all 52 at the base.
Verified: bun run sdk; bun run check (api); check-premerge (passes; against the base openapi.json
it fails exactly these 52); check-api-contract base vs head; VITE_HOME=tv bun run build, longest
docs title 60 characters.
The sentence left the summary in the previous commit, where it showed in the docs title and the sidebar, and became the second sentence of the description. A warning goes first, as for createInboxAppPassword and as docs/ci.md's "Operation summaries" fix says. The MCP tool text is a hand-written override that already says the key is returned once, so agents read the same. Verified: bun run sdk (openapi.json and sdk.gen.ts comment only); check-premerge passes; the ten operations the review judged to carry a warning each open their description with it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 1 of the docs plan. 52 API operation summaries were sentences. A summary is the docs page's title (
<summary> · Nightmail API docs), the sidebar entry and the SDK's comment, so those 52 docs titles ran past the 60 characters a search result shows. Now each summary is a short name. Its sentence moved, word for word, to the start of the operation's description.The three worst titles
After this, the longest docs title is 60 characters.
Only words move
api/openapi.jsonis identical apart from operation summaries and descriptions.check-api-contract(base vs head): 0 breaking changes.sdk/src/sdk.gen.tsis the only generated file that changes. With comments removed by the TypeScript printer, base and head are identical (224,986 characters each), so the non-comment diff is empty.Nothing is lost
createInboxAppPassword's description starts with the warning: "Password shown once; a billable day starts immediately. Grant mail client access to a persistent inbox." The page's search description reads "Create an inbox app password: POST /v1/inboxes/{id}/app-passwords. Password shown once; a billable day starts immediately. …"What agents see
A tool's description is built in
mcp-catalog.tsdescriptionFor: the summary, then the description's sentences, up to 400 characters.listInboundEndpointswould have lost itsaddressIdsentence). At the base, onlysendFeedback's description opened with its summary, and it has its own fixed text. So this reaches only the operations moved here.redeliverInboundMessage's andgetBilling's old summaries; their descriptions say the same.tools/listthat the 50,000-byte budget measures (customer 46,500, operator 48,386) is built from resource labels and action notes, never from operation summaries. Its tools are byte-identical before and after (45,846 bytes for the whole catalog). CI's acceptance run prints both sizes./mcp?codemode=true, not budgeted): 1,033,338 → 1,033,891 bytes (+553).The check
scripts/check-premerge.tsadds a 12th check, explained indocs/ci.mdunder "Operation summaries". It refuses a summary with a full stop, colon or semicolon followed by more words, or one that makes the docs title longer than 60 characters. It measures with the app's owndocsTitle, which allows 39 characters, not the 45 first proposed: the title adds 21 characters (· Nightmail API docs), so 45 would allow titles of 66. The message says to keep a short name and move the sentence to the description, warnings first, then runbun run sdk. Against the base'sopenapi.json, it fails exactly these 52 operations.For the reviewer
descriptionForchange inapi/src/mcp-catalog.ts.check-premerge.ts.Checked
bun run sdk,bun run check(api) andcheck-premergeall pass.check-api-contract, base vs head.buildMcpCatalogandresourceTools.VITE_HOME=tv bun run build: every docs title is 60 characters or fewer.The 52
listAgentsrevokeAgentexchangeAgentSetupTokenstartAgentDeviceAuthorizationlookUpAgentDeviceapproveAgentDevicerestoreRuleVersionsetDecisionOptInscreateEndpointgetEndpointupdateEndpointdeleteEndpointsendEndpointVerificationtestEndpointcreateInboxConnectiongetRuleVersioncheckRulegetRuleTypingslistRuleTemplateslistRuleRecipescreateRuleFromRecipeupdateRuleFromRecipeattachRulesgetRulesapplyRulestestRuleslistInboxFoldersupdateInboxFolderdeleteInboxFolderupdateInboxMessagedeleteInboxMessagemoveInboxMessagecopyInboxMessageexpungeInboxFoldergetInboxChangescreateInboxAppPasswordlistInboxAppPasswordslistAppPasswordsrevokeInboxAppPasswordreleaseRetiredAddresssetInboundAddressFlowcreateInboundThreadupdateInboundThreadgetInboundAttachmentdownloadInboundAttachmentgetInboundOverviewlistInboundEndpointslistInboundEventslistInboundWebhooksredeliverInboundMessagegetOverviewSetupgetBilling