Skip to content

Commit 86fd903

Browse files
nuloneclaude
andcommitted
fix(filesystem): mark move_file as destructive operation
move_file deletes the source file, which is a destructive operation. Updated annotations and README documentation to reflect this. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 55a3056 commit 86fd903

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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
@@ -589,7 +589,7 @@ server.registerTool(
589589
destination: z.string()
590590
},
591591
outputSchema: { content: z.string() },
592-
annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: false }
592+
annotations: { readOnlyHint: false, idempotentHint: false, destructiveHint: true }
593593
},
594594
async (args: z.infer<typeof MoveFileArgsSchema>) => {
595595
const validSourcePath = await validatePath(args.source);

0 commit comments

Comments
 (0)