mcp-server
v3.6.0MCP server for RushDB, the database for AI: schema-first tools for Claude, Cursor and other MCP clients
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
getSchemaMarkdown Get schema (Markdown)
STEP 0 — call this ONCE at the start of every conversation before constructing any query. Returns the complete graph schema as compact Markdown: all labels with record counts, all properties per label with their type and value ranges (min/max for numbers, dates and times, sample values for strings/booleans; array properties render as type[]), and all cross-label relationships with direction and edge property summaries. The Properties table includes a "Semantic Search" column: properties with an embedding index show `sourceType similarityFunction dimensionsd [status]` (e.g. `managed cosine 15…
| Parameter | Type | Description |
|---|---|---|
force | boolean | Pass true to bypass the 1-hour schema cache and force a fresh recalculation. |
labels | array | Optional: scope schema to specific labels only. Leave empty to get all labels. |
getSchema Get schema
Returns the same graph schema as getSchemaMarkdown but as structured JSON. Each item has: label (string), count (number), properties (array with id, name, type, optional isArray, recordsCount (number of records that carry this property), min/max for numbers, dates and times, values[] for strings/booleans, and an optional vectorIndexes array), and relationships (array with label, type, direction: in|out, count, and optional edge properties). vectorIndexes is non-empty when one or more embedding indexes exist for that property; each entry has: id, sourceType (managed|external), similarityFunctio…
| Parameter | Type | Description |
|---|---|---|
force | boolean | Pass true to bypass the 1-hour schema cache and force a fresh recalculation. |
labels | array | Optional: scope schema to specific labels only. Leave empty to get all labels. |
findLabels Find labels
List or filter available record types (labels) and their counts. IMPORTANT: getSchemaMarkdown already returns ALL label names in STEP 0 — do NOT call findLabels as a substitute for it. Only call findLabels when you need label counts after applying record-scoped predicates, or getSchemaMarkdown was not called yet. Call with no arguments to list all labels. `where` is applied to Records, not label metadata; use getSchemaMarkdown to search label names. Returns objects with name (case-sensitive — use exact casing in all subsequent calls) and count (number of matching records). Pick the best ma…
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum number of labels to return |
orderBy | object | Sorting configuration: key = field, value = asc|desc |
skip | number | Number of labels to skip |
where | object | Record-scoped filter conditions applied before label counts are returned. |
createRecord Create record
Create a new record. Use the exact label casing returned by findLabels. Set mergeStrategy + mergeBy in options to enable upsert semantics (merge existing vs. replace). With them, a matching existing record is changed in place: "append" overwrites the given fields, "rewrite" also deletes the fields not given.
| Parameter | Type | Description |
|---|---|---|
data * | object | The record data to insert |
label * | string | Label for the record |
options | object | Optional creation/upsert options |
transactionId | string | Optional transaction ID for atomic creation |
updateRecord Update record
Partially update a record — only fields present in data are changed; all other existing fields are preserved. Use setRecord instead if you want to replace all fields. Requires recordId: retrieve it first with findRecords or getRecord if not already known.
| Parameter | Type | Description |
|---|---|---|
data * | object | The updated (partial) record data |
label * | string | Label for the record |
recordId * | string | ID of the record to update |
transactionId | string | Optional transaction ID for atomic update |
deleteRecord Delete record
Delete a single record by ID. Irreversible. Always confirm with the user before calling. Use findRecords to preview the record first.
| Parameter | Type | Description |
|---|---|---|
recordId * | string | ID of the record to delete |
transactionId | string | Optional transaction ID for atomic deletion |
findRecords Find records
Primary read/query/list/search tool for records. Use findRecords to find records, search records, list records, retrieve matching records, filter records, or answer questions from data. Use this instead of exportRecords unless the user explicitly asks for CSV/export/download. Search records with a structured SearchQuery. BEFORE building any query with dates, metrics, groupBy, relationship traversal, or vector search — call getSearchQuerySpec to load the complete syntax reference. INTENT: metrics/analytics request (count/total/sum/avg/breakdown/top N by metric) → MUST include select + group…
| Parameter | Type | Description |
|---|---|---|
check | string | Catalog check (RushDB 3.0.14+). Leave unset: the server warns by default and older servers do not know it. "strict" refuses a query naming a label, property or text no record holds, with the stored sp… |
groupBy | array | Two modes: (A) Dimensional — "$alias.propertyName" strings, one row per distinct value; (B) Self-group — select key names, collapses to one row. Do not use alias-only values such as "$record" or "… |
labels | array | Filter by record labels |
limit | number | Max records for listing queries (default 10, max 1000). NEVER set when select is present — restricts the scan and produces wrong results. |
orderBy | object | Sorting configuration: key = field, value = asc|desc. For a point field, { $distance: <GeoJSON Point> } sorts nearest first (RushDB 3.0.14+). |
select | object | Map of output-key → select expression. Supports: $sum, $avg, $min, $max, $count, $collect, $timeBucket, math, and references. See getSearchQuerySpec for full select/groupBy/collect/timeBucket refere… |
skip | number | Number of records to skip |
where | object | Filter conditions. Field names must match exactly what findProperties/getSchemaMarkdown returns. Exact match can be field: value or field: { $eq: value }. For incomplete named references, prefer $cont… |
getRecord Get record
Fetch a single record by its ID. Use when you already have the ID from a previous findRecords or findOneRecord call.
| Parameter | Type | Description |
|---|---|---|
recordId * | string | ID of the record to retrieve |
getRecordsByIds Get records by IDs
Fetch multiple records by their IDs in one call. Use after collecting IDs from a findRecords query.
| Parameter | Type | Description |
|---|---|---|
recordIds * | array | Array of record IDs to retrieve |
attachRelation Attach relationship
Create a directed or bidirectional relationship between records. sourceId and targetId/targetIds must already exist — use findRecords to resolve records by name/attribute first.
| Parameter | Type | Description |
|---|---|---|
sourceId * | string | ID of the source record |
direction | string | Direction of the relationship |
properties | object | Optional user-defined properties to store on the relationship edge. Reserved RushDB/internal keys are rejected. |
relationType | string | Type of the relationship |
targetId | string | ID of one target record (deprecated if targetIds provided) |
targetIds | array | IDs of multiple target records |
transactionId | string | Optional transaction ID for atomic relation creation |
updateRelation Update relationships
Change the properties of existing relationships of one type between a record and target records: `set` writes values (null stores an explicit null), `unset` removes properties. Pairs without such a relationship are skipped; `updated` counts the relationships changed. Not available inside a transaction. Use findRelationships first to confirm the relationship type, direction and current properties.
| Parameter | Type | Description |
|---|---|---|
relationType * | string | Type of the relationships to update |
sourceId * | string | ID of the source record |
direction | string | outgoing: source → target (default); incoming: target → source |
set | object | Properties to write on the relationships. Scalars or arrays of one scalar type; reserved RushDB/internal keys are rejected. |
targetId | string | ID of one target record (deprecated if targetIds provided) |
targetIds | array | IDs of multiple target records |
types | object | Type of `set` properties whose JSON form is ambiguous, e.g. { "since": "datetime" } stores an ISO 8601 string as a datetime. Relationship values are never inferred, so name the type for dates and time… |
unset | array | Names of properties to remove from the relationships |
detachRelation Detach relationships
Remove the relationships between a record and target records. Without relationType it removes relationships of every type; with direction "bidirectional" it removes them both ways. Not available inside a transaction. Use findRelationships to inspect existing relationships and confirm the correct type/direction before detaching.
| Parameter | Type | Description |
|---|---|---|
sourceId * | string | ID of the source record |
direction | string | Direction of the relationship |
relationType | string | Type of the relationship to remove; omit to remove every type |
targetId | string | ID of one target record (deprecated if targetIds provided) |
targetIds | array | IDs of multiple target records |
findRelationships Find relationships
Discover and traverse relationships between records. Use this tool in two scenarios: (1) Multi-hop path discovery — fetch a sample record ID, then call findRelationships with source.where or target.where containing that ID to reveal adjacent labels; repeat to trace the full path before building a nested findRecords where clause. (2) Edge filtering — where applies to relationship type/properties; use source/target for endpoint record predicates. Does NOT support select or groupBy — use findRecords for metrics/analytics across related labels.
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum number of relationships to return |
orderBy | object | Sorting configuration: key = field, value = asc|desc |
skip | number | Number of relationships to skip |
source | object | Optional source endpoint filter: labels and/or record-scoped where predicates. |
target | object | Optional target endpoint filter: labels and/or record-scoped where predicates. |
where | object | Relationship-edge predicates. `type` filters the relationship type; other fields filter relationship properties. |
listRelationshipPatterns List relationship patterns
List inferred relationship patterns for the current project. Returns suggestions and their lifecycle status, current schema relationship summaries, and the latest analysis status. Use this before approving, ignoring, or deleting a relationship pattern.
analyzeRelationshipPatterns Analyze relationship patterns
Queue schema analysis to generate relationship pattern suggestions for the current project. This may invoke the configured LLM. Poll listRelationshipPatterns to inspect completion status and suggestions.
approveRelationshipPattern Approve relationship pattern
Approve and apply a suggested relationship pattern. Call listRelationshipPatterns first so the user can review the inferred source, target, direction, type, mode, and confidence.
| Parameter | Type | Description |
|---|---|---|
id * | string | ID of the suggested relationship pattern to approve. |
ignoreRelationshipPattern Ignore relationship pattern
Ignore a suggested relationship pattern without applying it. Call listRelationshipPatterns first so the user can review the inferred pattern.
| Parameter | Type | Description |
|---|---|---|
id * | string | ID of the suggested relationship pattern to ignore. |
deleteRelationshipPattern Delete relationship pattern
Delete a saved relationship pattern. Irreversible. Confirm with the user before calling. When deleteExisting is true, relationships previously materialized by this pattern are also removed.
| Parameter | Type | Description |
|---|---|---|
id * | string | ID of the relationship pattern to delete. |
deleteExisting | boolean | Also remove relationships previously materialized by this pattern. |
bulkCreateRecords Create records in bulk
Insert multiple records of the same label in one call. Set mergeStrategy ("append" to keep existing unspecified fields, "rewrite" to replace) and mergeBy (fields to match on) in options to enable upsert semantics. With them, matching existing records are changed in place and the given fields are overwritten. Use the exact label casing returned by findLabels. Large calls are sent in batches of 5,000 flat rows (10,000 nested documents, at most about 8 MB each). Batches are not atomic without a transactionId: if one fails, the error names the batches that committed, the one that failed and those…
| Parameter | Type | Description |
|---|---|---|
data * | array | Array of record data to insert |
label * | string | Label for all records |
options | object | Optional bulk creation/upsert options |
transactionId | string | Optional transaction ID for atomic bulk creation |
bulkDeleteRecords Delete records in bulk
Delete all records matching a query. IRREVERSIBLE and potentially high-impact. REQUIRED: always call findRecords with the same labels+where first to show the user a preview, then ask for explicit confirmation before calling this tool.
| Parameter | Type | Description |
|---|---|---|
where * | object | Search conditions for records to delete |
check | string | Catalog check (RushDB 3.0.14+). "strict" refuses the delete when where names a property or text no record holds; use it when where has $ne/$nin/$not, where a misspelled value would match (and delete)… |
labels | array | Filter by record labels |
transactionId | string | Optional transaction ID for atomic bulk deletion |
exportRecords Export records to CSV
Export matching records as a CSV file only when the user explicitly asks to export/download CSV. For normal reading, answering, listing, searching, or inspecting records, use findRecords instead. Accepts the same labels/where/orderBy filters as findRecords. Call findProperties first to know available field names if constructing a where filter.
| Parameter | Type | Description |
|---|---|---|
labels | array | Filter by record labels |
limit | number | Maximum number of records to export |
orderBy | object | Sorting configuration for export |
where | object | Search conditions for records to export |
helpAddToClient Help adding RushDB to a client
Help the user add the RushDB MCP server to their MCP client
getQueryBuilderPrompt Get query builder prompt
Return the RushDB system prompt. Use this if your MCP client does not support the Prompts API.
getSearchQuerySpec Get search query spec
Returns the complete RushDB SearchQuery specification as a focused reference document. Covers: all WHERE operators (string/number/boolean, date/time/duration types, points with $within and $distance ordering, component objects/vector/$exists/$type), relationship traversal syntax ($alias/$relation with variable-length hops/$cycle ring detection/$id), logical grouping ($and/$or/$not/$nor/$xor), all select functions ($sum/$avg/$min/$max/$count/$collect/$timeBucket), both groupBy modes (dimensional + self-group), late-ordering rules, root-label vs related-label traversal rules, COLLECT nesting, li…
setRecord Replace record
Replace ALL fields of a record with the provided data object — any existing fields not in data are deleted. Use updateRecord instead for partial/merge updates that preserve unspecified fields.
| Parameter | Type | Description |
|---|---|---|
data * | object | The new record data to set |
label * | string | Label for the record |
recordId * | string | ID of the record to set |
transactionId | string | Optional transaction ID for atomic set |
findOneRecord Find one record
Return the first record matching the query — useful for entity resolution probes. Call with where: { <nameField>: { $contains: "..." } } and a small limit to resolve a named entity to its ID before using it in a relationship filter. Prefer this over findRecords when you need exactly one representative match rather than a full list.
| Parameter | Type | Description |
|---|---|---|
labels | array | Filter by record labels |
where | object | Search conditions for finding the record |
findUniqRecord Find unique record
Return the single record that uniquely matches the query — throws if zero or more than one record matches. Use for unique-key lookups (email, code, slug) where exactly one result is expected. Use findOneRecord instead when you only want the first match and duplicates are acceptable.
| Parameter | Type | Description |
|---|---|---|
labels | array | Filter by record labels |
where | object | Search conditions for finding the unique record |
deleteRecordById Delete record by ID
Delete a single record by ID. Irreversible. Always confirm with the user before calling. Use getRecord to preview the record if needed.
| Parameter | Type | Description |
|---|---|---|
recordId * | string | ID of the record to delete |
transactionId | string | Optional transaction ID for atomic deletion |
propertyValues List property values
Get statistics or distinct values for a specific property, identified by the `id` field returned from findProperties. What this tool returns depends on the property type: • number / datetime / date / localdatetime / localtime / duration → returns { min, max } (dates and times as ISO 8601 text in their own type) — use this to answer range, min/max, or spread questions. No findRecords aggregation needed. • string / boolean → returns a list of all distinct values — use this to canonicalize filter values before querying. Workflow for range/min/max questions: (1) findLabels, (2) fi…
| Parameter | Type | Description |
|---|---|---|
propertyId * | string | The `id` field from the property object returned by findProperties. |
domainOnMiss | number | When nothing matches and the property holds at most this many distinct values, return all of them instead (searchMissed: true): the data may store the idea as a code ("positive" → "+"). |
limit | number | Max number of string values to return. |
match | string | How `query` matches (default contains). `similar` finds near spellings (spiderman → Spider-Man). |
orderBy | string | Sort order for string value lists. |
query | string | Optional text filter: keep the values whose text matches (strings as stored; numbers and dates as shown; a date such as 1993/11/12 or 2013-06 also matches that date in another layout). Matching values… |
skip | number | Number of string values to skip. |
searchValues Search values
Find where a value from the question is stored: searches the exact value dictionaries of every property at once and returns { matches: [{ label, property, value, count }], total }. Use it before filtering on a name, code, or phrase the user typed, instead of guessing the field or spelling. match: contains (default), prefix, exact, or similar (near spellings, for typos and punctuation: "spiderman" finds "Spider-Man"). No match means no stored value contains the text: check the spelling, try a shorter word, or read a field's values with propertyValues.
| Parameter | Type | Description |
|---|---|---|
text * | string | The text to look for. |
labels | array | Labels to search (all when omitted). |
limit | number | Most matches (default 50, max 1000). |
match | string | |
minSimilarity | number | similar only: least similarity, 0–1 (default 0.6). |
getSchemaSummary Get schema summary
Every label with its properties in one live read (never cached): per property its type, record count, exact distinct count, min/max for numbers and dates, and the full value list when it holds few (fewValues, default 10); per label its relationships. Use it to learn how values are coded (e.g. KCT holds "-" and "+") without one call per field.
| Parameter | Type | Description |
|---|---|---|
fewValues | number | List values of properties with at most this many (default 10, max 100). |
labels | array | Labels to summarize (all when omitted). |
resolveNames Resolve names
Find the real label or property behind a name you are unsure of (case, separators and plural endings ignored, then ranked by spelling): "patients" → Patient, "patients.birthdate" → Patient.Birthday. Call it instead of guessing when a label or field name is not in the schema. Returns [{ label, property?, score }].
| Parameter | Type | Description |
|---|---|---|
text * | string | A label, a property, or Label.property. |
limit | number | Most suggestions (default 5). |
getJoinCandidates Get join candidates
Which properties reference records of another label (or the same one), found from property names and exact value containment, with evidence (matched values and records, coverage). RushDB Cloud only. Use it to learn how labels connect when the data has no relationships yet, e.g. before joining in a query. Returns [{ source, target, reasons, relationshipType, confidence, evidence, rationale }].
| Parameter | Type | Description |
|---|---|---|
labels | array | Only candidates touching these labels. |
minConfidence | number | Lowest confidence returned (default 0.5). |
findProperties Find properties
Discover the field names, types, and IDs available on a record label. Always call this before using field names in any query — never guess or invent field names. Filter by label using labels: ["LABEL_NAME"]. `where` is applied to Records, not property metadata. Each returned property object has: id (string), name (string), type (string | number | boolean | datetime | date | localdatetime | localtime | duration | point), recordsCount (number of records that carry this property). Use the `name` field as the field name in where/orderBy/groupBy clauses. Use the `id` field as the `propertyId` arg…
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum number of properties to return |
orderBy | object | Sorting configuration: key = field, value = asc|desc |
skip | number | Number of properties to skip |
where | object | Record-scoped filter conditions applied before properties are returned. |
findPropertyById Get property
Fetch the metadata (name, type, label, recordsCount) of a single property by its ID. Use when you already have a propertyId and need to re-confirm its type or cardinality before calling propertyValues.
| Parameter | Type | Description |
|---|---|---|
propertyId * | string | ID of the property to retrieve |
deleteProperty Delete property
Permanently delete a property and all its values from every record that has it. Irreversible. Confirm with the user before calling.
| Parameter | Type | Description |
|---|---|---|
propertyId * | string | ID of the property to delete |
findEmbeddingIndexes List embedding indexes
List all embedding index policies configured for the current project. Each index entry contains: id, label, propertyName, modelKey, dimensions, enabled, status (pending|indexing|ready|error), createdAt, updatedAt. Call this before creating a new index to check if one already exists for the same label+propertyName.
createEmbeddingIndex Create embedding index
Create a new embedding index policy for a string property. For managed indexes (default), RushDB asynchronously embeds every existing value and keeps new values embedded on write. For external indexes (sourceType: "external"), the client supplies vectors via upsertEmbeddingVectors. Once the index status becomes "ready" (check with getEmbeddingIndexStats), use vectorSearch to query.
| Parameter | Type | Description |
|---|---|---|
label * | string | Record label to scope the index to (e.g. "Book", "Task"). |
propertyName * | string | Name of the string property whose values will be embedded. |
dimensions | number | Vector dimensionality. Required for external indexes. For managed indexes, defaults to the server-configured embedding model dimensions. |
name | string | Index name, unique within the project (1–64 of letters, digits, ".", "_", ":", "-"). Defaults to <label>.<property>.<model>.<dimensions>.<similarity>. |
similarityFunction | string | Similarity function for the vector index. Defaults to "cosine". |
sourceType | string | Whether RushDB generates embeddings ("managed") or the client provides them ("external"). Defaults to "managed". |
upsertEmbeddingVectors Upsert embedding vectors
Write pre-computed embedding vectors to an external vector index for a set of records. Only valid for indexes with sourceType "external". Each vector must contain exactly as many dimensions as the index was created with. After upserting, call getEmbeddingIndexStats to check if all records are indexed (status becomes "ready").
| Parameter | Type | Description |
|---|---|---|
indexId * | string | ID of the external embedding index (from findEmbeddingIndexes). |
items * | array | Array of record-vector pairs to write. |
deleteEmbeddingIndex Delete embedding index
Delete an embedding index policy by its ID and strip all stored embedding vectors for that index. Irreversible. Confirm with the user before calling. Use findEmbeddingIndexes to get the indexId.
| Parameter | Type | Description |
|---|---|---|
indexId * | string | ID or name of the embedding index to delete. |
getEmbeddingIndexStats Get embedding index stats
Return indexing statistics for an embedding index: totalRecords and indexedRecords. Use this to monitor backfill progress after creating an index — when indexedRecords === totalRecords the index is fully ready.
| Parameter | Type | Description |
|---|---|---|
indexId * | string | ID or name of the embedding index (from findEmbeddingIndexes). |
vectorSearch Vector search
Perform direct vector similarity search over records whose `propertyName` has been indexed with createEmbeddingIndex. For managed indexes: provide a free-text `query` — RushDB embeds it and returns the most similar records ranked by similarity (__score). For external indexes: provide a `queryVector` (pre-computed number[]) instead of query text. A `where` filter narrows candidates before ranking. Requires an embedding index in "ready" status for the given label+propertyName.
| Parameter | Type | Description |
|---|---|---|
dimensions | number | Disambiguates when multiple indexes share the same label+property. Inferred from queryVector length when queryVector is supplied. |
ef | number | ANN gather breadth when the search runs on the ANN graph. |
fusion | string | Hybrid only: "rrf" (default) fuses ranks; "dbsf" fuses each leg's scores normalized by its own distribution. |
index | string | Name of the embedding index to search (as listed by findEmbeddingIndexes or getSchema). When given, propertyName and labels default to the index's own. |
labels | array | One or more record labels to scope the search. The first label is used to resolve the embedding index. |
limit | number | Maximum number of results to return (default 10). |
mode | string | How to rank candidates. "auto" (default): exact on small indexes, the ANN graph on large ones. "exact"/"ann" force a path ("ann" needs a cosine index). |
prefetchLimit | number | Hybrid only: hits the vector leg ranks before fusion, 1–10,000 (default 4 × (skip + limit)). |
propertyName | string | Name of the indexed property to search against. Required unless index is given. |
query | string | Free-text query to embed and compare against stored vectors (managed indexes only). Mutually exclusive with queryVector. |
queryVector | array | Pre-computed embedding vector to search with (external indexes). Mutually exclusive with query. Length must match index dimensions. |
rrfK | number | Hybrid only: the RRF smoothing constant (default 60). |
scoreThreshold | number | Keep only results scoring at least this much (scores depend on the embedding model). |
similarityFunction | string | Disambiguates when multiple indexes share the same label+property+sourceType. |
skip | number | Number of results to skip for pagination (default 0). |
sourceType | string | Select which index type to search. Required when both managed and external indexes exist for the same label+property. |
text | object | Adds a keyword (BM25) leg, making it a hybrid search: both rankings run over the same filtered records and are fused. `query` defaults to the semantic query; `index` defaults to the one ready text ind… |
weight | number | Hybrid only (with `text`): the vector leg's share of the fused score, ≥ 0 (default 1). |
where | object | Optional filter applied before scoring (activates prefilter mode). |
listTextIndexes List text indexes
List the project's keyword (BM25) text indexes: name, label, property ("*" = every string of the record), consistency and status.
createTextIndex Create text index
Declare a keyword (BM25) text index over one property of a label, or every string of it (property "*"). It is built online; once its status is "ready" (listTextIndexes), search it with textSearch or as the `text` leg of vectorSearch.
| Parameter | Type | Description |
|---|---|---|
label * | string | Record label to index. |
property * | string | Property to index, or "*" for every string of the record. |
consistency | string | "eventual" (default): searches see changes shortly after they commit. "immediate": every search sees every committed change. |
name | string | Index name, unique within the project. Defaults to <label>.<property>.text ("all" for "*"). |
deleteTextIndex Delete text index
Drop a text index by name. Irreversible. Confirm with the user before calling.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the text index (from listTextIndexes). |
listIndexes List property indexes
List the project's ordered and unique property indexes (RushDB 3.0.14+): name, label, property (stored normalized, unitPrice → unitprice), unique and status. A unique index means the label holds each value of that property at most once. Text indexes are in listTextIndexes, embedding indexes in findEmbeddingIndexes.
createIndex Create property index
Declare an ordered index on one property of a label (RushDB 3.0.14+): faster filters, ranges, sorting, and $within on a point property. unique: true also refuses any write that would give a second record of the label a value another record of it holds (one record per email, SKU, external id). Declaring a unique index over data that already repeats a value is refused: find and fix the duplicates first. It is built online and starts in status "building" (listIndexes).
| Parameter | Type | Description |
|---|---|---|
label * | string | Record label to index (exact spelling from the schema). |
property * | string | Property to index. |
name | string | Index name, unique within the project. Defaults to <label>.<property>.ordered (or .unique). |
unique | boolean | true: one record of the label per value; conflicting writes fail with 409. Default false (ordered only). |
deleteIndex Delete property index
Drop an ordered or unique index by name. Records are kept; dropping a unique index lets the label repeat values again. Confirm with the user before calling.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the index (from listIndexes). |
textSearch Text search
Keyword (BM25) search over a text index: records matching `query`, best first (__score), among those `labels` and `where` select. `total` counts every match. Query syntax: words match any (or all with allTerms), "quoted phrases", -excluded, +required.
| Parameter | Type | Description |
|---|---|---|
query * | string | Keywords to match. |
allTerms | boolean | Every keyword must match (AND) instead of any (OR). |
index | string | Text index name (from listTextIndexes). Defaults to the one ready text index of the first label. |
labels | array | Record labels to search. |
limit | number | Maximum number of results (default 10). |
phrase | boolean | Match the keywords as one phrase. |
property | string | Narrows the choice of text index to one over this property. |
skip | number | Results to skip for pagination (default 0). |
where | object | Filter applied before ranking. |
semanticSearch Semantic search
Deprecated alias for vectorSearch. Performs direct vector similarity search over records whose `propertyName` has been indexed with createEmbeddingIndex. Prefer vectorSearch for new integrations. For natural-language schema-aware querying, use smartSearch.
| Parameter | Type | Description |
|---|---|---|
labels * | array | One or more record labels to scope the search. The first label is used to resolve the embedding index. |
propertyName * | string | Name of the indexed property to search against. |
dimensions | number | Disambiguates when multiple indexes share the same label+property. Inferred from queryVector length when queryVector is supplied. |
ef | number | ANN gather breadth when the search runs on the ANN graph. |
limit | number | Maximum number of results to return (default 10). |
mode | string | How to rank candidates. "auto" (default): exact on small indexes, the ANN graph on large ones. "exact"/"ann" force a path ("ann" needs a cosine index). |
query | string | Free-text query to embed and compare against stored vectors (managed indexes only). Mutually exclusive with queryVector. |
queryVector | array | Pre-computed embedding vector to search with (external indexes). Mutually exclusive with query. Length must match index dimensions. |
scoreThreshold | number | Keep only results scoring at least this much (scores depend on the embedding model). |
similarityFunction | string | Disambiguates when multiple indexes share the same label+property+sourceType. |
skip | number | Number of results to skip for pagination (default 0). |
sourceType | string | Select which index type to search. Required when both managed and external indexes exist for the same label+property. |
where | object | Optional filter applied before scoring (activates prefilter mode). |
listConnections List connections
List the project's connections to SaaS tools (CRM, billing, support, issue tracking, docs, spreadsheets), custom APIs and webhooks. Each has its status (ready, paused, needs_reauth), mode and schedule, lastSuccessAt, lastError, the running sync (activeRunId) and per-stream label, record count and lastSyncedAt. Use it to tell where a label's records come from and how fresh they are before answering questions about recent data.
getConnection Get connection
One connection by id (from listConnections): status, schedule (nextRunAt), last run and success, last error, and per-stream record counts and lastSyncedAt. Credentials are never returned.
| Parameter | Type | Description |
|---|---|---|
id * | string | Connection id from listConnections. |
syncConnection Sync connection
Start a sync of a connection now, to refresh its data: every enabled stream, or the streams named. Returns the queued import run; follow it with getImport until its status is completed, partial, failed or cancelled. Only when the user asks for fresh data or the connection's lastSuccessAt is too old for the question; a sync writes to the project. full: true re-reads everything from the start (slow; only when asked or when incremental data looks wrong). If a sync is already queued or running, that run is returned instead of a new one. Push (webhook) connections cannot be synced.
| Parameter | Type | Description |
|---|---|---|
id * | string | Connection id from listConnections. |
full | boolean | Ignore stored cursors and read everything again. |
streams | array | Stream names to sync (e.g. ["contacts"]); omit for every enabled stream. |
listImports List import runs
List import runs, newest first: background file imports (kind "file") and connection syncs (kind "sync"), with status, records written and deleted, links created, errors and timing. Filter by kind or connectionId to see the sync history of one connection.
| Parameter | Type | Description |
|---|---|---|
connectionId | string | Only the syncs of this connection. |
kind | string | Only file imports or only connection syncs. |
limit | number | Runs to return, 1–100 (default 20). |
skip | number | Runs to skip for pagination. |
getImport Get import run
One import run by id (a file import or a connection sync, e.g. the run syncConnection returned): status (queued, running, paused_billing, completed, partial, failed, cancelled), progress per file or stream, error sample, and once finished a summary (labels written, relationship suggestions pending review).
| Parameter | Type | Description |
|---|---|---|
id * | string | Import run id. |
smartSearch Smart search
Convert a natural-language question into one read-only SQL statement over the project schema, run it, and return the results plus the statement, a short title for it and any warnings. Rows that select a record come back as records; aggregates such as counts and totals come back as plain rows. Use this for user-facing questions such as "Who are piloting Falcon?" or "How many orders per city?". For direct vector similarity over an embedding index, use vectorSearch instead.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Natural-language search request to convert into SQL and run. |
limit | number | Maximum number of results to return (at most 1000). |
skip | number | Number of results to skip for pagination (default 0). |