Skip to content

Add MCP tool annotations; make the safety banner honest about Notes#6

Merged
conorbronsdon merged 1 commit into
mainfrom
annotations-and-honest-readme
Jun 12, 2026
Merged

Add MCP tool annotations; make the safety banner honest about Notes#6
conorbronsdon merged 1 commit into
mainfrom
annotations-and-honest-readme

Conversation

@conorbronsdon

Copy link
Copy Markdown
Owner

Summary

  • Issue Add readOnlyHint/destructiveHint annotations to tools #4 — annotations. Every tool now declares MCP annotations via a new src/annotations.ts registry mirroring the gws-mcp-server v0.2.0 pattern: 6 reads (readOnlyHint: true), 3 additive writes (readOnlyHint: false), and the two Note tools (readOnlyHint: false, openWorldHint: true — they publish public content immediately). No destructive tools exist (verified: no delete endpoints in the client). server.ts migrated from deprecated server.tool to registerTool with annotations attached.
  • Issue README 'cannot publish' banner conflicts with create_note (which publishes immediately) #3 — honest README. The "cannot publish" banner now scopes the guarantee to long-form posts and calls out the Notes exception loudly. Write table split into additive writes vs immediate publishes. package.json/server.json descriptions fixed too. Note tool descriptions now say "PUBLISHES IMMEDIATELY" with the no-draft-state, no-undo caveat.
  • Tests. New annotations.test.ts: mapping unit tests, completeness test (registered tool set must equal classification registry), no-destructive guard, and a description regex guard on the Note tools. 90 tests green; lint and build clean.
  • Version. 0.2.2 → 0.3.0 (minor), synced across package.json, server.json (both version fields), the McpServer version string, and the client User-Agent.

Verified over the wire: server boots on stdio and tools/list returns the expected annotations for all 11 tools.

Closes #4
Closes #3

🤖 Generated with Claude Code

Mirrors the gws-mcp-server v0.2.0 annotations pattern:

- New src/annotations.ts: exhaustive tool-name -> side-effect-class
  registry (read / additive-write / publish) and buildAnnotations().
  Reads get readOnlyHint:true; draft/upload writes readOnlyHint:false;
  create_note and create_note_with_link additionally carry
  openWorldHint:true because they publish public content immediately.
  No destructive tools exist (no deletes) -- verified, documented.
- server.ts: migrate to registerTool with annotations attached; Note
  tool descriptions now say PUBLISHES IMMEDIATELY loudly (no draft
  state, no undo from this server).
- New annotations.test.ts: mapping unit tests + completeness test
  (registered tool set must equal the classification registry, so new
  tools cannot ship unclassified) + description guard for the Note
  tools. 90 tests green.
- README: scope the 'Safe by design' banner to long-form posts and
  call out the Notes exception explicitly; split the Write table into
  additive writes vs immediate publishes; annotations one-liner.
  package.json/server.json descriptions no longer claim a blanket
  'cannot publish'.
- Version 0.2.2 -> 0.3.0 (minor: new annotation surface), synced in
  package.json, server.json (both fields), McpServer version string,
  and the client User-Agent.

Closes #4
Closes #3

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@conorbronsdon conorbronsdon merged commit 6ad9f15 into main Jun 12, 2026
2 checks passed
@conorbronsdon conorbronsdon deleted the annotations-and-honest-readme branch June 12, 2026 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add readOnlyHint/destructiveHint annotations to tools README 'cannot publish' banner conflicts with create_note (which publishes immediately)

1 participant