Skip to main content
Glama

Create an edge between two nodes

create_edge

Creates a directed edge (source → target) for a STRUCTURAL relation: type "dependency" (A is built on / needs B) or "data_flow" (data moves A → B outside a request). Use for module/library deps, a route depending on the data store, a job writing a table. For a runtime request/call/integration use create_api instead, not an edge. Reserve connections for relations a maintainer would trace — don't wire everything. type ∈ project.edge_types; same source and target is rejected. See umtri://rules/system-structure (Connections).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "slug": "<slug>",
      "source": "<source>",
      "target": "<target>",
      "type": "<type>"
    },
    "name": "create_edge"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYesGround slug.
typeYesEdge type — required. "dependency" (source is built on / needs target) or "data_flow" (data moves source → target) — use one of the ground's edgeTypes.
labelNo
sourceYesSource node id.
targetYesTarget node id.
metadataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the safety burden and delivers real behavioral detail: self-edges (source equal to target) are rejected, the type must exist in the ground's type list, and the rules reference is provided. It does not say what happens on a duplicate edge, whether any permission is required, or what the response looks like, so it falls short of full transparency for a mutation tool.

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 purpose is stated first, followed by types, alternative-tool routing, and constraints in a logical order; nearly every clause carries decision-relevant information. The 'type ∈ project.edge_types' shorthand and the rules link are slightly cryptic and could be phrased more plainly.

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?

For a six-parameter mutation tool with no annotations and no output schema, the description covers when to use it, the two relation types, the self-edge rejection, the allowed type constraint, and the alternative tool. The remaining gaps — duplicate behavior, label/metadata semantics, and return shape — keep it below full completeness.

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?

The description adds genuine meaning to source and target by defining them directionally (A built on / needs B; data moves A → B) and constrains type to the ground's edge types with the self-edge rule. However, label and metadata (two of the six parameters) stay unexplained in both schema and description, and schema coverage is only 67%, so the gaps are not fully compensated.

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?

Opens with a specific verb and resource: 'Creates a directed edge (source → target)', immediately narrowing scope to STRUCTURAL relations with the two named types. It explicitly distinguishes itself from the sibling create_api, so the agent can tell the two apart without reading either schema.

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

Usage Guidelines5/5

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

Gives positive cases (module dependency, a route relying on a data store, a job writing a table), an explicit exclusion with a named alternative ("create_api" for request/response or integration relations), and a judgment rule ('only relationships a reviewer would trace; don't connect everything"). This is the when/when-not/alternative triad in full.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.