Fulltext Search
fulltext_searchSearch Neo4j fulltext indexes using Lucene query syntax to retrieve relevant nodes and relationships with properties and relevance scores for GraphRAG applications.
Instructions
Performs fulltext search on a Neo4j fulltext index using Lucene query syntax.
Lucene Syntax Supported:
Boolean: "legal AND compliance", "privacy OR security"
Wildcards: "compli*", "te?t"
Fuzzy: "complience~"
Phrases: ""exact phrase""
Automatic Sanitization (always applied):
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
Returns node/relationship IDs, labels/types, properties (sanitized), and relevance scores.
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": {
"text_query": "<text_query>",
"fulltext_index": "<fulltext_index>"
},
"name": "fulltext_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text_query | Yes | The text query to search for. Supports Lucene query syntax (AND, OR, wildcards, fuzzy, etc.). | |
| fulltext_index | Yes | The name of the fulltext index to search. Use get_neo4j_schema_and_indexes to see available indexes. | |
| top_k | No | The number of most relevant results to return. | |
| return_properties | No | Optional: Comma-separated list of properties to return (e.g., "pageNumber,id"). If not specified, returns all properties with automatic sanitization (large values are truncated). |