read_file#

Build typed tools from annotations and docstrings. See the guide.

Read a line range from a UTF-8 text file.

Parameters#

{
  "additionalProperties": false,
  "properties": {
    "file_path": {
      "minLength": 1,
      "type": "string",
      "description": "Absolute path or a path relative to the current working directory."
    },
    "offset": {
      "minimum": 1,
      "type": "integer",
      "default": 1,
      "description": "One-based line number to start reading from."
    },
    "limit": {
      "maximum": 2000,
      "minimum": 1,
      "type": "integer",
      "default": 2000,
      "description": "Maximum number of lines to return, 2,000 by default and never more; the text is also held to 50 KB, which the trailing hint below is added to."
    }
  },
  "required": [
    "file_path"
  ],
  "type": "object"
}

Model-facing snippet#

read_file(file_path="src/app.py", offset=500)

Guidelines#

  • Use line ranges for large files.

  • Inspect the current content before editing a file.

  • The line numbers are for reference; do not copy them into an edit or a write.

zett_agent.tools.files.read_file#

A tool is a name, an input schema, and an async callable.

Parameters:

arguments (Mapping[str, Any])

Return type:

ToolResult

Direct Python calls use await tool(arguments_mapping). The snippet above describes model-facing invocation syntax, not the Python call signature.