Skip to main content
Glama
neo4j-field

Neo4j GraphRAG MCP Server

by neo4j-field

Vector Similarity Search

vector_search
Read-onlyIdempotent

Search Neo4j vector indexes using text queries to find similar nodes with sanitized properties and similarity scores for GraphRAG applications.

Instructions

Performs vector similarity search on a Neo4j vector index.

This tool embeds your text query using OpenAI and searches the specified vector index. Returns node IDs, labels, node properties (automatically sanitized), and similarity scores.

Automatic Sanitization (always applied):

  • Embedding property used by the vector index → automatically excluded (vector_search only)

  • Large lists (≥128 items) → replaced with placeholders

  • Large strings (≥10K chars) → truncated with suffix

  • Total response limited to 8000 tokens (results dropped if needed)

Property Selection:

  • Default (no return_properties): Returns ALL properties (sanitized)

  • With return_properties: Returns ONLY specified properties

  • Example: return_properties="pageNumber,id" → returns only these two

  • Check get_neo4j_schema_and_indexes for property warnings to avoid large fields

Performance Optimization: Internally fetches max(top_k × 2, 100) results to avoid local maximum problems in kANN algorithms.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
text_queryYesThe text query to search for. This will be embedded and used for similarity search.
vector_indexYesThe name of the vector index to search in. Use get_neo4j_schema_and_indexes to see available indexes.
top_kNoThe number of most similar results to return.
return_propertiesNoOptional: Comma-separated list of properties to return (e.g., "pageNumber,id"). If not specified, returns all properties with automatic sanitization (large values are truncated).
Behavior5/5

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

The description adds significant behavioral context beyond annotations: it details automatic sanitization rules (exclusion of embedding property, handling of large lists/strings, token limits), property selection behavior (default vs. specified properties), and performance optimization (fetching extra results for kANN algorithms). Annotations cover read-only/idempotent traits, but the description enriches this with operational specifics.

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 (Automatic Sanitization, Property Selection, Performance Optimization) and front-loaded core functionality. It's appropriately detailed for a complex tool, though slightly verbose; every sentence adds value, such as explaining sanitization rules and optimization strategies.

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?

Given the tool's complexity, rich annotations, and 100% schema coverage, the description is highly complete: it covers purpose, usage guidelines, behavioral traits, parameter effects, and references to sibling tools. No output schema exists, but the description adequately explains return values (node IDs, labels, properties, scores) and limitations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3, but the description adds valuable semantics: it explains how return_properties affects property selection with examples, clarifies that text_query is embedded via OpenAI, and provides context on top_k optimization. However, it doesn't add syntax details beyond the schema for parameters like vector_index.

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 performs vector similarity search on a Neo4j vector index, embedding text queries using OpenAI. It distinguishes from sibling tools like fulltext_search by specifying vector-based search with embedding, and from get_neo4j_schema_and_indexes by focusing on search execution rather than schema discovery.

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?

The description provides explicit guidance on when to use this tool versus alternatives: it references get_neo4j_schema_and_indexes to find available indexes and check property warnings, and distinguishes itself from fulltext_search by emphasizing vector-based similarity search with embedding. It also advises on performance considerations for top_k parameter 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/neo4j-field/mcp-neo4j-graphrag'

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