Skip to main content
Glama
GrafeoDB

grafeo-mcp

Official
by GrafeoDB

batch_import

Import datasets by bulk-creating nodes and edges from JSON arrays in a single call.

Instructions

Bulk-create nodes and edges from JSON arrays in a single call.

Use this tool when: you need to import many nodes and edges at once, e.g. loading a dataset, building a graph from structured data, or ingesting extracted entities in bulk. Do NOT use for: creating a single node or edge (use create_node / create_edge), or updating existing data (use update_node / update_edge).

Nodes are created first, then edges. Edges can reference nodes created in this batch using "@index" notation (e.g. "@0" refers to the first node in the nodes array).

Note: this operation is not atomic. If an error occurs partway through, already-created nodes/edges remain in the graph.

Args: nodes: List of node objects, each with: - labels: list of strings (required) - properties: dict of key-value pairs (optional) edges: List of edge objects, each with: - source_ref: int (existing node ID) or str ("@0", "@1", ...) referencing a node by its index in the nodes array - target_ref: int (existing node ID) or str ("@0", "@1", ...) - edge_type: str (required) - properties: dict of key-value pairs (optional)

Returns: JSON with created_nodes count, created_edges count, and a node_id_map from batch index to actual node ID.

Examples: batch_import( nodes=[ {"labels": ["Person"], "properties": {"name": "Alice"}}, {"labels": ["Person"], "properties": {"name": "Bob"}}, ], edges=[ {"source_ref": "@0", "target_ref": "@1", "edge_type": "KNOWS"}, ], )

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodesYes
edgesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Discloses key behaviors: nodes created first then edges, '@index' notation for referencing batch nodes, and non-atomic operation. With no annotations, these details are crucial. Could mention more about error handling, but sufficient.

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?

Well-organized with clear sections: purpose, usage guidelines, behavioral note, parameter details, return description, and example. Every sentence adds value; no redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers all essential aspects: purpose, usage, behavior, parameters, return format, and example. Given the tool's complexity (bulk create with references and non-atomicity), the description is thorough and leaves no significant gaps.

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?

Schema description coverage is 0%, but the description fully documents the internal structure of nodes and edges including required fields (labels, edge_type) and optional fields. Also explains the '@index' notation and provides an example, compensating completely for the schema gap.

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: 'Bulk-create nodes and edges from JSON arrays in a single call.' It explicitly distinguishes itself from siblings by noting when to use create_node/create_edge for single entities.

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 this tool when' scenarios (loading datasets, building graphs) and 'Do NOT use for' cases (single node/edge, updates) with named alternative tools (create_node, create_edge, update_node, update_edge).

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/GrafeoDB/grafeo-mcp'

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