Skip to main content
Glama
GrafeoDB

grafeo-mcp

Official
by GrafeoDB

vector_search

Retrieve the k nearest nodes to a query embedding using HNSW vector similarity. Use for semantic search after creating a vector index on a specific label and property.

Instructions

Find the k nearest nodes by vector similarity (HNSW index).

Use this tool when you have an embedding vector and want to find semantically similar nodes. Requires a vector index created via create_vector_index on the same label + property.

Do NOT use this for keyword or property search — use search_nodes_by_label or execute_gql for that.

Args: label: Node label to search within (e.g. "Document"). property: Property that holds the embedding vector (e.g. "embedding"). query_vector: The query embedding as a list of floats. k: Number of nearest neighbors to return (default 10). ef: HNSW search beam width. Higher values improve recall at the cost of speed. Leave as None to use the index default.

Returns: JSON array of {node_id, distance, labels, properties} sorted by distance ascending (most similar first).

Example call: vector_search("Document", "embedding", [0.12, -0.34, ...], k=5)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYes
propertyYes
query_vectorYes
kNo
efNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It explains HNSW index usage, ef parameter trade-off, and return format. However, it doesn't mention error behavior (e.g., missing index) or performance nuances beyond ef, leaving minor gaps.

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-structured with clear sections (purpose, usage guidelines, args, returns, example). Every sentence adds value; no fluff. Front-loaded with core purpose.

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?

Given 5 parameters, no annotations, and an output schema (context says true), the description covers functionality, prerequisites, parameters, return format, and example. Lacks only minor details like error conditions or ef formula, but overall strong.

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%, so description must explain parameters fully. It does so for all 5 parameters: label, property, query_vector, k (with default 10), and ef (with default None). Example call demonstrates usage pattern.

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 starts with a clear verb+resource: 'Find the k nearest nodes by vector similarity (HNSW index).' It distinguishes from sibling tools like search_nodes_by_label (keyword search) and execute_gql (general queries), making the purpose unambiguous.

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?

Explicitly states when to use ('when you have an embedding vector and want semantically similar nodes'), when not to use ('Do NOT use for keyword or property search'), and even requires a prerequisite: vector index created via create_vector_index. Example call reinforces correct usage.

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