Skip to main content
Glama

search_node_packs

Locate node classes, imports, or error strings in custom node pack source files using regular expression search.

Instructions

Regex-search custom-node source under custom_nodes/ (read-only). Uses ripgrep when it's on PATH, otherwise a bounded built-in scanner (skips dot-dirs, pycache/node_modules, binary and >1 MiB files). Returns file/line/text matches with per-line and result caps. Use this to find where a node class, import, or error string lives before reading or patching. LOCAL-ONLY (requires COMFYUI_PATH); the search path is jailed to custom_nodes/.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoOptional glob to restrict which files are searched (e.g. '**/*.py').
pathNoPack-relative directory to search, or '.' for all packs (default '.').
queryYesRegular expression to search for.
max_resultsNoMaximum matches to return (default 50, max 100).
case_sensitiveNoMatch case-sensitively (default false).
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: read-only nature, use of ripgrep or bounded scanner with specific limitations (skips dot-dirs, binary files, large files), output format (file/line/text matches with caps), and local-only requirement. This provides comprehensive transparency beyond the schema.

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?

The description is appropriately sized and well-structured: first sentence states core function, second details implementation, third explains output, fourth gives usage advice, fifth enforces constraints. Every sentence is informative, no redundancies, and key information is front-loaded.

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

Completeness5/5

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

Despite lacking an output schema, the description adequately explains what the tool returns (file/line/text matches with per-line and result caps). It also covers constraints, input expectations, and use case. The schema covers all parameters, and the description fills in behavioral details. The tool's purpose and operation are fully specified.

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 coverage is 100%, so baseline is 3. The description adds value by clarifying that 'query' is a regular expression and specifying defaults for 'max_results' (default 50) and 'case_sensitive' (default false), which are not fully detailed in the schema. However, it does not add significant semantic depth beyond what the schema already provides for other parameters.

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?

Description clearly states it performs regex-search on custom node source files under custom_nodes/, specifying 'Regex-search' and the scope. It distinguishes from sibling tools like search_custom_nodes by focusing on code content rather than node metadata. The verb 'search' and resource 'node packs' are specific and unambiguous.

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

Usage Guidelines4/5

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

The description explains when to use this tool ('find where a node class, import, or error string lives before reading or patching') and provides context about local-only operation and path constraints. However, it does not explicitly mention alternative tools like search_custom_nodes or when not to use this tool, which would strengthen guidance.

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