Skip to main content
Glama

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

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