Skip to main content
Glama

add_node

Add or update a node in a LangGraph project, automatically making the first node the entry point. Use config to set the node's function, or pass entry_point to reassign which node starts the graph.

Instructions

Add or update a node. config['function'] names the callable in nodes.py (defaults to the node id if omitted).

The first node added to a project becomes the entry point automatically; pass entry_point=True to (re)designate a later node instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
typeNopython
configNo
entry_pointNo
project_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the burden. It discloses two important behaviors: config['function'] defaults to node id, and the first node auto-becomes entry point. However, it does not disclose whether 'update' overwrites existing config, whether it validates the callable exists, or any side effects on edges.

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

Conciseness4/5

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

The description is compact and front-loads the primary action, then explains the two non-obvious behaviors. Every sentence earns its place, though the entry-point rule could be more concise.

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

Completeness3/5

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

The tool has an output schema and 5 parameters, but no annotations. The description covers the most subtle behaviors (config function resolution and entry point designation) but omits update semantics, error conditions, and relationship to project initialization. Adequate for basic use, incomplete for edge cases.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It explains config['function'] and entry_point semantics, but leaves id, type, and project_dir meanings to the schema. The description adds value for two of five parameters, which is partial compensation.

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

Purpose4/5

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

The description states a clear verb+resource ('Add or update a node') and explains the key config['function'] behavior, which distinguishes it from graph-structure tools like add_edge/remove_node. It doesn't explicitly contrast with siblings, but the resource and behavior are specific enough to be identifiable.

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

Usage Guidelines3/5

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

The description implies usage context: it is for adding/updating nodes, and the entry-point rule tells when to use entry_point=True. However, it does not explicitly state when to prefer alternatives like remove_node or validate_graph, nor does it mention prerequisites like project initialization.

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