Commit 4181fcc
Rewrite
Restructure the document: action-oriented H1, Imports section,
section-opener concept links to the MCP overview docs (not the
specification), inline example-file references instead of `> [!NOTE]`
callouts, and a trailing "See also" section with cross-links plus an
"Additional examples" table.
New sections: Imports, Disconnecting (`terminateSession()` + `close()`),
Subscribing to resource changes
(`subscribeResource`/`unsubscribeResource`), Roots (`roots/list`
handler, `sendRootsListChanged()`), Error handling (tool errors vs
protocol errors, connection lifecycle callbacks, timeouts), and
`setLoggingLevel()` folded into Notifications.
All new code examples are type-checked regions in
`clientGuide.examples.ts` and synced via `pnpm sync:snippets`.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>docs/client.md as a code-heavy, prose-light how-to guide1 parent d30eef9 commit 4181fcc
4 files changed
Lines changed: 324 additions & 81 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
132 | | - | |
| 131 | + | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments