Skip to content

Commit 72efc42

Browse files
authored
Merge pull request modelcontextprotocol#3230 from nulone/fix/filesystem-move-file-destructive-hint
fix(filesystem): mark move_file as destructive operation
2 parents 04cce79 + 86fd903 commit 72efc42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/filesystem/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ The mapping for filesystem tools is:
200200
| `create_directory` | `false` | `true` | `false` | Re‑creating the same dir is a no‑op |
201201
| `write_file` | `false` | `true` | `true` | Overwrites existing files |
202202
| `edit_file` | `false` | `false` | `true` | Re‑applying edits can fail or double‑apply |
203-
| `move_file` | `false` | `false` | `false` | Move/rename only; repeat usually errors |
203+
| `move_file` | `false` | `false` | `true` | Deletes source file |
204204

205205
> Note: `idempotentHint` and `destructiveHint` are meaningful only when `readOnlyHint` is `false`, as defined by the MCP spec.
206206

src/filesystem/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ server.registerTool(
608608
destination: z.string()
609609
},
610610
outputSchema: { content: z.string() },
611-
annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: false }
611+
annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: true }
612612
},
613613
async (args: z.infer<typeof MoveFileArgsSchema>) => {
614614
const validSourcePath = await validatePath(args.source);

0 commit comments

Comments
 (0)