Repository navigation
v5.3.0 - Surgical note editing + mcp SDK v2
Added
-
Surgical note editing. New
note_edit_stringMCP tool replaces an exact
substring inside a note instead of rewriting the wholecontent. This
directly counters the append-culture that grows notes unbounded: a stale line
can be replaced in place rather than by appending a correction block. Matching
is literal (not regex) and mirrors an exact-match code editor - it refuses
whenold_stringis not found, or matches more than once whilereplace_all
isFalse, forcing the caller to add surrounding context or opt in explicitly.
Results exceeding the 500 KB content limit are refused, never silently
truncated. The replacement is computed in Python and written through the
normal parametrizedUPDATE, so there is no SQL-injection surface. -
Search within a note. New
note_grepMCP tool returns only the matching
lines plus surrounding context (with 1-based line numbers, overlapping windows
merged), letting a caller locate the exact text to feed intonote_edit_string
without pulling a large note into context. The line-number prefix is display
only and must not be copied intoold_string. -
Partial note reads.
note_showgained optionalstart_line/end_line
parameters to return only a line range of a large note, using the same line
numbers asnote_grep. Without them the full note is returned as before.Together these turn a big note from an all-or-nothing load into something a
session can inspect and maintain a slice at a time - fewer tokens on read, and
a smaller blast radius than a whole-content rewrite on edit.
Changed
- Upgraded to the
mcpPython SDK v2 (~=1.0->~=2.2). In SDK v2 the
high-level server classFastMCPwas renamed toMCPServerand moved to
mcp.server.mcpserver; the server now imports and instantiatesMCPServer.
The tool and resource surface is unchanged - all tools keep their names,
parameters and generated schemas, and the stdio transport is unaffected - so
there is no change for MCP clients. Installing this release pulls SDK v2 and
its dependencies (notablyhttpx2,opentelemetry-apiandpydantic>=2.12);
the minimum Python version is unchanged (>=3.10).