write_file#
Build typed tools from annotations and docstrings. See the guide.
Atomically write a UTF-8 text file.
Parameters#
{
"additionalProperties": false,
"properties": {
"path": {
"minLength": 1,
"type": "string",
"description": "Absolute path or a path relative to the current working directory."
},
"content": {
"title": "Content",
"type": "string",
"description": "Complete UTF-8 text to write."
},
"overwrite": {
"default": true,
"title": "Overwrite",
"type": "boolean",
"description": "Whether an existing file may be replaced."
}
},
"required": [
"path",
"content"
],
"title": "ToolInput",
"type": "object"
}
Model-facing snippet#
write_file(path="notes/plan.md", content="# Plan\n")
Guidelines#
Use for new files or intentional full-file replacement.
Prefer edit for a small change to an existing file.
- zett_agent.tools.coding.write_file#
A tool is a name, an input schema, and an async callable.
- 参数:
arguments (Mapping[str, Any])
- 返回类型:
Direct Python calls use await tool(arguments_mapping). The snippet
above describes model-facing invocation syntax, not the Python call signature.