mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
MCP: advertise file overwrite tools as destructive (#2139)
This commit is contained in:
+5
-2
@@ -146,8 +146,11 @@ Each edit in a batch has its own undo step. Connect mode also lists `ui_inspect`
|
||||
Ports and connect mode are unchanged.
|
||||
|
||||
Every listed tool has a title and all four MCP hints. Generated command tools are conservatively
|
||||
marked as edits. Helpers with optional output paths are marked as writers; `export` is not
|
||||
idempotent because the default conflict policy chooses a new filename on repeated calls.
|
||||
marked as edits. `export`, `render_photo` and `screenshot` have `readOnlyHint: false` and
|
||||
`destructiveHint: true`: their caller-supplied output paths can replace existing files, even
|
||||
when a path is optional. The image-only `render_preview` and `ui_screenshot` remain read-only
|
||||
and non-destructive. These annotations are client hints, not a file-access sandbox.
|
||||
`export` is not idempotent because the default conflict policy chooses a new filename on repeated calls.
|
||||
Unknown helper argument keys return JSON-RPC `-32602` naming the key and accepted arguments.
|
||||
Generated `cmd_*` tools and nested command params remain free-form: the registry has prose
|
||||
parameter docs, not machine-readable schemas. Existing command validation (including strict
|
||||
|
||||
Reference in New Issue
Block a user