Skip to main content
Glama
aiuluna
by aiuluna

add_edge

Connect two nodes in a knowledge graph to build relationship networks, representing dependencies, associations, or other connections between entities.

Instructions

Add edges in the knowledge graph, connecting two nodes to build a relationship network. Edges represent relationship types between nodes, such as dependencies, containment, associations, etc. Prerequisites:

  1. Must first create a graph (using create_graph)

  2. Source and target nodes must already exist

  3. Edge type must match the graph type

Usage recommendations:

  1. First use list_graphs to get graph and node information

  2. Confirm both source and target nodes exist and their types match

  3. Choose appropriate edge type based on graph type

  4. Add meaningful labels to edges to help understand relationships

  5. If relationships have varying strengths, use the weight parameter

Return data:

  • data: Newly created edge information

    • id: Edge ID

    • type: Edge type

    • sourceId: Source node ID

    • targetId: Target node ID

    • label: Edge label

    • weight: Edge weight

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
graphIdYes
typeYesEdge type. Topology diagram:depends_on/imports/extends/implements/calls/references/contains/associated_with, Timeline graph:precedes/leads_to/created_by/modified_by, Change log:precedes/transforms_to/created_by/modified_by/part_of, Requirements document:implements_req/depends_on/part_of/created_by/modified_by
sourceIdYes
targetIdYes
labelNo
weightNo
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes that this is a creation/mutation operation (implied by 'Add edges' and 'Newly created edge information'), specifies prerequisites that constrain usage, and provides context about relationship types and edge properties. However, it doesn't mention potential error conditions, rate limits, or authentication requirements that would be helpful 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.

Conciseness5/5

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

The description is well-structured with clear sections (purpose, prerequisites, usage recommendations, return data) and every sentence adds value. It's appropriately sized for a 6-parameter mutation tool with complex prerequisites, providing necessary information without redundancy. The front-loaded purpose statement immediately communicates the tool's function.

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 mutation tool with 6 parameters, no annotations, and no output schema, the description provides substantial context including prerequisites, usage guidance, and detailed return format. It covers the essential information needed to use the tool correctly. The only minor gap is the lack of explicit error handling information, but overall it's quite complete given the complexity.

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

Parameters5/5

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

With only 17% schema description coverage, the description compensates significantly by explaining parameter semantics. It clarifies that sourceId and targetId must refer to existing nodes, edge type must match graph type, labels should be meaningful, and weight represents relationship strength. The description adds substantial value beyond the minimal schema documentation, especially for the type parameter where it provides context about how edge types relate to different graph types.

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 clearly states the tool's purpose: 'Add edges in the knowledge graph, connecting two nodes to build a relationship network.' It specifies the verb ('Add edges'), resource ('knowledge graph'), and distinguishes it from siblings like add_node (which adds nodes rather than edges) and update_edge (which modifies existing edges rather than creating new ones).

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?

The description provides explicit usage recommendations including prerequisites ('Must first create a graph', 'Source and target nodes must already exist') and specific guidance on when to use ('First use list_graphs to get graph and node information', 'Confirm both source and target nodes exist'). It also distinguishes from alternatives by specifying edge type constraints and recommending meaningful labels and weight parameters.

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/aiuluna/knowledge-graph-mcp'

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