Skip to main content
Glama
tigergraph

tigergraph-mcp

Official
by tigergraph

tigergraph__add_edges

Idempotent

Add multiple edges in a single batch operation to build relationships between existing vertices in a TigerGraph graph. Use this to load relationship data efficiently.

Instructions

Add multiple edges (relationships) to a TigerGraph graph in a single batch operation. More efficient than calling 'add_edge' multiple times.

Use When: • Loading multiple relationships • Building graph connections in bulk • Importing relationship data from files • Initial graph construction

Quick Start:

{
  "edge_type": "FOLLOWS",
  "edges": [
    {"from_type": "Person", "from_id": "u1", "to_type": "Person", "to_id": "u2"},
    {"from_type": "Person", "from_id": "u2", "to_type": "Person", "to_id": "u3"}
  ]
}

Common Workflow:

  1. Add all vertices first with 'add_nodes'

  2. Use 'add_edges' to create relationships

  3. Verify with 'get_edge_count'

Tips: • All edges in one call must be same edge type • All referenced vertices must exist • Batch size: 1000-5000 edges per call is optimal • Much faster than individual 'add_edge' calls

Related Tools: add_edge, add_nodes, get_edge_count

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
edgesYesList of edges. Each edge is a dict with source and target info. Must specify 'source_id' (or 'source_vertex_id') and 'target_id' (or 'target_vertex_id'). Can also optionally specify 'source_type' and 'target_type' per edge if different from defaults, though batch edges usually share types. All edges in one batch MUST have the same source/target types due to API limitations. Example: [{'source_id': 'u1', 'target_id': 'p1', 'date': '2023'}]
profileNoConnection profile name. Omit to use the active default profile. Use 'list_connections' to see available profiles.
edge_typeYesType of the edges.
graph_nameNoName of the graph. If not provided, uses default connection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate idempotency and non-destructiveness. The description goes further by disclosing operational constraints: all edges must share the same edge type, vertices must pre-exist, optimal batch size is 1000-5000 edges, and batch calls are faster than repeated add_edge calls. This adds meaningful behavior beyond the structured annotations, though it doesn't address failure semantics.

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 well-structured with clear sections, bullet lists, a code example, and a front-loaded purpose. It is fairly long but each section serves a distinct purpose, with only minor redundancy between 'more efficient' and 'much faster than individual add_edge calls.'

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 batch write tool, the description covers when to use it, how to sequence it with add_nodes and get_edge_count, preconditions, and batch constraints. It does not explain return values or partial-failure behavior, but with no output schema and rich annotations, the provided context is largely sufficient.

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 baseline is 3. The description adds a Quick Start example and tips, but the example uses keys like 'from_type', 'from_id', 'to_type', and 'to_id,' which conflict with the schema's documented 'source_id' and 'target_id' keys. This inconsistency undermines the added value and prevents a higher score.

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 first sentence clearly states the tool's function: 'Add multiple edges (relationships) to a TigerGraph graph in a single batch operation.' It also distinguishes itself from the sibling add_edge tool by emphasizing batch efficiency, so an agent can immediately tell them apart.

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?

Provides explicit 'Use When' conditions, a 'Common Workflow' section, and named related tools. It clearly frames this tool as the batch alternative to add_edge and includes prerequisites like 'All referenced vertices must exist,' giving an agent concrete guidance on when to invoke it.

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

Deploy Server

Other Tools