file_tool(
runtime: ToolRuntime[None, AnthropicToolsState],
command: str,
path: str| Name | Type | Description |
|---|---|---|
runtime* | ToolRuntime[None, AnthropicToolsState] | Tool runtime providing access to state. |
command* | str | Operation to perform. |
path* | str | File path to operate on. |
file_text | str | None | Default: None |
old_str | str | None | Default: None |
new_str | str | None | Default: None |
insert_line | int | None | Default: None |
new_path | str | None | Default: None |
view_range | list[int] | None | Default: None |
Execute file operations on virtual file system.
Full file content for create command.
String to replace for str_replace command.
Replacement string for str_replace command.
Line number for insert command.
New path for rename command.
Line range [start, end] for view command.