Skip to main content
Glama
grafeo-mcp

grafeo-mcp

Official
by GrafeoDB

create_vector_index

Idempotent

Create an HNSW vector index on a label and embedding property to enable vector, MMR, and graph-vector searches across existing and future vectors.

Instructions

Create an HNSW vector index on a label and property, for vector_search, mmr_search and vector_graph_search.

Existing and later vectors are indexed; a list literal in execute_gql text is stored as a list, not a vector.

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": {
      "label": "<label>",
      "property": "<property>"
    },
    "name": "create_vector_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
mNoHNSW links per node (engine default 16).
labelYes
metricNo"cosine", "euclidean", "dot_product" or "manhattan".cosine
propertyYesThe property that holds the embeddings, e.g. "embedding".
dimensionsNoVector size (1536, 384, ...); needed when no node has a vector yet.
ef_constructionNoHNSW build width (engine default 128).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed22 schema fields changedv0.3.0
    • removedInput schema / properties / dimensions / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / dimensions / default
      Removed value: -null
    • addedInput schema / properties / dimensions / description
      Added value: +"Vector size (1536, 384, ...); needed when no node has a vector yet."
    • removedInput schema / properties / dimensions / title
      Removed value: -"Dimensions"
    • addedInput schema / properties / dimensions / type
      Added value: +"integer"
    • removedInput schema / properties / ef_construction / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / ef_construction / default
      Removed value: -null
    • addedInput schema / properties / ef_construction / description
      Added value: +"HNSW build width (engine default 128)."
    • removedInput schema / properties / ef_construction / title
      Removed value: -"Ef Construction"
    • addedInput schema / properties / ef_construction / type
      Added value: +"integer"
    • removedInput schema / properties / label / title
      Removed value: -"Label"
    • removedInput schema / properties / m / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / m / default
      Removed value: -null
    • addedInput schema / properties / m / description
      Added value: +"HNSW links per node (engine default 16)."
    • removedInput schema / properties / m / title
      Removed value: -"M"
    • addedInput schema / properties / m / type
      Added value: +"integer"
    • addedInput schema / properties / metric / description
      Added value: +"\"cosine\", \"euclidean\", \"dot_product\" or \"manhattan\"."
    • removedInput schema / properties / metric / title
      Removed value: -"Metric"
    • addedInput schema / properties / property / description
      Added value: +"The property that holds the embeddings, e.g. \"embedding\"."
    • removedInput schema / properties / property / title
      Removed value: -"Property"
    • removedInput schema / title
      Removed value: -"create_vector_indexArguments"
    • changedOutput schema / (root)
      Previous value: -{
      -  "properties": {
      -    "result": {
      -      "title": "Result",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "result"
      -  ],
      -  "title": "create_vector_indexOutput",
      -  "type": "object"
      -}New value: +null
  2. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), so the bar is lower, yet the description still adds real value: it states the index applies to existing AND subsequently written vectors, and warns that a list literal passed in execute_gql text is stored as a list rather than a vector. It omits build cost/latency and what happens on duplicate index creation, which the idempotent hint only partially covers.

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?

Two tight sentences: purpose and scope first, then the behavioral caveat. Every clause carries information and nothing 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 six-parameter, no-output-schema creation tool with annotations covering safety and idempotency, the definition covers purpose, downstream consumers, retroactive indexing and a key data-type pitfall. Only failure modes (e.g., index already exists, missing dimensions with empty label) are left unaddressed.

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?

With 83% schema description coverage, the schema already documents metric, dimensions, m, ef_construction and property. The description only implies which parameters matter (label, property, and by extension dimensions when no vectors exist) and adds no format or interaction detail, so it meets but does not exceed the baseline.

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 definition opens with a specific verb and resource ("Create an HNSW vector index") plus the exact scope ("on a label and property"), which distinguishes it from create_text_index. It also names the three sibling search tools the index enables, so an agent can map intent directly to this tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Naming vector_search, mmr_search and vector_graph_search makes the use case clear: call this before those searches will work on a property. There is no explicit "when not to use" or pointer to create_text_index for lexical search, so it stops just short of full routing guidance.

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