Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPack-relative path under custom_nodes/, e.g. 'MyPack/nodes.py'.
max_charsNoMaximum characters to return (default 12000, max 24000).
line_countNoNumber of lines to return (default 240, max 800).
start_lineNo1-based line to start at (default 1).
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Describes read-only nature, bounded output, line range with truncation notice, and long line chunking. Lacks mention of error handling for missing files or permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four well-structured sentences. Front-loaded with core functionality, then behavioral details, usage flow, and constraints. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters and no output schema, the description covers return behavior (truncation, chunking) and usage context. Could mention output format (plain text) but is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema provides descriptions for all 4 parameters (100% coverage). The description adds context beyond schema: explains pack-relative path with example, and clarifies default and max values for max_chars, line_count, start_line.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verbs ('read a slice of one file') and resource ('custom-node pack'), and clearly distinguishes from siblings like write_node_file, apply_node_patch, and search_node_packs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use this tool: after search_node_packs to locate the line, before apply_node_patch or write_node_file to change it. Also specifies local-only requirement and path restriction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/artokun/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server