Skip to main content
Glama
grafeo-mcp

grafeo-mcp

Official
by GrafeoDB

create_edge

Create a directed relationship between two existing nodes by specifying their IDs and edge type, then return the new edge with its ID.

Instructions

Create one directed edge from source_id to target_id (both must exist) and return it with its id.

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": {
      "source_id": "<source_id>",
      "target_id": "<target_id>",
      "edge_type": "<edge_type>"
    },
    "name": "create_edge"
  }
}

Input Schema

NameRequiredDescriptionDefault
edge_typeYesRelationship type: "KNOWS".
source_idYes
target_idYes
propertiesNoProperty values: {"name": "Ada", "born": 1815}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.3.0
    • addedInput schema / properties / edge_type / description
      Added value: +"Relationship type: \"KNOWS\"."
    • removedInput schema / properties / edge_type / title
      Removed value: -"Edge Type"
    • removedInput schema / properties / properties / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / properties / default
      Removed value: -null
    • addedInput schema / properties / properties / description
      Added value: +"Property values: {\"name\": \"Ada\", \"born\": 1815}."
    • removedInput schema / properties / properties / title
      Removed value: -"Properties"
    • addedInput schema / properties / properties / type
      Added value: +"object"
    • removedInput schema / properties / source_id / title
      Removed value: -"Source Id"
    • removedInput schema / properties / target_id / title
      Removed value: -"Target Id"
    • removedInput schema / title
      Removed value: -"create_edgeArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "create_edgeOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare the write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the description's job is to add context beyond that. It does add the endpoint-existence precondition and states that the created edge is returned with its id, but is silent on what happens when a node is missing (error vs. auto-create) and on duplicate-edge behavior, which matters given idempotentHint=false.

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?

A single sentence that front-loads the action, names both required identifiers, and appends the precondition and return value without padding. Nothing in it is redundant.

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 four-parameter mutation tool with no output schema and no openWorld behavior, the essentials are covered: what is created, the existence prerequisite, and that the new edge with its id comes back. The remaining gap is failure/duplicate semantics, a minor omission given the annotations already flag non-idempotency.

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 coverage is only 50%, and both source_id and target_id are bare integers with no schema descriptions. The description partially compensates by establishing that these are node references that must already exist, but adds no format or type details, and 'edge_type' / 'properties' semantics come entirely from the schema.

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 gives a specific verb and resource ('Create one directed edge from source_id to target_id') plus the return behavior, so the operation is unambiguous. It only weakly differentiates from siblings via the word 'one' (implying single vs. the batch-oriented tools) and never names an alternative such as update_edge or batch_import.

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?

It states one real precondition ('both must exist'), which tells the agent to create nodes first, but gives no explicit when-to-use guidance relative to update_edge, delete_edge, or batch_import. Selection between this and the batch path is left to inference.

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