Skip to main content
Glama

Add Edge

add_edge

Add a typed relationship between two nodes in a workflow state graph, tracking dependencies, blockers, and more. Ensures valid graph by rejecting cycles in dependency-related edges.

Instructions

Create a relationship/edge between two nodes. Cycles are rejected for depends_on, blocks, and child_of.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesThe relationship type.
projectNoOptional project identifier.
source_idYesThe source node ID.
target_idYesThe target node ID.
propertiesNoOptional edge properties/metadata JSON object.
Behavior4/5

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

Annotations already indicate a non-read-only, non-destructive mutation. The description adds that cycles are rejected for depends_on, blocks, and child_of, a valuable behavioral constraint not present in annotations. It does not cover all side effects (e.g., duplicate edges, node existence validation) but adds meaningful context beyond the structured fields.

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?

Two sentences, front-loaded with the core action, zero filler. The cycle constraint is stated concisely without unnecessary detail.

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?

The tool has 5 parameters, 3 required, and no output schema. The description covers the core behavior and one key constraint but does not mention return value, error behavior, or duplicate edge handling. For a simple create operation, this is adequate but not exhaustive.

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 meaning to the 'type' parameter by specifying which types are cycle-checked, and clarifies the edge endpoints. This adds modest value beyond the schema.

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 the verb 'Create' with a specific resource ('relationship/edge between two nodes') and identifies the edge types. This clearly distinguishes it from sibling tools like add_node (creates nodes) and remove_edge (removes edges).

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 does not explicitly state when to use this tool versus alternatives like batch_add_edges or remove_edge. The cycle rejection constraint implies a limitation but no explicit guidance is given for handling cycles or bulk edge creation.

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/putervision/state-memory-mcp'

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