---
name: "MCP tools for file operations (read, write, edit, list)"
---

# Story 346: MCP tools for file operations (read, write, edit, list)

## User Story

As a non-Claude agent connected via MCP, I want file operation tools so that I can read, write, and edit code in my worktree.

## Acceptance Criteria

- [ ] read_file tool — reads file contents, supports offset/limit for large files
- [ ] write_file tool — writes/creates a file at a given path
- [ ] edit_file tool — replaces a string in a file (old_string/new_string like Claude Code's Edit)
- [ ] list_files tool — glob pattern matching to find files in the worktree
- [ ] All operations scoped to the agent's worktree path for safety
- [ ] Returns clear errors for missing files, permission issues, etc.

## Out of Scope

- TBD
