Skip to main content
Glama

mdan_graph_add_edge

Adds a relationship between two nodes in the context graph, rejecting cycles to keep the graph valid.

Instructions

Add a relationship between two nodes of the context graph (cycles are rejected)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesSource node ID
targetYesTarget node ID
relationNoRelation typeinput_to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.1.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It does disclose a key behavior: cycles are rejected, which is valuable. However, it does not mention whether the operation is destructive, whether it validates node existence, whether it can overwrite existing edges, or what happens on failure. The cycle rejection is a useful addition but not comprehensive.

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 a single sentence that is concise and front-loads the core action ('Add a relationship between two nodes') before the parenthetical constraint. It earns its place with the cycle rejection detail, though it could arguably be split into two sentences for clarity.

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?

For a simple 3-parameter tool with no output schema, the description is adequate but has gaps. It doesn't explain what the response looks like, whether the operation is idempotent, or what 'cycles are rejected' means in practical terms (e.g., error message, no-op). Given the tool's simplicity and full schema coverage, a 3 is fair.

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 100%, so the schema already documents all three parameters (source, target, relation) with descriptions and an enum for relation. The description adds no additional parameter-level meaning beyond what the schema provides, so the baseline 3 is appropriate.

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 specific verb ('Add') and resource ('relationship between two nodes of the context graph'), which clearly identifies the operation. It also adds a behavioral constraint ('cycles are rejected') that helps distinguish it from other graph tools like mdan_graph_add_node, though it doesn't explicitly name that sibling.

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 edges to the context graph, and the cycle rejection hints at when it might fail. However, it does not explicitly state when to use this tool versus alternatives like mdan_graph_add_node or mdan_graph_impact, nor does it mention any prerequisites such as nodes needing to exist.

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