Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/neo4j-labs/neocarta/llms.txt

Use this file to discover all available pages before exploring further.

The Neocarta MCP server exposes two categories of tools to AI agents: catalog tools that are always available from schema data alone, and search tools that are registered conditionally based on the indexes present in Neo4j at startup. Every search tool returns a TableContext record — a table together with its columns, types, example values, and foreign-key references — giving agents everything they need to write a correct query.

Catalog Tools

Catalog tools are always registered, regardless of whether embeddings or search indexes exist. They provide structural orientation for an agent navigating an unfamiliar database.

list_schemas

Lists all schemas in the semantic graph alongside the database each belongs to.
  • Parameters: none
  • Returns: list of { schema_name, database_name }
  • Use when: an agent needs to orient itself before querying — a good first call when the schema structure is unknown.

list_tables_by_schema

Lists every table within a named schema.
schema_name
string
required
The schema to enumerate. Call list_schemas first to get valid schema names.
  • Returns: list of { schema_name, table_names[] }
  • Use when: the agent knows which schema is relevant and wants to enumerate available tables before deciding which to retrieve context for.

get_full_metadata_schema

Returns the complete metadata record for every table in the database — all columns, types, nullability, primary/foreign key flags, example values, and REFERENCES.
  • Parameters: none
  • Returns: list of TableContext for every table, ordered by table name
This tool fetches all tables and columns without any filtering. On databases with many tables it returns a very large payload. Use it only for debugging, evaluation baselines, or very small schemas. Prefer targeted search tools for all normal agent workflows.

Search Tools

Search tools are registered conditionally at server startup based on which indexes exist in Neo4j. For each searchable label (Table, Column) the server registers only the single highest-priority tool whose prerequisites are met. See Search Strategy Auto-Detection for the full priority order. All search tools share the following common parameters:
text_content
string
required
The natural-language question, keyword, or business-term phrase to search for.
max_tables
int
Maximum number of tables to return in the result. Defaults vary per tool.
search_top_k
int
default:"10"
Number of candidates each index branch returns before ranking and filtering. Increase to widen recall; decrease to tighten precision.

Vector Search Tools

Requires: a VECTOR index on the target label. The query text_content is embedded at call time using the configured EMBEDDING_MODEL and compared against stored node embeddings via cosine similarity. Anchors on the most semantically similar table nodes, then expands each to its full column set.
  • Default max_tables: 10
  • Retrieval: queries table_vector_index, score threshold > 0.5
  • Use when: the query describes a general concept or entity (e.g. "customers", "sales transactions").

Anchors on the most semantically similar column nodes, groups them by parent table, and returns each table with only the matched columns.
  • Default max_tables: 5
  • Retrieval: queries column_vector_index, score threshold > 0.5, then groups to parent tables by average anchor score
  • Use when: the query references a specific field or attribute (e.g. "customer email", "order total").

Anchors first on the most relevant schemas, then filters to tables within those schemas whose embedding scores are near or better than the schema score.
  • Default max_tables: 5
  • Default search_top_k: 5 (applied to schema candidates)
  • Retrieval: queries schema_vector_index (top 5, score > 0.5), then includes tables where table_score > schema_score - 0.2; results ordered by schema score DESC, table score DESC
  • Use when: the query is broad and may span multiple schemas (e.g. "everything related to billing").

Full-Text Search Tools

Requires: a FULLTEXT index on the target label. Supports Lucene query syntax in text_content. No embeddings or API calls required at query time. Anchors on table nodes by full-text matching on table name and description.
  • Default max_tables: 10
  • Retrieval: queries table_full_text_index, results ordered by Lucene score
  • Use when: the query contains literal tokens expected to appear verbatim in table names or descriptions (e.g. "orders", "fct_revenue").

Anchors on column nodes by full-text matching on column name and description, then groups to parent tables by average anchor score. Returns only the matching columns per table.
  • Default max_tables: 5
  • Retrieval: queries column_full_text_index
  • Use when: the query references specific column-name tokens (e.g. "customer_id", "total_amount").

Hybrid Search Tools

Requires: both a VECTOR and a FULLTEXT index on the target label. Runs both branches in parallel with the same text_content, min-max normalizes scores within each branch by the branch maximum, then merges per node by taking the stronger of the two scores. Hybrid vector + full-text search at the table level.
  • Default max_tables: 5
  • Use when: the query mixes conceptual phrasing with literal tokens you expect to appear in table metadata.

Hybrid vector + full-text search at the column level, returning only matching columns per table.
  • Default max_tables: 5
  • Use when: the query references field-level concepts alongside literal column-name tokens.

Business-Term Hybrid Search Tools

Requires: a VECTOR index on the target label + a FULLTEXT index on the target label + businessterm_full_text_index + at least one :BusinessTerm node in the graph. These tools extend the hybrid search by routing the full-text branch through the business glossary. The full-text branch finds matching BusinessTerm nodes and then surfaces only the tables or columns that are also connected to those terms via TAGGED_WITH. This makes the tools effective for domain vocabulary that does not appear verbatim in table or column metadata. Hybrid search at the table level, with the full-text branch bridged through :BusinessTerm tags.
  • Default max_tables: 5
  • Retrieval: UNION of table_vector_index (vector branch) and businessterm_full_text_index + table_full_text_index where TAGGED_WITH (business-term branch); per-branch normalization, max-per-node merge
  • Use when: the query uses business-glossary language (e.g. "average order value", "gross merchandise value") that is tagged to relevant tables.

Hybrid search at the column level, with the full-text branch bridged through :BusinessTerm tags. Returns only matching columns per parent table.
  • Default max_tables: 5
  • Retrieval: UNION of column_vector_index (vector branch) and businessterm_full_text_index + column_full_text_index where TAGGED_WITH (business-term branch)
  • Use when: business-glossary language maps onto field-level concepts via column tags (e.g. "customer acquisition cost" tagged to a cost column).

What Each Tool Returns

Every search tool returns a list of TableContext records. Each record contains:
FieldDescription
Table nameThe table identifier
SchemaThe schema the table belongs to
DatabaseThe source database
ColumnsList of columns with: name, type, description, is_primary_key, is_foreign_key, example values
REFERENCESForeign key targets — the column(s) this table’s columns point to
The REFERENCES field is what enables agents to discover join paths automatically:
Which customers placed the largest orders last quarter? The agent calls get_context_by_table_hybrid_search, finds orders and customers, sees orders.customer_id → customers.id in the REFERENCES, writes the JOIN, and executes the query.

Tool Registration Logic

Only one search tool per label (Table, Column) is ever registered at a time. The server picks the highest-priority strategy whose prerequisites are satisfied, so the registered tool set reflects exactly what the graph supports.
ConditionEffect
No VECTOR index for a labelVector and hybrid tools not registered for that label
No FULLTEXT index for a labelFull-text and hybrid tools not registered for that label
Neither index for a labelNo search tool registered for that label
businessterm_full_text_index missing OR no :BusinessTerm nodesBusiness-term hybrid tools not registered (falls back to plain hybrid)
Schema VECTOR index presentget_context_by_schema_and_table_vector_search registered independently
Catalog toolsAlways registered regardless of index state

Build docs developers (and LLMs) love