read_node_file
Read specific lines from a file within a custom-node pack, with configurable start line and character limits to prevent context overflow.
Instructions
Read a slice of one file inside a custom-node pack (read-only), with bounded output so a huge file can't flood the context. Returns the requested line range with a truncation notice when clipped; long lines are chunked. Pair with search_node_packs to locate the line, then apply_node_patch or write_node_file to change it. LOCAL-ONLY (requires COMFYUI_PATH); the path is jailed to custom_nodes/.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Pack-relative path under custom_nodes/, e.g. 'MyPack/nodes.py'. | |
| max_chars | No | Maximum characters to return (default 12000, max 24000). | |
| line_count | No | Number of lines to return (default 240, max 800). | |
| start_line | No | 1-based line to start at (default 1). |