Skip to main content
Glama
grafeo-mcp

grafeo-mcp

Official
by GrafeoDB

batch_import

Create many graph nodes and edges in one atomic call: validate the full batch before writing and roll back if any part is rejected.

Instructions

Create many nodes and edges in one call, all or nothing.

The whole batch is checked before anything is written, and undone if the engine rejects part of it. Returns created_nodes, created_edges and node_id_map (batch index to node 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": {
      "nodes": "<nodes>"
    },
    "name": "batch_import"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesNoUp to 1000 objects: {"source_ref": "@0", "target_ref": 42, "edge_type": "KNOWS", "properties": {...}}. A ref is "@N" (the Nth node of this batch) or an existing node ID.
nodesYesUp to 500 objects: {"labels": ["Person"], "properties": {...}}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv0.3.0
    • removedInput schema / properties / edges / anyOf
      Removed value: -[
      -  {
      -    "items": {
      -      "additionalProperties": true,
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / edges / default
      Removed value: -null
    • addedInput schema / properties / edges / description
      Added value: +"Up to 1000 objects: {\"source_ref\": \"@0\", \"target_ref\": 42, \"edge_type\": \"KNOWS\", \"properties\": {...}}. A ref is \"@N\" (the Nth node of this batch) or an existing node ID."
    • addedInput schema / properties / edges / items
      Added value: +{
      +  "type": "object"
      +}
    • removedInput schema / properties / edges / title
      Removed value: -"Edges"
    • addedInput schema / properties / edges / type
      Added value: +"array"
    • addedInput schema / properties / nodes / description
      Added value: +"Up to 500 objects: {\"labels\": [\"Person\"], \"properties\": {...}}."
    • removedInput schema / properties / nodes / items / additionalProperties
      Removed value: -true
    • removedInput schema / properties / nodes / title
      Removed value: -"Nodes"
    • removedInput schema / title
      Removed value: -"batch_importArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "batch_importOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false, but the description adds substantive behavior: full validation before any write and rollback if part of the batch is rejected. It also names the return fields. Not fully exhaustive (no error-shape or failure-mode detail), but clearly beyond the annotation layer.

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?

Three short sentences, atomicity stated first, return values last. No filler and nothing repeated from the schema.

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?

With no output schema present, the description correctly takes on return-value disclosure and explains the transactional guarantee, which is the key risk an agent needs to know for a write tool. Minor gaps remain around error reporting and whether edge IDs are individually meaningful, but nothing essential to correct invocation is missing.

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% and the schema already documents the '@N' reference syntax and per-array limits, so the description does not need to compensate. It adds only the return-side detail that node_id_map maps batch index to node ID, which is useful but is not a parameter clarification.

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?

States a specific verb and resource ('Create many nodes and edges') plus a distinguishing property ('in one call, all or nothing') that separates it from the single-item create_node/create_edge siblings. An agent can identify the operation and its batch nature without opening the schema.

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?

'Many ... in one call' and 'all or nothing' imply that this tool is for bulk/atomic writes rather than single-item creation, but no alternative is named and no explicit when-not condition is given. Guidance is inferable rather than stated.

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