Skip to main content
Glama

add_edge

Adds an edge between LangGraph nodes to define control flow. Supports simple transitions to a target node or END, and conditional routing via a router function and path mapping.

Instructions

Add an edge between nodes.

Simple edge: set to (a node id, or "END"). Conditional edge: set condition (the name of a router function in nodes.py) and paths (a mapping of the router's return value to a target node id or "END").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNo
from_Yes
pathsNo
conditionNo
project_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It mentions conditions and paths but does not disclose what happens when invalid inputs are given, whether edges can overwrite existing ones, or any validation behavior. It also doesn't mention the return value or side effects.

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 concise and well-structured: an introductory sentence followed by bullet-like lines for each edge type. Every sentence adds value, and the most important information (how to specify each type) is front-loaded.

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, but the description doesn't mention what the tool returns, which might be important for agents. It also lacks behavioral details like validation or error handling. Given the complexity of conditional edges, the description covers the main usage but misses edge cases and side effects.

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?

With schema description coverage at 0%, the description must compensate for all parameters. It does explain 'to', 'condition', and 'paths' in context (e.g., 'to' is a node id or END), but it does not explain 'project_dir' and 'from_' at all. The description adds value for some parameters but leaves others undocumented.

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 clearly states the tool adds an edge between nodes and distinguishes between simple and conditional edges, which is a specific verb and resource. However, it does not explicitly contrast with siblings like remove_edge, but the purpose is clear enough.

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 provides clear guidance on when to use simple vs conditional edges, explaining the required parameters for each case. It does not explicitly mention alternatives, but the context is sufficient for an agent to decide which parameters to set.

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