Skip to main content
Glama
guerinjeanmarc

Neo4j GraphRAG MCP Server

Vector Similarity Search

vector_search
Read-onlyIdempotent

Search Neo4j vectors for semantically similar nodes using a text query, returning node labels, properties, and similarity scores. Supports optional property filtering.

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

Post-Filtering:

  • Use pre_filter to filter results by exact property match after vector scoring (e.g., {"documentName": "foo.pdf"})

  • Check get_neo4j_schema_and_indexes for available node properties to filter on

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_kNoThe number of most similar results to return.
pre_filterNoOptional: Filter map applied after vector search (e.g., {"documentName": "foo.pdf"}). Filters results by exact property match. Check get_neo4j_schema_and_indexes for available node properties.
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.
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?

Even though annotations already declare readOnlyHint, idempotentHint, and destructiveHint, the description adds substantial behavioral detail: automatic sanitization rules (embedding exclusion, large-list placeholders, string truncation, 8000-token limit), property selection behavior, and performance optimization (fetching top_k × 2,100 results). This goes far beyond the annotations and provides essential transparency.

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?

The description is well-structured with bold section headers, starting with the main purpose and then detailing sanitation, property selection, post-filtering, and performance. It is long but every sentence adds necessary detail for a complex tool, with no redundancy or filler.

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 (vector search, sanitization, property selection, pre-filtering), the description is complete. It covers all parameters, return values (node IDs, labels, properties, scores), related tool references, and a performance caveat. Since there is no output schema, the description appropriately explains what the agent should expect.

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 100%, providing a baseline of 3. The description adds meaningful value by clarifying default behavior for return_properties ('Returns ALL properties' vs. 'Returns ONLY specified properties'), giving a concrete example ('pageNumber,id'), and illustrating pre_filter usage with a JSON example. This helps an agent understand parameter semantics beyond the schema.

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 states the specific verb+resource: 'Performs vector similarity search on a Neo4j vector index.' It explicitly mentions embedding text via OpenAI and returning node IDs, labels, properties, and similarity scores. This clearly distinguishes it from sibling search tools like fulltext_search by focusing on vector-based similarity.

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?

The description provides clear usage context, including default vs. specified property selection, examples for pre_filter, and references to get_neo4j_schema_and_indexes for schema checks. However, it does not explicitly state when not to use this tool or name an alternative like fulltext_search for text-based search, so it lacks explicit exclusions.

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/guerinjeanmarc/mcp-neo4j-graphrag'

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