Schemas — MDDB API

TrainerParameter #

Type: object

Property Type Description
name string
type string One of "string", "int", "float", "bool", "enum".
description string
min number
max number
values array of string
default any
required boolean
maxLength integer
pattern string

TrainerProfile #

Type: object

Property Type Description
name string
description string
parameters array of TrainerParameter
timeout string
output string
maxConcurrent integer
progress string
trialRecords integer
trialParameters object
trialTimeout string
running integer
evaluate object
evaluate.parameters array of TrainerParameter
evaluate.timeout string
evaluate.baseline boolean

TrainingDatasetRequest #

Type: object

Property Type Description
name string
collections (required) array of string
format (required) string One of "text", "pairs".
filterMeta object
lang string
maxRecords integer Minimum 0. Maximum 1e+06.
shuffle boolean
seed integer
validationRatio number Minimum 0. Maximum 0.5.
dedupe boolean Default true.
pairs object Templates over {content}, {key}, {lang}, {collection} and {meta.}
pairs.input string
pairs.output string
pairs.system string
acknowledgeUnlicensed boolean

TrainingRunRequest #

Type: object

Property Type Description
name string
profile (required) string
datasetId string
dataset TrainingDatasetRequest
parameters object
trial boolean
evaluate boolean
evaluateParameters object

TrainingEvalStage #

Type: object

Property Type Description
status string
error string
exitCode integer
report object
report.total integer
report.correct integer
report.score number Minimum 0. Maximum 1.
report.metrics object
report.samples array of object
report.samples[].input string
report.samples[].expected string
report.samples[].actual string
report.samples[].correct boolean

TrainingJob #

Type: object

Property Type Description
id string
kind string One of "dataset", "run".
name string
status string One of "pending", "processing", "completed", "completedWithWarnings", "failed", "cancelled", "interrupted".
stage string One of "dataset", "trial", "evaluate-base", "training", "evaluate-result".
profile string
parameters object
datasetId string
trial boolean
progress number
progressMessage string
user string
submittedAt integer
startedAt integer
completedAt integer
exitCode integer
error string
warnings array of string
result object
result.file string
result.bytes integer
outputPattern string
summary object
summary.format string
summary.records integer
summary.trainRecords integer
summary.validationRecords integer
summary.bytes integer
summary.unlicensedAcknowledged array of string
summary.collections array of object
summary.collections[].name string
summary.collections[].license string
summary.collections[].documents integer
summary.collections[].records integer
summary.collections[].duplicates integer
summary.collections[].skipped integer
summary.preview array of object
summary.options TrainingDatasetRequest
evaluation object
evaluation.skipped string
evaluation.base TrainingEvalStage
evaluation.result TrainingEvalStage
evaluation.delta number
evaluation.notes array of string
format string
validationRecords integer

TrainingJobList #

Type: object

Property Type Description
jobs array of TrainingJob
total integer

TrainingJobAccepted #

Type: object

Property Type Description
jobId string
job TrainingJob

TrainingJobDetail #

Type: object

Property Type Description
job TrainingJob
log string

ExtractedDocument #

One document /v1/extract/process made of a file (issue 451).

Type: object

Property Type Description
page_content (required) string The Markdown
metadata (required) object source (the file name, plus the part's suffix for a part), converter (the format), mime (the request's Content-Type, when sent), conversionConfidence (a number, converted formats only), conversionWarnings, parent (for a part), and what the file says about itself (email headers), each a string.

Feature #

One switchable module (v2.19.0, GO-049).

Type: object

Property Type Description
name string One of "chat", "chatExternalMcp", "geo", "temporal", "spell", "curation", "automation", "memory", "codeIntel", "eval", "corpus", "classify", "duplicates", "images", "webhooks", "schemas", "aliases", "crossSearch", "searchTuning", "ftsTuning", "webSearch", "rerankApi", "extractApi", "vectorStores", "esCompat", "qdrantCompat".
title string (v2.19.11+) Short plain name for people, e.g. "Geo search"
summary string (v2.19.11+) One plain sentence on what switching the module on gives
description string Technical detail — routes, environment variables, what keeps working while the module is off
enabled boolean Works now — switched on, not forced off, every required module on
configured boolean The switch — what an administrator set, or the default
default boolean
requires array of string
lockedBy string MDDB_FEATURES_FORCE_OFF when the operator forced the module off
blockedBy array of string Required modules that are off
updatedAt string (date-time)
updatedBy string

FeatureError #

Type: object

Property Type Description
error string
feature string
lockedBy string

ChatToolCall #

Type: object

Property Type Description
name (required) string
collection string
durationMs integer (int64)
query string What a logged turn's tool searched for (issue 406) At most 4096 characters.
resultKeys array of string The keys it found, best first (issue 406)
topScore number The best result's score (issue 406)
server string The external MCP server of the tool (MCP-005); absent for a built-in tool At most 256 characters.

ChatFeedback #

A user's rating of one assistant message (issue 406)

Type: object

Property Type Description
rating string One of "up", "down".
comment string At most 2000 characters.
at integer (int64) Unix seconds

ChatMessage #

Type: object

Property Type Description
id string The caller's id when it matches [A-Za-z0-9_-]{1,64} (issue 406), else set by the server
role (required) string One of "user", "assistant", "tool".
content string Required unless toolCalls is set; at most 256000 bytes
toolCalls array of ChatToolCall
model string
provider string
tokens object
tokens.prompt integer (int64)
tokens.completion integer (int64)
createdAt integer (int64) Unix seconds; now when omitted
outcome string Marks a logged turn (assistant only, issue 406); an answered redirect reply is stored as refused One of "answered", "noResults", "refused", "error".
latencyMs integer (int64) Minimum 0.
loopStopped boolean mddb-chat's loop guard cut this answer short (assistant only, 2.19.2+, issue 413)
feedback allOf ChatFeedback Set by POST /v1/chat/conversations/{id}/feedback Read-only.

ChatLogTurn #

One logged turn (issue 406). sub and displayName only for a signed user.

Type: object

Property Type Description
conversationId string
messageId string
scenario string
sub string
displayName string
anonymous boolean
at integer (int64)
question string
answer string
answerExcerpt string The answer on one line, at most 280 characters
outcome string One of "answered", "noResults", "refused", "error".
rating string One of "up", "down".
comment string
model string
provider string
latencyMs integer (int64)
tokens object
tokens.prompt integer (int64)
tokens.completion integer (int64)
toolCalls array of ChatToolCall
loopStopped boolean The loop guard cut the answer short (2.19.2+, issue 413)

ChatLogPage #

Type: object

Property Type Description
turns array of ChatLogTurn
nextCursor string

ChatGap #

Type: object

Property Type Description
question string Normalised
example string The latest question as asked
count integer
noResults integer Of count, the turns that found nothing
lastAskedAt integer (int64)
scenarios array of string

ChatGapsResponse #

Type: object

Property Type Description
gaps array of ChatGap
threshold number

ChatLogging #

A scenario's turn log (issue 406)

Type: object

Property Type Description
enabled boolean Default false.
retentionDays integer An anonymous session's log; 0 is the server default Minimum 0. Maximum 3650.
redact boolean Redact e-mails, tokens and card-like numbers before storage Default true.

ChatConversationSummary #

Type: object

Property Type Description
id string
scenario string
sub string Opaque user id from the host's signed join token
displayName string
title string The start of the first user message (at most 80 characters)
createdAt integer (int64)
updatedAt integer (int64)
lastMessageAt integer (int64)
ended boolean
retentionDays integer
expiresAt integer (int64) The conversation is removed after this unless it is written again
messageCount integer Messages in the whole conversation
redact boolean Stored text is redacted (issue 406); set by an append with redact

ChatConversation #

Type: allOf ChatConversationSummary & object

ChatCreateRequest #

Type: object

Property Type Description
sub (required) string At most 256 characters.
scenario (required) string At most 256 characters.
displayName string At most 256 characters.
retentionDays integer The scenario's retention; 0 or omitted is the server default (MDDB_CHAT_RETENTION_DAYS, 30) Minimum 0. Maximum 3650.

ESInfo #

Type: object

Property Type Description
name string
cluster_name string
cluster_uuid string
version object
version.number string
version.build_flavor string
version.build_type string
version.build_hash string
tagline string

ESSearchRequest #

The Query DSL subset; see docs/ELASTICSEARCH-COMPAT.md.

Type: object

Property Type Description
query object
knn object
knn.field string
knn.query_vector array of number
knn.query_vector_builder object
knn.query_vector_builder.text_embedding object
knn.k integer
knn.num_candidates integer
knn.filter object
size integer Default 10.
from integer Default 0.
sort any
_source any
highlight object
aggs object

ESSearchResponse #

Type: object

Property Type Description
took integer
timed_out boolean
hits object
hits.total object
hits.total.value integer
hits.total.relation string One of "eq".
hits.max_score number | null
hits.hits array of object
hits.hits[]._index string
hits.hits[]._id string
hits.hits[]._score number | null
hits.hits[]._source object
hits.hits[].highlight object
aggregations object
limitCapped boolean from+size was lowered to the server's cap (#368)
limit integer

ESWriteResult #

Type: object

Property Type Description
_index string
_id string
_version integer
result string One of "created", "updated", "deleted", "not_found".
status integer

ESBulkResponse #

Type: object

Property Type Description
took integer
errors boolean
items array of object

ESError #

Type: object

Property Type Description
error object
error.type string
error.reason string
error.root_cause array of object
status integer

OpenAIError #

(#446) An error in the OpenAI shape; the status code is MDDB's.

Type: object

Property Type Description
error object
error.message string
error.type string One of "invalid_request_error", "authentication_error", "permission_error", "server_error".
error.param string | null
error.code string

OpenAIVectorStore #

Type: object

Property Type Description
id string
object string One of "vector_store".
name string
created_at integer Always 0
status string One of "completed".
file_counts object Documents; every stored document is searchable, so all are completed.
file_counts.in_progress integer
file_counts.completed integer
file_counts.failed integer
file_counts.cancelled integer
file_counts.total integer
metadata object
metadata.description string The collection's configured description

OpenAIVectorStoreList #

Type: object

Property Type Description
object string One of "list".
data array of OpenAIVectorStore
first_id string | null
last_id string | null
has_more boolean

OpenAIVectorStoreSearchRequest #

Type: object

Property Type Description
query (required) oneOf string | array of string One query, or several searched as one.
max_num_results integer Values above 50 are lowered to 50. Default 10. Minimum 1.
filters object Accepted and ignored.
rewrite_query boolean Accepted and ignored.
ranking_options object
ranking_options.ranker string Accepted and ignored.
ranking_options.score_threshold number Drops results scoring below it.

OpenAIVectorStoreSearchPage #

Type: object

Property Type Description
object string One of "vector_store.search_results.page".
search_query array of string
data array of object
data[].file_id string The document id
data[].filename string The document key
data[].score number Minimum 0. Maximum 1.
data[].attributes object The document's metadata (several values joined with ", "), plus collection, lang, and url when the metadata has one.
data[].content array of object
data[].content[].type string One of "text".
data[].content[].text string
has_more boolean
next_page string | null

CollectionQuota #

(v2.18.9+, GO-043) Limits for one collection; 0 or absent = no limit. On a write, an omitted quota keeps the stored one and {} removes it; changing it needs a global admin when auth is on (403 otherwise).

Type: object

Property Type Description
maxDocuments integer (int64) Documents the collection may hold Minimum 0.
maxBytes integer (int64) Stored bytes of its documents (revisions and indexes not counted) Minimum 0.
maxVectors integer (int64) Chunk vectors it may hold Minimum 0.
embeddingCallsPerDay integer (int64) Embedding provider calls per UTC day; over it documents wait as pending Minimum 0.
embeddingTokensPerDay integer (int64) Estimated tokens (characters / 4) embedded per UTC day Minimum 0.

CollectionQuotaUsage #

(v2.18.10, GO-043) What a collection uses of its quota, returned by GET /v1/collection-config only for a collection with a quota. Compare each field with the matching CollectionQuota limit. Embedding use is today's (UTC), counted only while the collection has an embedding budget, and starts from zero after a restart.

Type: object

Property Type Description
documents integer (int64) Documents the collection holds (maxDocuments)
bytes integer (int64) Stored bytes of its documents (maxBytes)
vectors integer (int64) Chunk vectors it holds (maxVectors)
embeddingCalls integer (int64) Embedding provider calls today (embeddingCallsPerDay)
embeddingTokens integer (int64) Estimated tokens embedded today (embeddingTokensPerDay)

QuotaExceeded #

(v2.18.9+, GO-043) A write or reindex refused by a quota.

Type: object

Property Type Description
error string
code string One of "QUOTA_EXCEEDED".
status integer One of 429, 507.
collection string Empty for the server-wide limits
tenant string (v2.19.8, GO-054) Present when the limit is the tenant's: the sum over its collections
resource string One of "documents", "bytes", "vectors", "collections", "diskReserve", "vectorRam", "embeddingCalls", "embeddingTokens".
limit integer (int64)
used integer (int64) Current use; for diskReserve, the bytes available
retryAfterSeconds integer Embedding budget only

TenantLimit #

(v2.19.8, GO-054) A request refused by its tenant's or its credential's rate or concurrency limit. The same body on every surface: the REST body, an MCP tool error's structuredContent, GraphQL error extensions; gRPC answers RESOURCE_EXHAUSTED with the message.

Type: object

Property Type Description
error (required) string
code (required) string One of "TENANT_LIMIT".
status (required) integer One of 429.
tenant string Empty for a global user's credential
scope (required) string The tenant as a whole, or one credential (API key or user) One of "tenant", "key".
limit (required) string One of "readRate", "writeRate", "searchConcurrency", "writeConcurrency".
max (required) integer The limit's value
retryAfterSeconds (required) integer

TenantQuota #

(v2.19.8, GO-054) What all of a tenant's collections may use together. A zero or absent field is no limit.

Type: object

Property Type Description
maxDocuments integer (int64)
maxBytes integer (int64) Stored bytes, counted as a collection quota's maxBytes
maxVectors integer (int64)
maxCollections integer (int64) Collections holding documents (or configured); a document for a further, empty collection is refused
embeddingCallsPerDay integer (int64)
embeddingTokensPerDay integer (int64)
vectorRamShare number (double) Share of MDDB_VECTOR_RAM_LIMIT_BYTES; 0 uses MDDB_TENANT_VECTOR_RAM_SHARE Minimum 0. Maximum 1.

TenantLimits #

(v2.19.8, GO-054) A tenant's request limits. 0 or absent takes the server default (MDDB_TENANT_* / MDDB_KEY_*); -1 lifts it.

Type: object

Property Type Description
readPerSecond integer Minimum -1.
writePerSecond integer Minimum -1.
keyReadPerSecond integer Per credential of the tenant Minimum -1.
keyWritePerSecond integer Minimum -1.
maxConcurrentSearches integer Minimum -1.
maxConcurrentWrites integer Minimum -1.
maxConcurrentReindexes integer Minimum -1.

TenantConfigView #

Type: object

Property Type Description
tenant string
quota TenantQuota
limits TenantLimits
effectiveLimits allOf TenantLimits The limits in force, 0 meaning none

TenantQueue #

Type: object

Property Type Description
depth integer Jobs waiting now
taken object Jobs workers took off the queue since start
taken.jobs integer (int64)
taken.waitSecondsTotal number
taken.maxWaitSeconds number

TenantUsageReport #

(v2.19.8, GO-054) A tenant's configuration, use, queues and refusals.

Type: object

Property Type Description
tenant string
quota TenantQuota
limits TenantLimits
effectiveLimits TenantLimits
vectorRamLimitBytes integer (int64) The tenant's share of the vector RAM limit; 0 for none
usage object
usage.documents integer (int64)
usage.bytes integer (int64)
usage.vectors integer (int64)
usage.collections integer (int64)
usage.vectorRamBytes integer (int64) Estimate: the tenant's share of the vectors times the index's size
usage.embeddingCalls integer (int64) Today (UTC), counted while the tenant has an embedding budget
usage.embeddingTokens integer (int64)
collectionNames array of string
queues object index, embedding, embeddingParked (depth only)
inFlight object Searches, writes and reindexes holding one of the tenant's slots now
refusals object Refusals since start per reason: tenant.readRate, key.writeRate, tenant.searchConcurrency, quota.documents, ...

SearchBusy #

(v2.19.8, GO-053) A query refused at the search concurrency limit.

Type: object

Property Type Description
error (required) string
code (required) string One of "SEARCH_BUSY".
status (required) integer One of 503.
retryAfterSeconds (required) integer

RevisionConflict #

Type: object

Property Type Description
error string
expectedRevision string
currentRevision string The document's revision now; empty when it does not exist.

LimitUsed #

(v2.18.10, #368) The result count the search used. Present only with limitCapped.

Type: integer

LimitCapped #

(v2.18.10, #368) The requested (or default) limit was above MDDB_SEARCH_MAX_LIMIT or the collection's retrieval.maxTopK and was lowered to limit. Absent when nothing was capped.

Type: boolean

PassagesResponse #

What a search returns with format "passages" (AGT-002).

Type: object

Property Type Description
rerank RerankReport
rerankSkipped RerankSkipped
limit LimitUsed
limitCapped LimitCapped
passages (required) array of Passage
total integer
contextTruncated boolean
indexing IndexWaitResult
imageHits array of ImageRef (v2.18.9, RAG-010) Images the query matched by their picture, with includeImages.

Passage #

A place in a document (AGT-002, CODE-008): file, inclusive 1-based line range, the innermost definition holding the first line, and optionally the text.

Type: object

Property Type Description
collection (required) string
key (required) string
lang string
path (required) string meta.path, or the key when there is none.
lines (required) object
lines.start (required) integer
lines.end (required) integer
symbol string The innermost definition holding the first line.
kind string The definition kind when the passage is one: function, method, type, class, rule…
content string
score number
source string fts, vector, hybrid, cross, or a symbol relation.
tokens (required) integer Estimated tokens of content.
truncated boolean (v2.19.13) content was cut to the passage token bound; lines is what is left, and a hit line cut short ends in ' […]'.
images array of ImageRef (v2.18.9, RAG-010) The document's images, with includeImages.
container string (v2.19.3, CODE-012) The type or class holding the definition, from semantic facts.
target string (v2.19.3, CODE-012) # of the looked-up definition this passage is about, from semantic facts.

ImageRef #

(v2.18.9, RAG-010) An image document: one stored from a Markdown image link or a PDF picture, with kind image and meta.parent.

Type: object

Property Type Description
key (required) string
lang (required) string
altText string
caption string The figure caption: a link title, an emphasised or "Figure" line under the image, a PDF page's "Figure" line.
page integer The PDF page; absent when unknown.
mimeType string One of "image/jpeg", "image/png", "image/gif", "image/webp".
width integer
height integer
parent string The document the image came from.
score number Similarity to the query, on image hits.
url (required) string GET path of the bytes: /v1/image?collection=…&key=…&lang=…

ImageIndexingStatus #

(v2.18.9, RAG-010) Image documents and their vectors.

Type: object

Property Type Description
documents integer Image documents holding an image.
embedded integer Of them, with an image vector.
model string The multimodal model; absent when the provider embeds no images.
note string Why images are not embedded: they are then found by alt text and captions only.

SymbolRequest #

Type: object

Property Type Description
collection (required) string
name (required) string Bare (Close) or, with semantic facts, qualified (Conn.Close).
path string (v2.19.3) The file (meta.path) of the one definition wanted. (v2.19.13) A directory (internal/session) keeps the definitions under it.
include array of string
limit integer Per relation; also never above MDDB_SEARCH_MAX_LIMIT or the collection's retrieval.maxTopK (v2.18.10+). Default 20. Maximum 200.
includeContent boolean
excludeTests boolean (v2.19.13) Leave out every passage in a test file, before limit is applied.

SymbolResult #

Type: object

Property Type Description
limit LimitUsed
limitCapped LimitCapped
collection string
symbol string
definitions array of Passage
references array of Passage
callers array of Passage
callees array of Passage
tests array of Passage
siblings array of Passage
implementations array of Passage (v2.19.3) Types implementing the interface; needs semantic facts.
precision string (v2.19.3) Where the answer came from. Absent for a heuristic answer to a request without path or implementations. One of "semantic", "mixed", "heuristic".
semanticSource string (v2.19.3) Language servers behind the facts, e.g. gopls/0.24.0.
ambiguous boolean (v2.19.3) Several definitions and no path chose one.
candidates array of object (v2.19.3) The definitions an ambiguous name may mean; ask again with name and path.
candidates[].path (required) string
candidates[].name (required) string Qualified, e.g. Conn.Close.
candidates[].kind (required) string
truncated boolean One flag for the whole response: at least one relation (or candidates) held more than limit, or a lookup stopped at its scan bound of 500 documents or facts. Omitted when nothing was cut; totals says which relations were cut and by how much.
totals object (v2.19.13) Per relation the limit cut, how many passages it held before the limit, e.g. {"references": 32}. Absent when no relation was cut.

GraphExpandOptions #

Tunes retrievalMode "graph" (SRCH-006; graphKinds CODE-008).

Type: object

Property Type Description
graphDepth integer Default 1. Maximum 3.
graphDecay number Default 0.5.
graphMaxNeighbours integer Default 10.
graphDirection string One of "in", "out", "both". Default "both".
graphKinds array of string Expand by symbol relation instead of following graphDirection. implementations (v2.19.3) needs semantic facts; a result with facts expands callers, callees and tests from them.

IndexingStatus #

Queued indexing work (GO-042). Counters are since server start.

Type: object

Property Type Description
collection string Empty for the server-wide aggregate.
pendingEmbeddings integer Embedding jobs queued or running.
failedEmbeddings integer Jobs that left a document without vectors (provider failure or a full queue); reindex to recover.
completedEmbeddings integer
pendingMetadata integer Queued metadata-index updates from batch updates. Single writes never appear here.
progress number completed / (completed + pending); 1 when nothing is pending.
oldestPendingAt string (date-time)
provider string Embedding model; absent when none is configured.
indexed boolean Nothing pending — a search sees every document written so far.
images ImageIndexingStatus
trainingCollections array of string (v2.18.10+, GO-047) Collections whose trainable indexes (ivf, pq, opq, sq, sq4) are still training after a load; flat and hnsw already answer for them. Absent when none are.

IndexWaitResult #

Type: object

Property Type Description
waitedMs integer
timedOut boolean The wait ran out before the work drained; results may miss the newest documents.

WriteIndexing #

Type: object

Property Type Description
embeddingQueued boolean The write queued an embedding: searchable by text now, by meaning when it finishes.

AddResponse #

Type: allOf Document & object

GroupBy #

Result grouping (SRCH-016, v2.18.8). Keeps at most perGroup results for each value of key, best first, then cuts to topK. key is a metadata key (its first value), document (chunks of one document — use with retrievalMode: chunk) or collection (cross-search). Documents without the metadata key are never merged with each other. Order: candidates (topK × oversample) → parent dedupe → groupBy → MMR → topK. Parent-mode deduplication is {key: document, perGroup: 1}. A collection's retrieval profile may set a default; a request's own groupBy wins.

Type: object

Property Type Description
key (required) string
perGroup integer Default 1. Minimum 1. Maximum 100.

MetaFilter #

Operator metadata filter (SRCH-017, v2.18.8), ANDed with filterMeta. One condition per metadata key; keys are ANDed. Inside a condition the value operators (in, prefix, contains, gt, gte, lt, lte) must all hold for the same value, and a document with several values matches when any one does. not and exists judge the whole document, so not keeps documents that lack the key. Every operator is answered from the metadata index without reading document bodies. Bounds compare numerically when both sides are numbers, by time when the value is a date and the bound a date or unix timestamp, lexically otherwise. An unknown operator is a 400 that names it.

Type: object

MetaCondition #

Type: object

Property Type Description
in oneOf string | array of string Exact values; one string or an array.
prefix string Value starts with (exact case; seeks the index).
contains string Value contains the substring (case-insensitive).
gt oneOf string | number
gte oneOf string | number
lt oneOf string | number
lte oneOf string | number
not oneOf string | array of string The document has none of these values (documents without the key match).
exists boolean The document has (true) or lacks (false) the key.

CodeGraphResponse #

One traversal of the code connection graph. Nodes and edges are sorted, so two responses can be diffed to see what a change did.

Type: object

Property Type Description
collection string
root string The key the traversal started from
direction string One of "in", "out", "both".
depth integer
nodes array of object
nodes[].key string
nodes[].docId string
nodes[].lang string
nodes[].language string Source language, e.g. css, html, javascript, c, go, python, terraform, yaml
nodes[].depth integer Hops from the root, by the shortest path
edges array of object
edges[].from string
edges[].to string
edges[].kind string One of "uses-selector", "calls", "references", "imports".
edges[].symbol string The selector or path that justifies this edge. Without it the answer is only "these files are related", which is not actionable.
edges[].direction string Which way the walk found the edge: out from the document that depends, in from the one depended on. Each edge (from, to, kind, symbol) is listed once; with direction both and depth above 1 the walk meets it from both ends, and the direction kept is the one found first — the hop nearer the root (2.19.0+; before, such an edge was listed twice). One of "in", "out".
edges[].lines object Present only when lines was requested. A symbol usually occurs more than once, so these are the first occurrence — a place to jump to, not a complete answer. Zero means the symbol is not literal text in that file.
edges[].lines.fromLine integer
edges[].lines.toLine integer
truncated boolean A depth or degree limit cut the walk short, so "nothing else depends on this" cannot be read from a truncated result.

MCPAPIKeySummary #

Public view of an MCP API key. Carries no key material: fingerprint is four bytes of SHA-256 over the key, and keyPrefix holds only the scheme marker every key starts with.

Type: object

Property Type Description
toolsets array of string Toolsets the key is limited to (MCP-003); absent means all.
keyPrefix string Scheme marker only — never a slice of the key.
fingerprint string Stable, non-reversible identifier; matches what the server logs.
name string
createdAt integer (int64)
expiresAt integer (int64) Unix timestamp; absent when the key never expires.
disabled boolean
collections array of string The key's collection scope (v2.19.9), as stored; absent means every collection.
readOnly boolean The key may only read (v2.19.9).
scenario string The chat scenario the key is bound to (v2.19.9).
readOnlyCollections array of string Collections of the scope the key may only read (v2.19.11), as stored.
memoryNamespace string The memory namespace the key shares with other keys (v2.19.11); absent when it has its own.

MCPAPIKeyRef #

Identifies an existing key: by its full value, or (2.19.6) by the fingerprint the listing shows. key wins when both are sent.

Type: object

Property Type Description
key string
fingerprint string The key's fingerprint from GET /v1/mcp/keys (2.19.6). Two stored keys sharing it are refused with 409.

RotationJob #

Encryption re-keying job descriptor (2.9.16+).

Type: object

Property Type Description
id string
status string One of "queued", "running", "completed", "failed".
primaryKeyID integer
startedAt integer (int64) Unix nanoseconds
finishedAt integer (int64)
scanned integer (int64)
reencrypted integer (int64)
skipped integer (int64)
errors integer (int64)
lastError string

WikiImportResponse #

Type: object

Property Type Description
imported integer Number of pages successfully imported
skipped integer Number of pages skipped (wrong namespace, redirects, empty)
failed integer Number of pages that failed to import
errors array of string Error messages (capped at 10)
collection string Target collection name
durationMs integer (int64) Total import duration in milliseconds

TemporalEvent #

Type: object

Property Type Description
docId string
collection string
eventType string One of "create", "update", "access".
timestamp integer (int64)

Document #

Type: object

Property Type Description
id string Auto-generated document ID
key string Document key (unique within collection and language)
lang string Language code (e.g., en_US, pl_PL, de_DE)
meta object Metadata key-value pairs (values are arrays)
contentMd string Markdown content
addedAt integer (int64) Unix timestamp when document was created
updatedAt integer (int64) Unix timestamp when document was last updated

ListedDocument #

A POST /v1/search result.

Type: allOf Document & object

AddRequest #

Type: object

Property Type Description
expectedRevision string (v2.18.8, INT-021) Write only if the document is at this revision; 409 otherwise, including when it does not exist yet.
ifAbsent boolean (v2.19.6, #423) Create only: 409 with the current revision, and nothing written, when the document exists. A document past its TTL counts as absent. 400 when combined with expectedRevision.
collection (required) string Collection name
key (required) string Document key
lang (required) string Language code
meta object Metadata key-value pairs
contentMd (required) string Markdown content

AddBatchRequest #

Type: object

Property Type Description
collection (required) string Collection name
documents (required) array of AddBatchDocument Documents to add

AddBatchDocument #

Type: object

Property Type Description
key (required) string Document key
lang (required) string Language code
contentMd (required) string Markdown content
meta object Metadata key-value pairs
saveRevision boolean Whether to save a revision Default false.

AddBatchResponse #

Type: object

Property Type Description
added integer Number of documents added
updated integer Number of documents updated
failed integer Number of documents that failed
errors array of string Error messages for failed documents
embeddingDropped integer (v2.15.0+) Documents stored without a vector because the embedding queue was full and the write gave up waiting. Present only when non-zero. failed stays 0: the documents ARE stored, they are just unreachable by vector and hybrid search until POST /v1/vector-reindex fills them in. See MDDB_EMBEDDING_QUEUE_SIZE / MDDB_EMBEDDING_QUEUE_WAIT.

BulkIngestSubmitRequest #

Type: object

Property Type Description
collection (required) string Target collection
documents (required) array of AddBatchDocument Documents to ingest; processed in chunks of 500
callbackUrl string Optional URL that receives a POST with the final job record on completion

BulkIngestJob #

Type: object

Property Type Description
id string Unique job identifier
collection string
status string - pending: queued, worker has not picked it up yet - processing: worker is actively committing chunks - completed: finished (may include per-document failures) - failed: all documents failed or the server restarted mid-job - cancelled: user cancelled while still pending One of "pending", "processing", "completed", "failed", "cancelled".
total integer Total documents submitted
processed integer Documents processed so far (includes successes and failures)
added integer Documents added to the collection
updated integer Documents updated
failed integer Documents that failed to commit
errors array of string Up to 50 error messages recorded during processing
callbackUrl string Webhook URL supplied at submit time
submittedAt integer (int64) Unix timestamp (seconds) when the job was submitted
startedAt integer (int64) Unix timestamp when the worker picked up the job
completedAt integer (int64) Unix timestamp when the job reached a terminal status

GeoJSONPolygon #

Type: object

Property Type Description
type string GeoJSON geometry type. Optional — the handler fills it in when omitted. One of "Polygon".
coordinates (required) array of array of array of number Array of linear rings. The first ring is the outer boundary; any subsequent rings are holes. Each ring is an array of [lng, lat] pairs (RFC 7946 order) with at least 3 points.

GeoJSONMultiPolygon #

Type: object

Property Type Description
type string One of "MultiPolygon".
coordinates (required) array of array of array of array of number Array of Polygon coordinate arrays. Union semantics — a document matches if it lies inside any member polygon.

GeoPolygonRequest #

Exactly one of polygon or multiPolygon must be set.

Type: object

Property Type Description
collection (required) string
polygon GeoJSONPolygon
multiPolygon GeoJSONMultiPolygon
filterMeta object Optional metadata pre-filter (AND across keys, OR within key)
includeContent boolean Default false.

GeoPolygonResponse #

Type: object

Property Type Description
results array of object
results[].document object
results[].rank integer
total integer
shape string One of "polygon", "multiPolygon".
algorithm string

GeoSearchResultItem #

Type: object

Property Type Description
document Document
distanceMeters number (double) Distance from the query point; set by /v1/geo-search only.
rank integer 1-based position in the answer.

GeoSearchResponse #

Type: object

Property Type Description
results array of GeoSearchResultItem
total integer
radiusMeters number (double)
algorithm string One of "rtree", "geohash".
limit integer The topK served, when the server's cap lowered it (#368).
limitCapped LimitCapped

GeoWithinResponse #

Type: object

Property Type Description
results array of GeoSearchResultItem
total integer
algorithm string

GeoReindexResponse #

Type: object

Property Type Description
points integer Points indexed.
collection string The collection rebuilt; absent when all were.
postcodesLoaded object Postcodes loaded per country, when loadPostcodes was given.
durationMs integer (int64)

GeoStatsResponse #

Type: object

Property Type Description
collections object
postcodeDatasets object
ready boolean

GeoEncodeResponse #

Type: object

Property Type Description
geohash string
precision integer Length of the geohash.

GeoDecodeResponse #

Type: object

Property Type Description
lat number (double) Latitude of the cell's centre.
lng number (double) Longitude of the cell's centre.
minLat number (double)
maxLat number (double)
minLng number (double)
maxLng number (double)

IngestRequest #

Type: object

Property Type Description
collection (required) string Collection name
documents (required) array of IngestDocument Documents to ingest
options IngestOptions

IngestDocument #

A document to store. Send Markdown in contentMd, or (v2.18.9+) a file in contentBase64 with its format: the server converts it with the same converters /v1/upload uses and stores the Markdown, with meta.sourceFormat set to the format.

Type: object

Property Type Description
url string (uri) Source URL (used for key derivation and auto-injected as source_url metadata)
key string Document key (derived from URL if empty)
lang (required) string Language code
contentMd string Markdown content
meta object Metadata key-value pairs
extractFrontmatter boolean Parse YAML frontmatter from content and merge into metadata Default false.
scrapedAt integer (int64) Unix timestamp of when the content was scraped (auto-injected as scraped_at metadata)
scraper string Scraper identifier (auto-injected as scraper metadata)
ttl integer (int64) Time-to-live in seconds
format string (v2.18.9+) Convert the document from this format: html, pdf, docx, odt, rtf, xlsx, ods, csv, tsv, pptx, odp, epub, eml, mbox, tex, yaml, log. Empty means the key's extension; a signature in the content (%PDF, a zip's main part) wins over both. Without contentBase64, contentMd is taken as the file's text (HTML sent as a string, say).
contentBase64 string (byte) (v2.18.9+) The file to convert, base64-encoded. With skipDuplicates, the converted Markdown is what is compared, so an unchanged file is skipped.
images array of object (v2.18.9, RAG-010) The files a Markdown document's image links name by relative path, read with options.extractImages. An image whose bytes changed is written even under skipDuplicates.
images[].path (required) string
images[].contentBase64 (required) string (byte)

IngestOptions #

Type: object

Property Type Description
skipDuplicates boolean Skip documents whose content hasn't changed (CRC32 hash comparison) Default false.
skipEmbeddings boolean Skip embedding generation for this batch Default false.
skipFts boolean Skip FTS indexing for this batch Default false.
skipWebhooks boolean Skip webhook firing for this batch Default false.
autoConfigureCollection boolean Auto-configure collection as "scraping" type if it doesn't exist Default false.
saveRevision boolean Save revision history for all documents in this batch Default false.
profile string (v2.12.0+) Named preset of the flags above. default keeps every step. fast trades parsing fidelity and per-document bookkeeping for throughput: text-only parsing, no webhooks, no revisions, duplicates skipped. Notably fast does NOT skip embeddings or FTS — that is a separate decision with its own flag. Any flag set explicitly overrides the preset, so fast plus saveRevision: true keeps revisions. An unknown name is rejected with 400 rather than falling back silently. One of "default", "fast". Default "default".
textOnly boolean (v2.12.0+) Extract plain text from html/docx/odt instead of rebuilding their structure as Markdown. Implied by profile: fast. PDF has no text-only variant: its extractor already produces plain text and builds no structure. Default false.
extractImages boolean (v2.18.9, RAG-010) Store the images of Markdown documents (data URIs, files sent in images) and PDFs (JPEG and 8-bit RGB/gray Flate pictures) as image documents under KEY/images/: kind image, meta.parent, altText, caption, page. At most 2 MB each; JPEG, PNG, GIF, WebP. On by default in a collection of type images. Default false.
fetchRemoteImages boolean (v2.18.9, RAG-010) With extractImages, fetch Markdown image links to http(s) URLs through the SSRF guard. Off by default. Default false.

IngestResponse #

Type: object

Property Type Description
added integer Number of documents added
updated integer Number of documents updated
skipped integer Number of documents skipped (deduplication)
failed integer Number of documents that failed
errors array of string Error messages for failed documents
collection string Collection name
durationMs integer (int64) Total processing time in milliseconds
profile string (v2.12.0+) Which ingest profile actually applied, so a corpus loaded months ago can be explained without guessing which flags the caller sent.
sanitized integer How many documents had undecodable bytes dropped because their text was not valid UTF-8 (GO-036). A bulk import sanitises rather than failing, so one page in Windows-1250 cannot abort the other twenty thousand — but the count says how many were changed. Single-document writes refuse instead, with an error naming the encoding.
keyCollisions array of string (v2.12.0+) Input keys that differ only in letter case and therefore name one document — README.md and readme.md are the same document, and the last write wins. The write still happens; refusing a large import over a spelling would be worse. Absent when there are no collisions.
conversions array of IngestConversion (v2.18.9+, GO-046) Every document converted from a file sent with contentBase64/format — including an email's attachments and a mailbox's messages — with how well it converted. A scan without a text layer is named here, not found later.

IngestConversion #

Type: object

Property Type Description
key string
format string The format the document was converted from
conversionConfidence number (double) Minimum 0. Maximum 1.
conversionWarnings array of string

GetRequest #

Type: object

Property Type Description
collection (required) string Collection name
key (required) string Document key
lang (required) string Language code
env object Template variables for substitution

SearchRequest #

Type: object

Property Type Description
collection (required) string Collection name
filterMeta object Metadata filters (AND between keys, OR between values)
filter MetaFilter
sort string Sort field One of "addedAt", "updatedAt", "key".
asc boolean Sort ascending (default false)
limit integer Maximum number of results
offset integer Number of results to skip

DeleteRequest #

Type: object

Property Type Description
collection (required) string Collection name
key (required) string Document key
lang (required) string Language code
expectedRevision string (v2.19.6, #424) Delete only if the document is at this revision; 409 otherwise, including when it does not exist.

DeleteCollectionRequest #

Type: object

Property Type Description
collection (required) string Collection name to delete

ExportRequest #

Type: object

Property Type Description
collection (required) string Collection name
filterMeta object Optional metadata filters
format (required) string Export format One of "ndjson", "zip".
keys array of DocRef Optional (2.19.7+): export only these documents, in this order; narrowed further by filterMeta when both are given. Empty or absent exports the whole selection.

DocRef #

One document of a collection, named by key and language.

Type: object

Property Type Description
key (required) string
lang (required) string

TruncateRequest #

Type: object

Property Type Description
collection (required) string Collection name
keepRevs (required) integer Number of revisions to keep per document (0 = delete all history)
dropCache boolean Clear document cache after truncation

Stats #

Type: object

Property Type Description
databasePath string
databaseSize integer (int64) Database file size in bytes
mode string One of "read", "write", "wr".
collections array of object
collections[].name string
collections[].documentCount integer
collections[].revisionCount integer
collections[].metaIndexCount integer
collections[].checksum string 8-character hex CRC32 checksum of the collection
totalDocuments integer
totalRevisions integer
totalMetaIndices integer
indexing IndexingStatus
groups array of object (v2.19.8, GO-052) Only with collection placement (MDDB_PLACEMENT_GROUPS): every node group asked, with its document count, or the error when it did not answer. collections then lists each group's collections and the totals cover all groups; the other fields are the receiving node's.
groups[].name string
groups[].totalDocuments integer
groups[].error string Why the group did not answer; absent when it did
statsComputedAt string (date-time) (v2.18.5+) When the counts were computed (#349)
statsAgeSeconds integer (v2.18.5+) Age of the counts. Zero-ish on a database written since only by cheap walks
statsPending boolean (v2.18.5+) The first walk after a start is still running; counts are omitted, ask again shortly
indexQueue object Async metadata-indexing queue health. fallbacks counts jobs that were indexed synchronously because the queue was full (they are never dropped). Omitted when the queue is not initialised.
indexQueue.processed integer
indexQueue.failed integer
indexQueue.fallbacks integer
indexQueue.queueLen integer
uptime string

VectorSearchRequest #

Type: object

Property Type Description
rerank RerankOptions
includeImages boolean (v2.18.9, RAG-010) Attach each hit's image documents — those whose meta.parent is the hit's key — as images, with alt text, caption and page. Without it nothing is looked up and the response is unchanged.
queryImage string (v2.18.9, RAG-010) Search by an image instead of text: base64, a data URI, or an http(s) URL fetched through the SSRF guard (at most 2 MB; JPEG, PNG, GIF or WebP). Needs a provider that embeds images (Voyage, Cohere Embed v3+); otherwise 400. The results are image documents (algorithm image), each naming its meta.parent.
format string passages returns path + lines + enclosing definition + text per hit instead of documents (AGT-002, v2.18.8); the response is a PassagesResponse. One of "results", "passages".
passageLines integer Lines of context on each side of a hit (default 10); a hit inside a shorter definition returns the definition. Minimum 0. Maximum 200.
passageTokens integer (v2.19.13) The most tokens one passage may hold. Unset, a passage cut around a hit holds at most 500; chunks and vector hits are cut only when this is set. A passage over it loses context lines, then the end of its hit line, and carries truncated: true. Minimum 0. Maximum 8000.
graphExpand GraphExpandOptions
readLevel string indexedPlusPending also returns documents whose embedding is still queued, found by their text and marked pendingEmbedding (vector search; hybrid search already includes them). GO-042. One of "indexed", "indexedPlusPending".
waitForIndex integer Wait up to this many ms for queued embeddings before searching; running out of time is not an error (indexing.timedOut). Minimum 0. Maximum 30000.
waitForKeys array of string With waitForIndex, wait only for these document keys.
groupBy GroupBy
oversample number (v2.12.0+) Recall/latency knob: candidates fetched per requested result before deduplication, merging or rescoring trims them. Omitted, uses the collection's retrieval profile then MDDB's default of 3.0. Out of range returns 422 rather than clamping. See SEARCH.md#oversampling for measured effect. Minimum 1. Maximum 10.
collection (required) string Collection name to search
query string Natural language query string (required if queryVector is not provided)
queryVector array of number (float) Raw embedding vector (optional, use instead of query for pre-computed embeddings)
topK integer Number of top results to return (default 5) Default 5.
threshold number (float) Minimum cosine similarity score (0.0 to 1.0) Minimum 0. Maximum 1.
filterMeta object Metadata filters to narrow results before ranking
filter MetaFilter
includeContent boolean Whether to include document content in results (default false) Default false.
algorithm string Search algorithm to use (default "flat", or the collection profile's retrieval.vectorAlgorithm). - auto (v2.18.9+): the query planner chooses per query from the collection size, the indexes already built and the filter's selectivity; it never builds an index on the query path. See SEARCH.md#auto-the-server-chooses. - flat: Exact brute-force cosine similarity (most accurate, slower for large datasets) - hnsw: Hierarchical Navigable Small World graph (fast approximate, best general-purpose) - ivf: Inverted File Index with k-means clustering (good for large datasets) - pq: Product Quantization (compressed, lowest memory, slightly less accurate) - opq: Optimised Product Quantization — PQ with a learned rotation - sq: Scalar Quantization to 8 bits per dimension (4x smaller than float32) - sq4: Scalar Quantization to 4 bits, two dimensions per byte (8x smaller). Measured at 99.5% of sq's recall@10 for half its storage — see TestQuantizerRecallCurve. Reach for it when a collection no longer fits in RAM at sq. - bq: Binary Quantization to 1 bit per dimension (32x smaller, much coarser) - quantized: Follows the collection's own quantization setting One of "flat", "auto", "hnsw", "ivf", "pq", "opq", "sq", "sq4", "bq", "quantized". Default "flat".
distanceMetric string Distance metric for similarity computation One of "cosine", "dot_product", "euclidean". Default "cosine".
retrievalMode string Result granularity (default "parent"). - parent: One result per document, scored by its best-matching chunk. - chunk: One result per matching chunk; each result carries chunkIndex and chunkText with the exact matching passage — ideal for feeding precise context to an LLM. - window: Like chunk, but the passage is widened with windowSize neighboring chunks on each side. One of "parent", "chunk", "window", "graph". Default "parent".
windowSize integer Neighbor chunks per side in "window" retrieval mode (default 1) Default 1.
mmr boolean Diversify results with Maximal Marginal Relevance reranking. Selection balances query relevance against similarity to already selected results, so near-duplicate documents stop crowding out distinct ones. Default false.
mmrLambda number (float) MMR relevance/diversity balance in [0,1] — 1.0 keeps the pure relevance order, 0.0 maximizes diversity (default 0.5). Default 0.5. Minimum 0. Maximum 1.
explain PlanExplain
latencyTargetMs PlanLatencyTarget
positive FeedbackExamples
negative FeedbackExamples
feedbackMode FeedbackMode
feedbackWeight FeedbackWeight
rocchio RocchioWeights
queryDecomposition QueryDecompositionMode

PlanExplain #

(v2.18.9+, SRCH-013) Add plan to the response — the vector index that answered and why.

Type: boolean

Default false.

PlanLatencyTarget #

(v2.18.9+, SRCH-013) Latency goal in ms for algorithm auto; 10 or less favours a quantized index (bq, sq4, sq) on 10,000+ vectors. Out of range returns 422.

Type: integer

Minimum 0. Maximum 60000.

SearchPlan #

How a vector search ran and why (v2.18.9+, SRCH-013). Present only when the request set explain.

Type: object

Property Type Description
algorithm string The index that answered; auto for a cross search, whose targets are planned one by one.
prefilter boolean The filter was applied first and the admitted documents scanned exactly.
strategy string (v2.19.8+, SRCH-024) How a filtered search ran: prefilter scored the admitted documents exactly, graph+filter walked the HNSW graph with the filter, ivf probed clusters and skipped refused vectors, scan+filter scanned a quantized index with the filter. Absent without a filter. With an explicit hnsw, the strategy HNSW itself chose. One of "prefilter", "graph+filter", "ivf", "scan+filter".
candidates integer Hits asked of the index, topK × oversample.
iterativeScan boolean A filtered index search came back short of topK and the scan continued further into the index.
reasons array of string
collections object Cross search with auto, one plan per target collection.
feedback FeedbackApplied
decomposition QueryDecomposition

RerankOptions #

(v2.19.8+, RAG-011) Order the search's best candidates with the configured reranking model. Off unless enabled here or in the collection's retrieval.rerank; without a configured provider an enabled request answers with rerankSkipped: notConfigured. The model reads passages (the chunk, or the window where the query meets the document), at most 2048 characters each. Out of range returns 422 (400 on /v1/fts).

Type: object

Property Type Description
enabled boolean
candidates integer Results the model orders; 0 = the profile's, then MDDB_RERANK_MAX_CANDIDATES (which also caps it). Minimum 0. Maximum 200.
topN integer Results kept after reranking; 0 = topK. Minimum 0. Maximum 1000.
explain boolean Report each candidate's rank before and after in rerank.moves.

RerankReport #

(v2.19.8+, RAG-011) Present when the reranking model ordered the results.

Type: object

Property Type Description
model string
candidates integer Passages sent to the model, cached ones included.
cached integer Passages scored from the cache, without a call.
durationMs number
moves array of object With explain, in the new order.
moves[].id string
moves[].collection string Cross search only.
moves[].before integer
moves[].after integer
moves[].score number The model's relevance score.

RerankSkipped #

(v2.19.8+, RAG-011) Present when a requested rerank did not run; the results are the search's own order. A provider never fails a search.

Type: string

One of "timeout", "error", "invalidResponse", "budget", "notConfigured", "noQuery".

QueryDecompositionMode #

(v2.18.10+, SRCH-020) auto searches a query of several clauses — split at sentence punctuation and at "and" between clauses, at most 4 parts — part by part as well as whole, and each document keeps its best score. One embedding call per part. A query with nothing to split, or sent as queryVector, is searched whole. Hybrid search splits the vector half only. off is today's search. Another value returns 422.

Type: string

One of "off", "auto". Default "off".

QueryDecomposition #

(v2.18.10+, SRCH-020) How the query was split, in the plan; set with queryDecomposition auto.

Type: object

Property Type Description
parts integer Parts searched besides the whole query; 1 = not split.
texts array of string The parts, when there was more than one.

FeedbackExamples #

(v2.18.9+, SRCH-015) Relevance feedback examples: a document key or ID from an earlier result, or a vector of the query's dimensions. {"key": ...} and {"vector": [...]} are accepted too. A key with no embedding returns 422.

Type: array of oneOf string \| array of number (float) \| object

FeedbackMode #

(v2.18.9+, SRCH-015) query moves the query vector (Rocchio) and works with every index; rescore re-ranks the topK × oversample candidates by similarity to the examples.

Type: string

One of "query", "rescore". Default "query".

FeedbackWeight #

(v2.18.9+, SRCH-015) rescore mode — how much the examples move a score.

Type: number

Default 0.5. Minimum 0. Maximum 10.

RocchioWeights #

(v2.18.9+, SRCH-015) query mode weights of q′ = alpha·q + beta·mean(positive) − gamma·mean(negative).

Type: object

Property Type Description
alpha number Default 1. Minimum 0. Maximum 10.
beta number Default 0.75. Minimum 0. Maximum 10.
gamma number Default 0.25. Minimum 0. Maximum 10.

FeedbackApplied #

(v2.18.9+, SRCH-015) The correction relevance feedback made, in the plan.

Type: object

Property Type Description
mode string One of "query", "rescore".
positive integer
negative integer
alpha number
beta number
gamma number
queryShift number 1 − cosine(query, corrected query), query mode.
weight number
rescored integer Candidates rescored, rescore mode.

VectorSearchResponse #

Type: object

Property Type Description
rerank RerankReport
rerankSkipped RerankSkipped
limit LimitUsed
limitCapped LimitCapped
imageHits array of ImageRef (v2.18.9, RAG-010) With includeImages and a provider that embeds images: the images whose picture matches the query, scored in the image space and kept apart from results.
plan SearchPlan
indexing IndexWaitResult
results (required) array of VectorSearchResultItem
total integer Number of results returned
model string Embedding model used
dimensions integer Embedding vector dimensions
algorithm string Algorithm used for this search
distanceMetric string Distance metric used for this search
searchStats SearchStats

VectorSearchResultItem #

Type: object

Property Type Description
images array of ImageRef (v2.18.9, RAG-010) The document's images, with includeImages.
pendingEmbedding boolean The document's embedding is still queued; it was found by its text (GO-042).
group string Group this result counted against (only with groupBy, SRCH-016).
groupRank integer 1-based place of this result within its group (only with groupBy).
document Document
score number (float) Cosine similarity score (0.0 to 1.0)
rank integer Result rank (1-based)
chunkIndex integer Index of the matching chunk (only in chunk/window retrieval modes)
chunkText string The matching passage text (only in chunk/window retrieval modes)

VectorReindexRequest #

Type: object

Property Type Description
collection (required) string Collection name to reindex
force boolean If true, re-embed even if content is unchanged Default false.
async boolean (v2.18.4+) Run as a background job; poll /v1/vector-reindex/jobs/{id} Default false.

VectorReindexResponse #

Type: object

Property Type Description
embedded integer Number of documents embedded
skipped integer Number of documents skipped (content unchanged)
failed integer Number of documents that failed to embed
totalChunks integer Total number of chunks embedded across all documents
errors array of string Error messages for failed embeddings

VectorStatsResponse #

Type: object

Property Type Description
enabled boolean Whether vector search is enabled
provider string The embedding service that is called. Since 2.19.2 (#415) this is the provider's name; before, it repeated the model name, which hid a provider configured with another provider's model. One of "openai", "ollama", "cohere", "voyage", "lexical".
model string Embedding model name
dimensions integer Embedding vector dimensions
index_ready boolean Whether the vector index is loaded and ready
statsComputedAt string (date-time) (v2.18.5+) When the counts were computed; they come from the shared statistics snapshot (#349)
statsAgeSeconds integer (v2.18.5+) Age of the counts
statsPending boolean (v2.18.5+) The first count after a start is still running
indexProgress object (v2.18.4+) Present while the index loads at startup (#346).
indexProgress.collectionsDone integer
indexProgress.collectionsTotal integer
indexProgress.vectorsDone integer
indexProgress.vectorsTotal integer
indexProgress.percent number
indexProgress.etaSeconds integer -1 until it can be estimated
indexProgress.current string Collection being loaded
indexProgress.readyCollections array of string Collections that already answer
indexTraining object (v2.18.10+, GO-047) Present while the trainable indexes are training after a load. A collection is searchable with flat and hnsw once its vectors are in; the indexes listed refuse it with 503 until it is trained, and algorithm auto does not pick them.
indexTraining.current string Collection being trained now
indexTraining.pending array of string Collections not trained yet, current included, in training order
indexTraining.indexes array of string Indexes that wait for the training (ivf, opq, pq, sq, sq4)
collections object Per-collection embedding statistics
queue object (v2.15.0+) Embedding queue state. It answers the question the two document counts cannot: whether embedding is still running or gave up. Absent when no embedding worker is configured.
queue.size integer Queue capacity (MDDB_EMBEDDING_QUEUE_SIZE)
queue.depth integer Jobs waiting now; above zero means embedding is still running
queue.dropped integer (int64) Documents stored without a vector since startup, because the queue was full and the write gave up waiting. Repair with POST /v1/vector-reindex.
queue.wait string How long a write waits for queue room (MDDB_EMBEDDING_QUEUE_WAIT)
chunking object Chunking configuration
chunking.enabled boolean Whether document chunking is enabled
chunking.chunkSize integer Maximum characters per chunk
indexPersistence object (v2.19.8+, SRCH-023) The index checkpoint settings in force.
indexPersistence.enabled boolean MDDB_VECTOR_INDEX_PERSIST, and the database is a file
indexPersistence.formatVersion integer The checkpoint format this build writes and reads
indexPersistence.checkpointIntervalSeconds integer MDDB_VECTOR_INDEX_CHECKPOINT_INTERVAL_SEC
indexPersistence.checkpointChanges integer MDDB_VECTOR_INDEX_CHECKPOINT_CHANGES

VectorIndexPersistence #

(v2.19.8+, SRCH-023) Where a collection's vector indexes came from at the last load, and its last checkpoint write. Absent when checkpoints are off or the collection was not loaded.

Type: object

Property Type Description
source string disk — every checkpointed index was read from the file; rebuilt — none was; partial — some were. One of "disk", "rebuilt", "partial".
indexes object The same per index (hnsw, ivf, pq, opq, sq, sq4).
reason string Why something was rebuilt (no checkpoint, a failed checksum, another format version, another embedding model, stale vectors).
loadMs integer Time spent reading and matching the checkpoint.
caughtUp integer Vectors stored after the checkpoint, added to what was read.
checkpoint object The last checkpoint write; absent until one was attempted.
checkpoint.at string (date-time)
checkpoint.bytes integer (int64)
checkpoint.durationMs integer (int64)
checkpoint.indexes array of string
checkpoint.error string Present when the write failed; the previous file is kept.

VectorCompactResponse #

Type: object

Property Type Description
collection string
vectors integer Live vectors the rebuilt graph holds
tombstonesBefore integer
tombstonesAfter integer Above zero only when documents were removed or overwritten during the rebuild
elapsedMs integer (int64)

FTSSearchRequest #

Type: object

Property Type Description
rerank RerankOptions
includeImages boolean (v2.18.9, RAG-010) Attach each hit's image documents — those whose meta.parent is the hit's key — as images, with alt text, caption and page. Without it nothing is looked up and the response is unchanged.
format string passages returns path + lines + enclosing definition + text per hit instead of documents (AGT-002, v2.18.8); the response is a PassagesResponse. One of "results", "passages".
passageLines integer Lines of context on each side of a hit (default 10); a hit inside a shorter definition returns the definition. Minimum 0. Maximum 200.
passageTokens integer (v2.19.13) The most tokens one passage may hold. Unset, a passage cut around a hit holds at most 500; chunks and vector hits are cut only when this is set. A passage over it loses context lines, then the end of its hit line, and carries truncated: true. Minimum 0. Maximum 8000.
groupBy GroupBy
collection (required) string Collection name to search
query (required) string Full-text search query string
limit integer Maximum number of results (default 50) Default 50.
algorithm string Scoring algorithm to use (default "tfidf"). - tfidf: Classic TF-IDF scoring - bm25: Okapi BM25 with document length normalization (k1=1.2, b=0.75) - bm25f: BM25F field-weighted scoring — applies different weights to title, metadata, and content - pmisparse: PMISparse — BM25 + PMI query expansion (invented by Tradik Limited) One of "tfidf", "bm25", "bm25f", "pmisparse". Default "tfidf".
fuzzy integer Typo tolerance level (default 0). - 0: Off — exact term matching only - 1: Low — matches terms within 1 edit distance (e.g. "javascrip" → "javascript") - 2: Medium — matches terms within 2 edit distances One of 0, 1, 2. Default 0.
filterMeta object Metadata filters to narrow results before scoring (AND between keys, OR between values)
filter MetaFilter
fieldWeights object Field weights for BM25F algorithm (keys are "title", "meta", "content")
bm25K1 number (v2.18.8, SRCH-018) BM25 term-frequency saturation for this query; default the collection profile, then 1.2. bm25 and bm25f only. Minimum 0. Maximum 3.
bm25B number (v2.18.8, SRCH-018) BM25 length normalisation for this query; 0 ignores length. Default the collection profile, then 0.75. Minimum 0. Maximum 1.
disableStem boolean Disable stemming for this query Default false.
disableSynonyms boolean Disable synonym expansion for this query Default false.
mode string Search mode (default "auto"). Auto-detect parses the query to determine the appropriate mode. - auto: Auto-detect from query syntax - simple: Classic keyword search - boolean: AND/OR/NOT operators, +required, -excluded - phrase: Exact word sequence ("quoted phrases") - wildcard: Pattern matching (* any chars, ? single char) - proximity: Terms within N words ("term1 term2"~5) - expression: Full query DSL with nested parens, precedence, and mixed atoms (v2.9.15+) One of "auto", "simple", "boolean", "phrase", "wildcard", "proximity", "expression". Default "auto".
distance integer Maximum word distance for proximity search (default 5) Default 5.
lang string Language code for query tokenization (e.g., "en", "pl", "de"). Uses language-specific stemmer and stop words. Language codes are normalized: "en_US" → "en", "pl_PL" → "pl". Falls back to server default if omitted.
rangeMeta array of RangeFilter Range filters on metadata or timestamp fields
boost object Per-query boost map. Keys follow the format "metaKey:metaValue". Positive values multiply the score of documents matching that metadata pair (e.g. 5.0 = 5× boost); negative values demote (e.g. -2.0 = ½× penalty). Zero is ignored. Multipliers from multiple matching entries combine multiplicatively; the final per-document multiplier is floored at 0.001 to prevent total score collapse.
highlight boolean When true (v2.9.15+), each result gains a highlights array with text snippets around matched terms. Works uniformly across every FTS mode. Default false.
highlightTag string Wrap tag for matched terms (close tag derived automatically) Default "\u003cmark\u003e".
maxHighlights integer Cap fragments per result Default 3.
fragmentSize integer Approximate chars per fragment (snapped to word boundaries) Default 150.
facetBy array of string (v2.9.15+) Metadata keys to aggregate into facets on the response. What is counted is set by facetScope.
facetMaxValues integer (v2.9.15+) Cap per-key bucket count; 0 = unlimited Default 0.
facetScope string (v2.17.0+) returned counts facets over the documents in results (after filtering, boosts, curation, the limit). all counts over every document that matched the query and filters, before pagination, and reports their number in matched. One of "returned", "all". Default "returned".
cacheTtl integer Serve this search from the result cache when a matching response is no older than this many seconds, and store the response for that long. Omitted or 0 means no caching at all — neither served nor stored — so a request that says nothing keeps the default behaviour and the default freshness. Writes to the collection invalidate its cached results immediately. The response carries X-MDDB-Cache: hit|miss. Capped at 3600; MDDB_SEARCH_CACHE_SIZE=0 disables the cache server-wide. Minimum 0. Maximum 3600.

Highlight #

Type: object

Property Type Description
fragment string Snippet with matched terms wrapped in the configured tag; ellipsis … markers denote truncation
matchedTerms array of string
startOffset integer Byte offset into the raw ContentMD where the fragment begins
endOffset integer
startLine integer (v2.12.0+) 1-based, inclusive line where the fragment begins. This is what makes a result a place to edit rather than a document to read — see docs/API.md#finding-the-place-not-just-the-file.
endLine integer (v2.12.0+) 1-based, inclusive line where the fragment ends

RangeFilter #

Type: object

Property Type Description
field string Field name — metadata key, or built-in "addedAt" / "updatedAt"
gte string Greater than or equal (numeric, date string, or unix timestamp)
lte string Less than or equal
gt string Greater than
lt string Less than

FTSSearchResponse #

Type: object

Property Type Description
rerank RerankReport
rerankSkipped RerankSkipped
limit LimitUsed
limitCapped LimitCapped
results (required) array of FTSResultItem
total integer Number of results in this response, after limit, the server's cap and the context budget. Not the number of matching documents; that is matched, returned with facetScope "all".
algorithm string Algorithm used for this search
mode string Search mode used (simple, boolean, phrase, wildcard, proximity)
lang string Language used for query tokenization
fuzzy integer Typo tolerance level used
searchStats SearchStats
facets FacetMap
matched integer (v2.17.0+) Documents that matched the query and filters before pagination. Present only with facetScope: all.
stemmingActive boolean Whether stemming was applied to this query
synonymsActive boolean Whether synonym expansion was applied to this query
fieldWeights object Effective per-field weights used for scoring (BM25F)
spellCorrected object | null Spell-correction info when the collection has spellCorrect enabled and the query was auto-corrected (original and corrected terms).

FacetBucket #

Type: object

Property Type Description
value (required) string
count (required) integer

FacetMap #

(v2.9.15+) Per-key facet counts. Buckets are ordered by count desc, value asc. Missing keys produce an empty bucket list so UIs can render a stable facet group layout across queries.

Type: object

FTSResultItem #

Type: object

Property Type Description
images array of ImageRef (v2.18.9, RAG-010) The document's images, with includeImages.
group string Group this result counted against (only with groupBy, SRCH-016).
groupRank integer 1-based place of this result within its group (only with groupBy).
document Document
score number (float) TF-IDF relevance score
matchedTerms array of string Terms from the query that matched
highlights array of Highlight (v2.9.15+) Snippets around the matched terms; only with highlight=true.
pinned boolean (v2.9.15+) Marked true when a curation rule injected this row at a fixed position. Clients can use this for distinct styling. Default false.

ImportURLRequest #

Type: object

Property Type Description
collection (required) string Collection name
url (required) string (uri) URL to fetch content from
key string Document key (derived from URL if empty)
lang (required) string Language code
meta object Additional metadata to merge with frontmatter
ttl integer Time-to-live in seconds (0 = no expiration)

SetTTLRequest #

Type: object

Property Type Description
collection (required) string Collection name
key (required) string Document key
lang (required) string Language code
ttl (required) integer Time-to-live in seconds (0 = remove TTL)

Webhook #

Type: object

Property Type Description
id string Unique webhook ID
url string (uri) Webhook callback URL
events array of string Event types to listen for. In 2.18.9, backup.failed fires when a scheduled backup fails, and quota.exceeded when a write or embedding is refused by a collection quota, the disk reserve or the vector RAM limit. In 2.18.10, source.synced fires when a run of a synced source (a cron rule's sync) finishes.
collection string Collection filter (empty = all collections)
createdAt integer (int64) Unix timestamp when the webhook was created

RegisterWebhookRequest #

Type: object

Property Type Description
url (required) string (uri) Webhook callback URL
events (required) array of string Event types to listen for. In 2.18.9, backup.failed fires when a scheduled backup fails, and quota.exceeded when a write or embedding is refused by a collection quota, the disk reserve or the vector RAM limit. In 2.18.10, source.synced fires when a run of a synced source (a cron rule's sync) finishes.
collection string Collection filter (empty = all collections)

DeleteWebhookRequest #

Type: object

Property Type Description
id (required) string Webhook ID to delete

SetSchemaRequest #

Type: object

Property Type Description
collection (required) string Collection name
schema (required) string The collection's metadata schema as a JSON string (not an object): required lists keys every document must carry, and properties gives each key a type (string, number, integer or boolean) and optional rules such as enum, pattern, minItems, maxItems. See docs/SCHEMA-VALIDATION.md.

SchemaResponse #

Type: object

Property Type Description
collection string Collection name
schema string JSON Schema string
enabled boolean Whether schema validation is enabled for this collection

ValidateRequest #

Type: object

Property Type Description
collection (required) string Collection name
meta (required) object Metadata to validate against the collection schema

ValidateResponse #

Type: object

Property Type Description
valid boolean Whether the metadata is valid according to the schema
errors array of string Validation error messages (empty if valid)
warnings array of string Advisory findings that do not make the document invalid. Today: metadata values that look like a structure lost on the way in — Go's %v rendering of a map or a list of maps. A warning rather than an error, because such a value is a valid string and rejecting it would break callers legitimately storing text that looks like it.

ReplicationStatusResponse #

(v2.19.8, GO-050) What the node measures, not estimates. Also served over gRPC as MDDBReplication.ReplicationStatus.

Type: object

Property Type Description
node_id string Unique node identifier
role string Replication role of this node; in a cluster (v2.19.8, MDDB_CLUSTER_PEERS) its election state One of "standalone", "leader", "follower", "candidate".
current_lsn integer (uint64) Leader (and a standalone node with a binlog): the last LSN written. Follower: the last LSN applied, as recorded in its database.
log_id string ID of the log current_lsn is a position in (16 hex digits). A leader that was not stopped cleanly starts a new log under a new ID, and its followers take a snapshot.
binlog_oldest_lsn integer (uint64) Oldest LSN still in this node's binlog (a follower's is its copy of the leader's)
binlog_size_bytes integer (int64) Binlog file size in bytes
binlog_max_size_bytes integer (int64) Size at which retention trims the binlog (MDDB_BINLOG_MAX_SIZE)
binlog_sync string When an entry reaches the disk (MDDB_BINLOG_SYNC) One of "interval", "commit".
leader_addr string Address of the leader (follower only)
connected boolean Follower only — the stream from the leader is open
replication_lag_ms integer (int64) Follower only — the age of the oldest entry it had not applied, as the leader measured it at the last acknowledgement (every 10 seconds); 0 when it had them all.
lag_entries integer (uint64) Follower only — entries the leader had that it had not applied, at the last acknowledgement
last_applied_at integer (int64) Follower only — Unix seconds of the last applied entry or snapshot
healthy boolean False on a follower that is not connected, is waiting for a snapshot, stopped on an entry it could not apply, or is more than 30 seconds behind; and on a node whose binlog stopped taking entries. last_error says which.
last_error string Why the node is not healthy; absent when it is
followers array of FollowerInfo Followers the leader knows, connected or recently gone (leader only)
uptime_seconds integer (int64) Node uptime in seconds
term integer (uint64) The node's election term (v2.19.8, GO-051); 0 outside a cluster
cluster ClusterStatus

ClusterStatus #

(v2.19.8, GO-051) The node's view of its cluster; present only with MDDB_CLUSTER_PEERS. See CLUSTER.md.

Type: object

Property Type Description
node_id string
state string One of "leader", "follower", "candidate".
term integer (uint64)
voted_for string
leader_id string The leader this node knows; absent while none is
leader_addr string The leader's HTTP address for clients
lease_valid boolean This node leads inside a lease a majority answered
writable boolean This node takes writes now
auto_failover boolean
majority integer
ack_mode string One of "async", "quorum".
last_rejected_file string The last file of writes this node cut when it rejoined
nodes array of object
nodes[].id string
nodes[].grpc_addr string
nodes[].http_addr string
nodes[].state string
nodes[].term integer (uint64)
nodes[].last_lsn integer (uint64)
nodes[].last_term integer (uint64)
nodes[].last_seen string (date-time)
nodes[].reachable boolean
nodes[].self boolean

RoleChange #

Type: object

Property Type Description
node_id string
state string
term integer (uint64)

PlacementStatus #

(v2.19.8, GO-052) The placement as the answering node (the meta group's leader) sees it. Without MDDB_PLACEMENT_GROUPS only enabled: false.

Type: object

Property Type Description
enabled (required) boolean Whether MDDB_PLACEMENT_GROUPS is set
nodeId string
group string The answering node's group
metaGroup string
version integer (uint64) The map's version within its term
term integer (uint64) The meta group's term the map was written in
route string MDDB_PLACEMENT_ROUTE One of "forward", "redirect".
groups array of PlacementGroup
collections array of PlacementCollection Every collection the map names, by name. A collection not listed belongs to the group the consistent hash of its name gives.
moves array of PlacementMove The last 20 finished moves (oldest first), then the running ones. Kept in the meta leader's memory: a new meta leader starts with none.

PlacementGroup #

Type: object

Property Type Description
name string
meta boolean Whether this is the meta group
leader string The group leader's node id, empty when not known
leaderHttp string The group leader's REST base URL
nodes array of PlacementNode
collections integer How many collections the map places in the group

PlacementNode #

A node as MDDB_PLACEMENT_GROUPS names it

Type: object

Property Type Description
id string Its MDDB_NODE_ID
grpc string Its gRPC address, as in MDDB_CLUSTER_PEERS
http string Its REST base URL

PlacementCollection #

Type: object

Property Type Description
name string
group string The group holding it
movingTo string The target group while a move runs; empty otherwise

PlacementMove #

Type: object

Property Type Description
collection string
from string
to string
phase string copying: the target copies the keys; catching-up: it applies the writes made meanwhile; fenced: writes are held while the map switches One of "copying", "catching-up", "fenced", "done", "failed".
startedAt string (date-time)
finishedAt string RFC 3339 time; empty while the move runs
keysCopied integer (uint64)
sourceLsn integer (uint64) The source log position the target has to reach
appliedLsn integer (uint64) The source log position the target has applied
error string Why the move was given up; empty otherwise
durationMs integer (int64)

PlacementMoveRequest #

Type: object

Property Type Description
collection (required) string The collection, or an alias of it
group (required) string The group to move it to

FollowerInfo #

Type: object

Property Type Description
follower_id string Follower node identifier
address string Follower network address
confirmed_lsn integer (uint64) Last LSN this follower acknowledged; retention keeps the entries after it
lag_ms integer (int64) Age of the oldest entry the follower has not confirmed, from that entry's timestamp; 0 when it has them all.
lag_entries integer (uint64) Entries written that the follower has not confirmed
lag_exact boolean False when lag_ms is a lower bound — the follower is behind more entries than the leader keeps timestamps for (65,536), or behind the start of the current log.
last_seen_at integer (int64) Unix timestamp of the last stream or acknowledgement
connected boolean False for a follower that is gone and still remembered (up to MDDB_BINLOG_MAX_AGE)
status string healthy: lag up to 1 s; warning: up to 30 s; unhealthy: more; disconnected: no stream One of "healthy", "warning", "unhealthy", "disconnected".

HybridSearchRequest #

Type: object

Property Type Description
rerank RerankOptions
includeImages boolean (v2.18.9, RAG-010) Attach each hit's image documents — those whose meta.parent is the hit's key — as images, with alt text, caption and page. Without it nothing is looked up and the response is unchanged.
format string passages returns path + lines + enclosing definition + text per hit instead of documents (AGT-002, v2.18.8); the response is a PassagesResponse. One of "results", "passages".
passageLines integer Lines of context on each side of a hit (default 10); a hit inside a shorter definition returns the definition. Minimum 0. Maximum 200.
passageTokens integer (v2.19.13) The most tokens one passage may hold. Unset, a passage cut around a hit holds at most 500; chunks and vector hits are cut only when this is set. A passage over it loses context lines, then the end of its hit line, and carries truncated: true. Minimum 0. Maximum 8000.
readLevel string indexedPlusPending also returns documents whose embedding is still queued, found by their text and marked pendingEmbedding (vector search; hybrid search already includes them). GO-042. One of "indexed", "indexedPlusPending".
waitForIndex integer Wait up to this many ms for queued embeddings before searching; running out of time is not an error (indexing.timedOut). Minimum 0. Maximum 30000.
waitForKeys array of string With waitForIndex, wait only for these document keys.
groupBy GroupBy
oversample number (v2.12.0+) Recall/latency knob: candidates fetched per requested result before deduplication, merging or rescoring trims them. Omitted, uses the collection's retrieval profile then MDDB's default of 3.0. Out of range returns 422 rather than clamping. See SEARCH.md#oversampling for measured effect. Minimum 1. Maximum 10.
collection (required) string Collection name to search
query (required) string Search query string (used for both FTS and embedding)
topK integer Number of top results to return (default 10) Default 10.
algorithm string FTS algorithm (default "bm25") One of "bm25", "bm25f", "pmisparse". Default "bm25".
vectorAlgorithm string Vector search algorithm (default "flat", or the collection profile's retrieval.vectorAlgorithm). auto (v2.18.9+) lets the query planner choose; the response's vectorAlgorithm then names the index it chose. One of "flat", "auto", "hnsw", "ivf", "pq", "opq", "sq", "sq4", "bq". Default "flat".
explain PlanExplain
latencyTargetMs PlanLatencyTarget
positive FeedbackExamples
negative FeedbackExamples
feedbackMode FeedbackMode
feedbackWeight FeedbackWeight
rocchio RocchioWeights
queryDecomposition QueryDecompositionMode
signals FusionSignals
strategy string Fusion strategy (default "alpha"). - alpha: Weighted blending — combined = (1-alpha) * normalizedFTS + alpha * vectorScore - rrf: Reciprocal Rank Fusion — score = 1/(k + rank_fts) + 1/(k + rank_vector) - weighted (SRCH-002): alpha's blend, then adjusted by the signals in signals. Nothing changes unless a weight is set, and alpha/rrf are unaffected. One of "alpha", "rrf", "weighted". Default "alpha".
alpha number (float) Alpha blending weight: 0 = keyword only, 1 = semantic only. Used by the "alpha" and "weighted" strategies. Omit the field to take the collection's retrieval profile, or 0.5. An explicit 0 means pure keyword search and is honoured as such (SRCH-007) — it used to be indistinguishable from an omitted field and was silently replaced with 0.5, the opposite of the request. Default 0.5. Minimum 0. Maximum 1.
rrfK integer RRF parameter k (default 60). Only used with "rrf" strategy. Default 60.
fuzzy integer Typo tolerance for FTS (0=off, 1=1 edit, 2=2 edits) One of 0, 1, 2. Default 0.
threshold number (float) Minimum vector similarity score (0.0 to 1.0) Minimum 0. Maximum 1.
filterMeta object Metadata filters applied to both FTS and vector results
filter MetaFilter
geo object Optional spatial pre-filter. When set, only documents present in the in-memory geo index AND within radiusMeters of the given point are considered by both FTS and vector search; each result then carries a distanceMeters value. Required when sort is distance.
geo.lat (required) number (double) Latitude of the center point
geo.lng (required) number (double) Longitude of the center point
geo.radiusMeters (required) number (double) Search radius in meters
includeContent boolean Include document content in results Default false.
fieldWeights object Field weights for BM25F (keys are "title", "meta", "content")
bm25K1 number (v2.18.8, SRCH-018) BM25 term-frequency saturation of the full-text half; default the collection profile, then 1.2. bm25 and bm25f only. Minimum 0. Maximum 3.
bm25B number (v2.18.8, SRCH-018) BM25 length normalisation of the full-text half; 0 ignores length. Default the collection profile, then 0.75. Minimum 0. Maximum 1.
disableStem boolean Disable stemming for FTS Default false.
disableSynonyms boolean Disable synonym expansion for FTS Default false.
lang string Language for FTS query tokenization and stemming (e.g. "en", "pl", "de")
distanceMetric string Distance metric for similarity computation One of "cosine", "dot_product", "euclidean". Default "cosine".
boost object Per-query boost map applied to the fused combined score (not raw FTS/vector sub-scores). Keys follow the format "metaKey:metaValue"; positive values multiply the score of matching documents, negative values demote. See the same field on FTSSearchRequest for full semantics.
sort string Result ordering. combined (default) ranks by the fused score — keyword relevance and semantic similarity blended per strategy. distance re-sorts the post-merge result set by distanceMeters ascending so the nearest documents surface first. Requires a geo filter on the request; otherwise the server rejects the call because distances would all be zero. One of "combined", "distance". Default "combined".
facetBy array of string (v2.9.15+) Metadata keys to aggregate into facets on the response
facetMaxValues integer (v2.9.15+) Cap per-key bucket count; 0 = unlimited

HybridSearchResponse #

Type: object

Property Type Description
rerank RerankReport
rerankSkipped RerankSkipped
limit LimitUsed
limitCapped LimitCapped
imageHits array of ImageRef (v2.18.9, RAG-010) With includeImages and a provider that embeds images: the images whose picture matches the query, scored in the image space and kept apart from results.
plan SearchPlan
indexing IndexWaitResult
results (required) array of HybridSearchResultItem
total integer Number of results returned
strategy string Fusion strategy used
alpha number Alpha value used (only for alpha strategy)
rrfK integer RRF k value used (only for rrf strategy)
ftsAlgorithm string FTS algorithm used
vectorAlgorithm string Vector algorithm used
distanceMetric string Distance metric used for this search
searchStats SearchStats
facets FacetMap
signals FusionSignals
signalBreakdown array of SignalBreakdown (SRCH-002) The weighted strategy only; one entry per result, in the order of results.

HybridSearchResultItem #

Type: object

Property Type Description
images array of ImageRef (v2.18.9, RAG-010) The document's images, with includeImages.
pendingEmbedding boolean The document's embedding is still queued; it was found by its text (GO-042).
group string Group this result counted against (only with groupBy, SRCH-016).
groupRank integer 1-based place of this result within its group (only with groupBy).
document Document
combinedScore number (float) Fused score from both FTS and vector
ftsScore number (float) Normalized FTS score component
vectorScore number (float) Vector similarity score component
matchedTerms array of string FTS matched terms
rank integer Result rank (1-based)
pinned boolean (v2.9.15+) Injected by a curation rule Default false.

PinnedDoc #

Type: object

Property Type Description
key (required) string
lang string
position (required) integer 1-based; <=0 appends after organic results

CurationRule #

(v2.9.15+) Pinned + hidden document overrides for FTS/Hybrid search

Type: object

Property Type Description
id string Server-assigned. Omit on POST.
collection (required) string
query (required) string
matchMode string One of "exact", "contains". Default "exact".
pins array of PinnedDoc
hides array of string Document keys to drop from results
enabled boolean
createdAt integer (int64)
updatedAt integer (int64)

SearchRecommendation #

How to search a collection, measured rather than guessed (SRCH-010).

MDDB offers eight vector algorithms, four ranking algorithms, three fusion strategies and four retrieval modes. An agent connecting over MCP has no basis for choosing among them. This measures the collection — length, vocabulary, whether it is embedded, whether it is code — and recommends, with a reason for every choice.

It changes nothing. retrievalProfile is the advice encoded as a RAG-001 profile, ready to PUT to /v1/collection-config if you agree.

Type: object

Property Type Description
rerank RerankOptions
rerankModel string (v2.19.8+, RAG-011) The configured reranking model. rerank is set only when the collection's evaluation set measured a higher nDCG with the model; the reasons give the gain and the p95 it costs.
profile CollectionProfile
searchType string One of "fts", "vector", "hybrid".
ftsAlgorithm string One of "tfidf", "bm25", "bm25f", "pmisparse".
vectorAlgorithm string One of "flat", "hnsw", "ivf", "pq", "opq", "sq", "sq4", "bq".
hybridStrategy string One of "alpha", "rrf", "weighted".
hybridAlpha number
retrievalMode string One of "parent", "chunk", "window", "graph".
topK integer
summaryMode string (v2.18.9+, RAG-009) blend when at least half the sampled documents carry a summary; absent otherwise. One of "blend".
signals FusionSignals
reasons array of string One line per decision, in plain language. The part worth reading: a recommendation nobody can argue with is one nobody should follow.
warnings array of string What would stop the recommendation working — a half-embedded collection, a missing provider.
retrievalProfile RetrievalProfile
measured EvalResult

WhereRequest #

Type: object

Property Type Description
collection (required) string
filter MetaFilter
filterMeta object
limit integer Default 1000. Maximum 10000.
cursor string
dryRun boolean
meta object updateWhere only; merged into each document's metadata
ttl integer setTTLWhere only; seconds from now, 0 removes the expiry

WhereResult #

Type: object

Property Type Description
matched integer
affected integer
sample array of string
nextCursor string
dryRun boolean
errors array of string

Alias #

Type: object

Property Type Description
alias string
collection string

ChatScenarioVersion #

Grows by one on every scenario create, update and delete.

Type: integer (int64)

Minimum 0.

ChatSkillSource #

Where an imported chat skill was fetched from.

Type: object

Property Type Description
url string (uri) https only.
commit string The Git commit, for a GitHub URL.
fetchedAt string (date-time)

ChatSkill #

A reusable SKILL.md instruction block (#404, v2.19.0).

Type: object

Property Type Description
name string The key. No '|', '/' or spaces; not "version" or "import". At most 128 characters.
description string
content string The instructions; left out of the list. At most MDDB_CHAT_SKILL_MAX_BYTES.
source ChatSkillSource
version integer 1, then one more on every change.
history array of object The last 10 earlier versions, newest first, without contents.
history[].version integer
history[].description string
history[].bytes integer
history[].source ChatSkillSource
history[].updatedAt string (date-time)
bytes integer
usedBy array of string
createdAt string (date-time)
updatedAt string (date-time)

ChatSkillPreview #

A SKILL.md parsed but not stored.

Type: object

Property Type Description
name string
description string
content string
raw string The whole text, front matter included.
source ChatSkillSource
bytes integer
sha256 string Of content; what a confirmed update names.
exists boolean

ChatScenario #

How a chat assistant behaves (#403). Precedence: an explicit per-request value, then the scenario, then MDDB's default.

Type: object

Property Type Description
name string The key. No '|', '/' or spaces; not "version". At most 128 characters.
description string
enabled boolean
operatorPrompt string Who the assistant is, its tone and language policy. At most 16384 bytes.
guardrails string What it must not do or say.
offTopic object
offTopic.mode string One of "refuse", "redirect", "brief". Default "refuse".
offTopic.redirectTemplate string The reply in redirect mode; a default sentence when empty.
allowedCollections array of string Existing collections or aliases the assistant may search.
skills array of string Names of chat skills (#404), composed into the prompt in this order after the guardrails.
style object
style.emoji string One of "off", "sparingly", "free". Default "off".
style.verbosity string One of "short", "normal", "long". Default "normal".
style.markdown boolean
style.citationTemplate string
llm object
llm.model string
llm.temperature number Minimum 0. Maximum 2.
llm.maxTokens integer Minimum 0.
llm.extraBody object Sent to the model API as is, e.g. reasoning_effort.
llm.loopGuard object Overrides mddb-chat's repetition-loop guard ([llm.loop_guard]) for this scenario, field by field (2.19.2+, issue 413). 0, an empty unit or an absent field keeps the chat service's setting.
llm.loopGuard.enabled boolean
llm.loopGuard.ngram integer Units per compared fragment. Minimum 0. Maximum 4096.
llm.loopGuard.window integer Latest units the repeated share is measured over; not shorter than ngram. Minimum 0. Maximum 65536.
llm.loopGuard.ratio number Repeated share that counts as a loop. Minimum 0. Maximum 1.
llm.loopGuard.minOutput integer Units an answer has before it is judged. Minimum 0. Maximum 1e+06.
llm.loopGuard.unit string One of "chars", "words".
maxTurns integer Minimum 0.
tokenBudgetPerSession integer Minimum 0.
rateLimit object
rateLimit.messagesPerMinute integer Minimum 0.
mcpServers array of ChatMcpServer External MCP servers whose read-only tools the assistant may call (MCP-005, v2.19.0). With the chatExternalMcp feature on, a save checks every allowed tool against the server.
logging ChatLogging
createdAt string (date-time) Read-only.
updatedAt string (date-time) Read-only.

ChatMcpServer #

Type: object

Property Type Description
name (required) string At most 128 characters.
url (required) string (uri) https only, MCP Streamable HTTP, no user or password.
enabled boolean
secretRef string The name of a chat MCP secret.
allowedTools array of string Read-only tools of the server (readOnlyHint true, destructiveHint not true).
timeoutMs integer Default 8000. Minimum 100. Maximum 60000.
resultMaxChars integer Default 4000. Minimum 100. Maximum 100000.
forwardIdentity ChatMcpForwardIdentity

ChatMcpForwardIdentity #

(v2.19.2, #414) Send the signed-in chat user's identity to the server as a short-lived token signed with a separate secret, next to its credential. Only signed-in chat sessions are offered the server's tools. Off when absent.

Type: object

Property Type Description
secretRef (required) string A chat MCP secret of at least 32 bytes, not the server's secretRef.
header string Default "X-MDDB-Chat-Identity".
ttlSeconds integer Default 120. Minimum 10. Maximum 300.

ChatMcpServerState #

Whether the model sees a server's tools, and the first switch that hides them.

Type: object

Property Type Description
name string
url string
enabled boolean
active boolean
reason string
forwardIdentity boolean (v2.19.2,
tools array of object
tools[].name string
tools[].active boolean
tools[].reason string

ChatMcpSecretSaved #

Type: object

Property Type Description
name string
header string
set boolean
version ChatScenarioVersion

ChatMcpSecretNeedsKey #

A secret refused for want of the at-rest key, or stored unsealed.

Type: object

Property Type Description
error string
requires string One of "MDDB_ENCRYPTION_KEY".

ChatMcpSecret #

A secret as listed; the value is write-only and never returned.

Type: object

Property Type Description
name string
header string Empty for Authorization Bearer.
set boolean A sealed value is stored. False for a value stored unsealed, which is refused when used.
updatedAt string (date-time)
usedBy array of string

ChatMcpTool #

Type: object

Property Type Description
name string
title string
description string
annotations object
annotations.readOnlyHint boolean
annotations.destructiveHint boolean
annotations.idempotentHint boolean
annotations.openWorldHint boolean
allowable boolean A scenario may allow it.
reason string

GainCounters #

Type: object

Property Type Description
searches object Searches by type (fts, vector, hybrid, cross).
algorithms object
fusion object
tokensReturned integer
tokensAvoided integer
fragmentHits integer
documentHits integer

GainReport #

Type: object

Property Type Description
windowDays integer
from string (date)
to string (date)
totals GainCounters
totalSearches integer
tokensWithoutRetrieval integer tokensReturned + tokensAvoided — the same hits as whole documents.
savedPercent number
daily array of allOf GainCounters & object

EvalQuery #

One evaluation query and the documents that should answer it (SRCH-019).

Type: object

Property Type Description
id string
query (required) string
expectedKeys (required) array of string
grades object Key to relevance 0..3 for nDCG; an ungraded expected key counts 1.

EvalConfig #

Type: object

Property Type Description
rerank RerankOptions
name string
searchType (required) string One of "fts", "vector", "hybrid".
algorithm string FTS algorithm (tfidf, bm25, bm25f, pmisparse)
vectorAlgorithm string
alpha number
strategy string Hybrid fusion, alpha or rrf
retrievalMode string
bm25K1 number BM25 parameters to try (SRCH-018)
bm25B number
summaryMode string (v2.18.9+, RAG-009) Measure summaries; unset = the collection profile's. One of "off", "blend", "expand".
queryDecomposition QueryDecompositionMode

EvalRequest #

Type: object

Property Type Description
collection (required) string
k integer Default 10. Maximum 100.
configs array of EvalConfig Default fts/bm25, hybrid and vector.
queries array of EvalQuery Inline queries used instead of the stored set.
details boolean Add per-query results.

EvalResult #

Type: object

Property Type Description
collection string
k integer
queries integer
results array of object
results[].config string
results[].recallAtK number
results[].ndcgAtK number
results[].mrr number
results[].p50Ms number
results[].p95Ms number (v2.19.8+) 95th percentile latency
results[].rerankSkipped integer (v2.19.8+, RAG-011) Queries whose requested rerank did not run
results[].p99Ms number
results[].tokens integer
results[].error string
results[].perQuery array of object
results[].perQuery[].id string
results[].perQuery[].query string
results[].perQuery[].recall number
results[].perQuery[].ndcg number
results[].perQuery[].reciprocalRank number
results[].perQuery[].returned array of string

CollectionProfile #

What the advisor measured, from a sample of up to 2000 documents.

Type: object

Property Type Description
collection string
documents integer
sampled integer How many were actually read. A recommendation from a sample should say so.
embeddedDocuments integer
vectorDimensions integer
medianWords integer Median, not mean — one long manual among ten thousand notes moves a mean and describes nothing.
longDocumentRatio number Share above 500 words, where returning whole documents starts wasting a prompt.
distinctTerms integer
termsPerDocument number Vocabulary divided by documents sampled — how much new vocabulary each document contributes. This decides whether keyword search can discriminate. Type-token ratio would not: pooled over a corpus it falls towards zero as the corpus grows, so every large collection would look repetitive.
typeTokenRatio number Reported because it is familiar; not used for any decision.
codeDocuments integer How many carry extracted symbols, which is what makes the connection graph useful.
estimatedVectorBytes integer (int64)
semantic boolean Whether the collection's vectors encode meaning (v2.18.9+); absent when nothing is embedded. False for the lexical provider, and the advisor then recommends keyword search unless the collection's own evaluation set measures hybrid better.
builtIndexes array of string (v2.18.9+, SRCH-013) Vector indexes that can answer for the collection now, without building. With more than one, the advisor puts vectorAlgorithm auto in the recommended profile.
summaryDocuments integer (v2.18.9+, RAG-009) Sampled documents that carry a client-written summary.
summaryRatio number (v2.18.9+, RAG-009) Their share of the sample, 0-1.
convertedDocuments integer (v2.18.9+, GO-046) Sampled documents converted from a file, carrying meta.conversionConfidence.
lowConfidenceDocuments integer (v2.18.9+, GO-046) Sampled documents whose conversionConfidence is below 0.5. When there are any, the advisor warns and names the filter that lists them.
lowConfidenceRatio number (v2.18.9+, GO-046) Their share of the sample, 0-1.

FusionSignals #

Ranking signals for the weighted hybrid strategy (SRCH-002).

A weight is a fraction of the result's own score: proximity: 0.1 means "up to 10% better", diversity: 0.8 means "up to 80% worse". That keeps the signals scale-free, and makes large weights genuinely powerful — at 1.0 a proximity bonus can carry a result past one scoring half again as much. Weights are clamped to [0, 1].

Every weight defaults to 0, so a weighted request with no signals behaves exactly like alpha.

Type: object

Property Type Description
diversity number Penalise a result that is a near-copy of a higher-ranked one, measured by text overlap. A vector score cannot do this: near-copies have near-identical embeddings, so similarity rewards the duplication. Suggested range 0.5-1.0. Minimum 0. Maximum 1.
diversityThreshold number Overlap below which two documents count as unrelated. Default 0.5. Minimum 0. Maximum 1.
proximity number Reward a result whose key shares a directory with a higher-ranked one. Suggested range 0.05-0.15. Minimum 0. Maximum 1.
freshness number Reward recently updated documents on an exponential decay. Off by default because it is wrong for reference material — an API specification does not become less true with age. Suggested range 0.05-0.2. Minimum 0. Maximum 1.
freshnessHalfLifeDays number How long the freshness bonus takes to halve. Default 180.

SignalBreakdown #

What each signal contributed to one result, in the same order as results. Returned by the weighted strategy, because a reranking nobody can explain is a reranking nobody trusts.

Type: object

Property Type Description
base number The score before any signal applied
diversity number Negative — the near-duplicate penalty
proximity number
freshness number
final number

PersistenceStatus #

What the data directory can promise about durability (GO-032). Reported by /health so an operator sees whether acknowledged writes will survive, not only that the process is up.

Type: object

Property Type Description
path string The data directory the server writes to
filesystem string Detected filesystem type, when it could be determined
ephemeral boolean True when the directory lives on storage that does not survive a container restart (tmpfs, overlayfs upper layer).
writable boolean
freeBytes integer (int64) Free space on the filesystem holding the data directory
warnings array of object
warnings[].code string
warnings[].detail string

BackupFile #

One backup file in MDDB_BACKUP_DIR (GET /v1/backups).

Type: object

Property Type Description
name string The file name a download and POST /v1/restore take
path string Its full path on the server, as GET /v1/backup answers it and a scheduled run logs it
bytes integer (int64) Size of the main file
modifiedAt string (date-time)
state string checksummed when a .sha256 file lies beside it, which a scheduled run writes after the integrity check; unknown otherwise. The list never re-checks a file. One of "checksummed", "unknown".
collectionFiles integer Files in .d/ (per-collection layout); not part of a download

ErrorResponse #

What bad(), unprocessable(), the auth middleware and the access gate write: {"error": ""}. Some refusals add fields (a quota refusal is QuotaExceeded; a write refused while the freelist is rebuilt adds phase and progress).

Type: object

Property Type Description
error (required) string Error message

RateLimitError #

The API rate limiter's refusal (MDDB_RATE_LIMIT_ENABLED=true).

Type: object

Property Type Description
error (required) string
retryAfter (required) integer Seconds until the client's window resets (also in Retry-After)

JSONRPCError #

A JSON-RPC 2.0 error, as the MCP listener's key auth, OAuth and rate limiter write it.

Type: object

Property Type Description
jsonrpc (required) string One of "2.0".
error (required) object
error.code (required) integer -32001 (API key required or invalid, authorization required), -32429 (rate limit)
error.message (required) string

GraphQLResponse #

A GraphQL response (gqlgen); a request it refuses carries errors and no data.

Type: object

Property Type Description
data object | null
errors array of object
errors[].message (required) string
errors[].path array of string
errors[].extensions object

UploadResponse #

Type: object

Property Type Description
key string Document key
format string Detected file format (md, txt, html, pdf, docx, odt, rtf, xlsx, ods, csv, tsv, pptx, odp, epub, eml, mbox, yaml, tex, log, lex)
converted boolean Whether the file was converted to markdown
document Document
conversionConfidence number (double) (v2.18.9+, GO-046) How well the file converted, by heuristics: the share of replacement and non-printable characters, PDF pages without text, the ratio of text to file size, empty sheets. A scan without a text layer scores 0. Absent for Markdown and text, which are not converted. Also stored as meta.conversionConfidence. Minimum 0. Maximum 1.
conversionWarnings array of string (v2.18.9+) What lowered the confidence. Also stored as meta.conversionWarnings.
parts array of UploadResponse (v2.18.9+) Further documents the file held: each message of a mailbox, each convertible attachment of an email. Keyed below the file's key (inbox/message-1, mail/attachments/q3.csv), with meta.parent naming the document that held them.

UploadBatchResponse #

Type: object

Property Type Description
added integer
updated integer
failed integer
errors array of string
results array of UploadResponse

SynonymRequest #

Type: object

Property Type Description
collection (required) string Collection name
term (required) string Base term for the synonym group
synonyms (required) array of string List of synonyms for the term

SynonymDeleteRequest #

Type: object

Property Type Description
collection (required) string Collection name
term (required) string Term whose synonyms to delete

SynonymEntry #

Type: object

Property Type Description
term string Base term
synonyms array of string List of synonyms

SynonymListResponse #

Type: object

Property Type Description
collection string Collection name
entries array of SynonymEntry
total integer Total number of synonym entries

EmbeddingConfig #

Type: object

Property Type Description
kind string (v2.19.8+, RAG-011) What the model does. Omitted or embedding: an embedding model, as before. rerank: a reranking model — provider must be http and apiUrl is required; dimensions is not used; apiKey is accepted and never returned (an update without it keeps the stored key). One default per kind. One of "embedding", "rerank".
timeoutMs integer (v2.19.8+, rerank only) Limit on one call; default 2000.
maxCandidates integer (v2.19.8+, rerank only) Most results one search sends; default 50. Maximum 200.
id (required) string Unique identifier
name (required) string Display name
provider (required) string Embedding provider. lexical (v2.18.9+) needs no key or URL; its vectors are hashed words and n-grams and do not encode meaning, model is ignored and dimensions is clamped to 256–2048. One of "openai", "ollama", "cohere", "voyage", "lexical".
model (required) string Model name
dimensions (required) integer Embedding vector dimensions
apiKey string API key (for OpenAI, Cohere, Voyage)
apiUrl string API URL (for Ollama or custom endpoints)
isDefault boolean Whether this is the default configuration
createdAt integer (int64) Creation timestamp (Unix seconds)

SystemInfoResponse #

Type: object

Property Type Description
hostname string Server hostname
os string Operating system
arch string CPU architecture
numCPU integer Number of logical CPUs
goVersion string Go runtime version
version string MDDB server version
uptimeSeconds integer (int64) Server uptime in seconds
memoryTotal integer (uint64) Total allocated memory in bytes (cumulative)
memoryUsed integer (uint64) Currently allocated memory in bytes
memorySystem integer (uint64) System memory obtained from OS in bytes
memoryHeap integer (uint64) Heap memory in use in bytes
numGoroutines integer Number of active goroutines
cpuUsagePercent number (float) CPU usage percentage (0-100)
network array of NetworkInterface

NetworkInterface #

Type: object

Property Type Description
name string Interface name
addresses array of string IP addresses assigned to this interface
flags string Interface flags

ConfigResponse #

Type: object

Property Type Description
version string MDDB server version
databasePath string Path to the database file
mode string Server mode
panelMode string Panel mode (internal or external)
protocols object
protocols.http object
protocols.http.enabled boolean
protocols.http.addr string
protocols.grpc object
protocols.grpc.enabled boolean
protocols.grpc.addr string
protocols.mcp object
protocols.mcp.enabled boolean
protocols.mcp.addr string
protocols.mcp.stdio boolean
protocols.mcp.revision string Newest MCP spec revision this server serves.
protocols.mcp.supportedRevisions array of string Every MCP spec revision this server serves, newest first.
protocols.mcp.revisionPinned boolean True when MDDB_MCP_PROTOCOL_VERSION fixes the revision and version negotiation is disabled.
protocols.mcp.handshakeRevision string Revision an initialize is answered with, absent when this server serves no handshake revision at all.
protocols.mcp.publicUrl string (v2.19.9) Base URL MCP clients dial, without /mcp and without a trailing slash: MDDB_MCP_PUBLIC_URL; if unset, the OAuth issuer while OAuth runs; else empty. Credentials, query and fragment are dropped.
protocols.mcp.apiKeyEnabled boolean (v2.19.9) Whether /mcp asks for an MCP API key (MDDB_MCP_API_KEY_ENABLED). No key is ever reported.
protocols.mcp.oauthEnabled boolean (v2.19.9) Whether the MCP listener runs its OAuth 2.1 server: on only when MDDB_MCP_OAUTH_ENABLED=true, API keys are on and the issuer is valid. No secret is reported.
protocols.http3 object
protocols.http3.enabled boolean
protocols.http3.addr string
authEnabled boolean Whether authentication is enabled
metricsEnabled boolean Whether Prometheus metrics are enabled
searchStatsEnabled boolean Whether search statistics are included in search responses
esCompat object (v2.18.10) The Elasticsearch-compatible search subset (MDDB_ES_COMPAT)
esCompat.enabled boolean
esCompat.prefix string Path the subset is served under
qdrantCompat object (v2.19.10) The Qdrant-compatible point query (MDDB_QDRANT_COMPAT)
qdrantCompat.enabled boolean
qdrantCompat.prefix string Path the surface is served under
searchMaxLimit integer (v2.18.10) Most results one search returns (MDDB_SEARCH_MAX_LIMIT); a collection's maxTopK can only lower it
telemetry object (v2.18.10) OpenTelemetry trace export (MDDB_OTEL_ENDPOINT)
telemetry.enabled boolean
telemetry.endpoint string The collector's scheme and host only: never a path, query or credentials. Omitted when off
clientAddressing object (v2.18.10) How the client address is found behind a proxy
clientAddressing.trustedProxies integer How many MDDB_TRUSTED_PROXIES entries are trusted; the addresses are never shown
clientAddressing.header string MDDB_CLIENT_IP_HEADER in canonical form
clientAddressing.proxyProtocol boolean MDDB_PROXY_PROTOCOL
replicationRole string Replication role of this node
vectorConfig object Vector search configuration (if enabled)
vectorConfig.enabled boolean
vectorConfig.provider string
vectorConfig.model string
vectorConfig.dimensions integer
vectorConfig.apiUrl string
vectorConfig.semantic boolean Whether the vectors encode meaning (v2.18.9+). False only for the lexical provider, whose vectors are hashed words and character n-grams: vector search then matches shared spelling, not meaning.
vectorConfig.source string Where the configuration came from One of "environment", "stored", "autodetected".
chunkConfig object Document chunking configuration
chunkConfig.enabled boolean
chunkConfig.chunkSize integer

EndpointsResponse #

Type: object

Property Type Description
http array of object
http[].method string HTTP method(s)
http[].path string URL path
http[].description string Endpoint description
http[].requiresAuth boolean Whether authentication is required
grpc array of object
grpc[].name string gRPC method name
grpc[].description string Method description
mcp array of object
mcp[].name string MCP tool name
mcp[].description string Tool description
mcp[].inputSchema object JSON Schema for the tool input

LoginRequest #

Type: object

Property Type Description
username (required) string Username
password (required) string Password

LoginResponse #

Type: object

Property Type Description
token string JWT token
expiresAt integer (int64) Token expiration timestamp (Unix seconds)

RegisterRequest #

Type: object

Property Type Description
username (required) string Username for the new user
password (required) string Password for the new user
tenant string Optional tenant namespace for the new user. A tenant user can only access collections named "/" and can never hold the global admin role. Omit for an unrestricted (global) user.

RegisterResponse #

Type: object

Property Type Description
username string Created username
tenant string Tenant namespace the user is confined to (empty for global users)
createdAt integer (int64) Account creation timestamp (Unix seconds)

CreateAPIKeyRequest #

Type: object

Property Type Description
description string Optional label for the API key
expiresAt integer (int64) Expiration timestamp (Unix seconds, 0 = never)

CreateAPIKeyResponse #

Type: object

Property Type Description
key string The API key value (shown only once)
description string API key description
expiresAt integer (int64) Expiration timestamp (Unix seconds, 0 = never)
createdAt integer (int64) Creation timestamp (Unix seconds)

ListAPIKeysResponse #

Type: object

Property Type Description
keys array of object
keys[].keyHash string SHA256 hash of the API key (for deletion)
keys[].description string API key description
keys[].createdAt integer (int64) Creation timestamp (Unix seconds)
keys[].expiresAt integer (int64) Expiration timestamp (Unix seconds, 0 = never)

GetMeResponse #

Type: object

Property Type Description
username string Current user's username
admin boolean Whether the user has admin privileges
createdAt integer (int64) Account creation timestamp (Unix seconds)

Permission #

Type: object

Property Type Description
username string Username
collection string Collection name ("*" for all collections)
read boolean Read permission
write boolean Write permission
admin boolean Admin permission

SetPermissionRequest #

Type: object

Property Type Description
username (required) string Username
collection (required) string Collection name ("*" for all collections)
read boolean Read permission
write boolean Write permission
admin boolean Admin permission

SetPermissionResponse #

Type: object

Property Type Description
status string

UsersListResponse #

Type: object

Property Type Description
users array of object
users[].username string Username
users[].createdAt integer (int64) Account creation timestamp (Unix seconds)
users[].disabled boolean Whether the user is disabled
users[].admin boolean Whether the user has admin privileges
users[].groups array of string Groups the user belongs to

Group #

Type: object

Property Type Description
name string Group name
description string Group description
members array of string List of usernames in the group
createdAt integer (int64) Creation timestamp (Unix seconds)

CreateGroupRequest #

Type: object

Property Type Description
name (required) string Group name
description string Group description
members array of string Initial list of member usernames

UpdateGroupRequest #

Type: object

Property Type Description
description string Updated group description
members array of string Updated list of member usernames

GroupsListResponse #

Type: object

Property Type Description
groups array of Group

GroupPermission #

Type: object

Property Type Description
groupName (required) string Group name
collection (required) string Collection name ("*" for all collections)
read boolean Read permission
write boolean Write permission
admin boolean Admin permission

AutomationRule #

Type: object

Property Type Description
id string Read-only.
type (required) string One of "webhook", "trigger", "cron".
name (required) string
enabled boolean Default true.
createdAt integer Read-only.
updatedAt integer Read-only.
url string Webhook URL (type=webhook)
method string HTTP method (type=webhook) One of "POST", "GET", "PUT". Default "POST".
headers object Custom HTTP headers (type=webhook)
collection string Target collection (type=trigger)
searchType string Search type (type=trigger) One of "fts", "vector", "hybrid".
query string Search query (type=trigger)
threshold number Minimum score threshold 0-100 (type=trigger) Minimum 0. Maximum 100.
webhookId string Target webhook ID (type=trigger; type=cron unless backup or sync is set)
searchParams object Extra search parameters (type=trigger)
events array of string Events that fire the trigger (type=trigger, default ["insert","update"])
sentimentEnabled boolean Enable keyword-based sentiment condition (type=trigger)
sentimentMin number Minimum sentiment score -1.0 to 1.0 (type=trigger) Minimum -1. Maximum 1.
sentimentMax number Maximum sentiment score -1.0 to 1.0 (type=trigger) Minimum -1. Maximum 1.
conditionLogic string How to combine search + sentiment conditions (type=trigger) One of "and", "or". Default "and".
schedule string Cron expression, five fields or six with seconds first, e.g. "0 3 * * *" (type=cron). Refused if it does not parse.
triggerId string Target trigger ID (type=cron)
lastRun integer Last execution timestamp (type=cron) Read-only.
nextRun integer Next scheduled execution (type=cron) Read-only.
backup BackupAction
sync SyncAction
lastResult AutomationRunResult

AutomationRunResult #

(2.19.0) What the latest run of a cron rule's sync or backup did — the newest automation log entry of the rule. Set on listings, never stored; absent before the first run.

Type: object

Read-only.

Property Type Description
at integer When the run started (unix seconds)
status string One of "success", "error", "skipped".
durationMs integer
error string
added integer
updated integer
unchanged integer
deleted integer
failed integer
ref string (2.19.5) git — the branch or tag the run resolved
commit string (2.19.5) git — the commit the run read
commitUrl string (uri) (2.19.5) git — the commit's page on the forge
upToDate boolean (2.19.5) git — the commit was the last run's, so nothing was downloaded or written

AutomationRun #

(2.19.0) A run POST /v1/automation/{id}/run started.

Type: object

Property Type Description
ruleId string
action string One of "sync", "backup".
status string One of "started".
jobId string The run's id on the jobs SSE stream, e.g. sync--20261030T120000Z
startedAt integer

SyncAction #

A cron rule's sync action (2.18.10), instead of webhookId or backup. Each run lists the source, fetches only what changed (ETag / Last-Modified, the object's ETag, else a sha256 of the content), converts it with the /v1/upload converters and writes it through the normal write path (schemas, quotas, read-only). Every HTTP request goes through the SSRF guard; robots.txt is honoured for a sitemap. Documents carry syncRule, syncSource, syncHash and, when sent, syncEtag / syncLastModified meta. A listing cut at maxDocuments or one that lists nothing prunes nothing. See docs/AUTOMATIONS.md#synced-sources.

Since 2.19.5 a git source reads a repository at a branch, a tag or its latest release through the forge (smart HTTP ref advertisement, release API, tar.gz archive of the commit); keys are repository-relative paths as mddb-cli autoindex writes them, and documents also carry syncRef / syncCommit. A commit the last successful run of the unchanged rule read is not downloaded again. See docs/AUTOMATIONS.md#git-repositories.

Since 2.19.11 an issues source mirrors a forge repository's issues and pull requests, read-only: one document per item (key issue- / pull-), Markdown with a section per comment, flat meta. Runs are incremental (the items updated since the last run, conditional on each listing page's ETag); the rate limit ends a run with its reset time and deletes nothing. A git or issues rule may leave url and tokenSecretRef to a collection's repository and the default forge tokens. See docs/AUTOMATIONS.md#issues-and-pull-requests.

Type: object

Property Type Description
source (required) string One of "sitemap", "urls", "s3", "git", "issues".
collection (required) string
lang (required) string
url string (uri) sitemap — a sitemap or sitemap index, plain or gzipped; git (2.19.5), issues (2.19.11) — the repository over https; may be empty when a collection's repository resolves it
urls array of string (uri) urls — the pages
bucket string s3 — bucket (default storageConfig.bucket)
prefix string s3 — the objects under it are synced (default storageConfig.prefix)
storageConfig StorageConfigDef
prune boolean Delete the documents whose source is gone (no longer listed, or answering 404/410) Default false.
maxDocuments integer Sources one run looks at; 0 takes the default Default 1000. Minimum 0. Maximum 50000.
maxBytes integer (int64) Bytes per fetched document; a larger one fails Default 10485760. Minimum 0. Maximum 1.048576e+08.
ref string (2.19.5) git — a branch, a tag, a full ref, a commit id, or latest-release (the forge's latest release, else the highest v1.2.3 tag). Empty follows the default branch.
include array of string (2.19.5) git — globs over repository-relative paths, as mddb-cli autoindex --include (the path or the file name; dir/** is everything under dir). Empty takes every file. issues (2.19.11) — the kinds mirrored, issues and/or pulls; default [issues].
exclude array of string (2.19.5) git — globs of files to leave out
forge string (2.19.5) git — the forge of a host other than github.com, gitlab.com and codeberg.org; such a host without it is refused One of "github", "gitlab", "gitea", "forgejo".
tokenSecretRef string (2.19.5) git — a stored secret (/v1/chat/mcp-secrets) holding the token of a private repository; it must exist
hookSecretRef string (2.19.5) git — a stored secret POST /v1/automation/{id}/hook verifies webhooks with; empty disables the hook
adopt boolean (2.19.5) git — take over documents of the same key that no sync wrote (a collection seeded by mddb-cli autoindex) Default false.
repositoryFrom string (2.19.11) git, issues — the collection whose repository a rule without url reads; empty is the rule's own collection
state string (2.19.11) issues — the items mirrored by state One of "open", "closed", "all". Default "all".
since string (2.19.11) issues — only items updated on or after it, a date (2026-01-02) or an RFC 3339 time
comments boolean (2.19.11) issues — append each comment to its item's document Default true.

CollectionRepository #

(2.19.11, INT-023) The forge repository a collection is read from; a git or issues sync without its own url reads it. The token is a stored secret's name, never a value. In a PUT, omitted keeps the stored one and {} removes it.

Type: object

Property Type Description
url string (uri)
forge string One of "github", "gitlab", "gitea", "forgejo".
tokenSecretRef string

ForgeTokens #

Type: object

Property Type Description
defaults object

SyncRefreshRun #

Type: object

Property Type Description
ruleId string
status string One of "done", "started", "throttled", "running", "error".
lastRunAt integer (int64) When the rule last ran before this refresh (unix seconds)
retryAfter integer throttled: seconds until it may be refreshed
jobId string started: the run on GET /v1/jobs/stream
error string
added integer
updated integer
unchanged integer
deleted integer
failed integer

SyncRefreshResult #

Type: object

Property Type Description
collection string
number integer
runs array of SyncRefreshRun

BackupAction #

A cron rule's backup action (2.18.9), instead of webhookId. Each run writes a verified backup, its .sha256 checksum file, stores it on the target and then deletes the oldest until keep remain. See docs/BACKUP.md#scheduled-backups.

Type: object

Property Type Description
target string One of "local", "s3". Default "local".
path string local — directory inside MDDB_BACKUP_DIR
bucket string s3 — bucket (default storageConfig.bucket)
prefix string Start of every backup's name or key; letters, digits, '.', '_', '-' and (s3 only) '/' Default "mddb-".
keep integer Backups kept on the target; 0 keeps all Default 0. Minimum 0.
collections array of string ["*"] or the collections to back up (per-collection layout only) Default ["*"].
storageConfig StorageConfigDef

TriggerMatch #

Type: object

Property Type Description
docId string
collection string
score number

AutomationLogEntry #

Type: object

Property Type Description
id string
timestamp integer
ruleId string
ruleName string
ruleType string One of "trigger", "cron".
webhookId string
webhookUrl string
status string One of "success", "error", "skipped".
httpStatus integer
durationMs integer
error string
attempt integer
action string Set for a scheduled backup run (2.18.9) or a synced source's run (2.18.10) One of "backup", "sync".
target string Where the backup went — a path or s3://bucket/key; for a sync, its source (the sitemap, "N urls" or s3://bucket/prefix)
removed array of string Backups retention deleted after this one
sync object What a sync run did with its sources (2.18.10)
sync.added integer
sync.updated integer
sync.unchanged integer
sync.deleted integer
sync.failed integer

SearchStats #

Statistics about a search execution

Type: object

Property Type Description
durationMs integer Search execution time in milliseconds
queryTerms array of string Tokenized query terms
indexSize integer Documents in search scope
totalTokens integer Number of tokens in query

RevisionEntry #

Type: object

Property Type Description
timestamp integer (int64) Unix timestamp of the revision
updatedAt integer (int64) Unix timestamp when the revision was saved
contentMd string Markdown content at this revision
meta object Metadata at this revision

RetrievalProfile #

(v2.12.0+) Per-collection retrieval defaults. Every field is optional; an unset field means "not configured". Precedence is fixed everywhere: an explicit request parameter wins, then this profile, then MDDB's own default for that endpoint — so a collection without a profile behaves exactly as it did before this existed.

Type: object

Property Type Description
rerank RerankOptions
format string passages returns path + lines + enclosing definition + text per hit instead of documents (AGT-002, v2.18.8); the response is a PassagesResponse. One of "results", "passages".
groupBy GroupBy
vectorAlgorithm string (v2.18.9+, SRCH-013) The collection's default vector index for vector, hybrid and MCP searches that name none; auto lets the query planner choose per query. Unset = flat. One of "auto", "flat", "hnsw", "ivf", "pq", "opq", "sq", "sq4", "bq".
defaultSearchType string Which search this collection expects. Consumed by clients reading the config (mddb-chat, MCP agents); the server does not reroute a request to a different endpoint because of it. One of "fts", "vector", "hybrid".
topK integer Results per search. 0 = unset. Minimum 0. Maximum 1000.
retrievalMode string Granularity — whole document, matching passage, or passage with neighbours. One of "parent", "chunk", "window", "graph".
hybridStrategy string Hybrid fusion strategy. One of "alpha", "rrf", "weighted".
hybridAlpha number Keyword-to-semantic weight: 0 = keyword only, 1 = semantic only. Requires hybridAlphaSet, because 0.0 is a meaningful weight and cannot double as "unset". Minimum 0. Maximum 1.
hybridAlphaSet boolean Whether hybridAlpha was configured.
oversample number (SRCH-005) Default recall/latency knob for this collection: candidates fetched per requested result before deduplication, merging or rescoring. A request parameter overrides it. Minimum 1. Maximum 10.
maxTopK integer (v2.18.10, #368) Most results one search of this collection returns, whatever the request asks for. Lowers MDDB_SEARCH_MAX_LIMIT for this collection and never raises it; topK must not exceed it. 0 = unset. Minimum 0. Maximum 1e+06.
contextTokenBudget integer Cap on the total context a search returns, so a RAG caller cannot be handed more than its model holds. Results are dropped from the tail, never truncated mid-document — half a document still costs tokens and no longer says anything reliable. Approximated as bytes/4 rather than tokenised: a real tokeniser would tie the budget to one model family. Responses set contextTruncated when this applied. 0 = no cap. Minimum 0. Maximum 1e+06.
bm25K1 number (v2.18.8, SRCH-018) The collection's BM25 k1; unset = 1.2. Minimum 0. Maximum 3.
bm25B number (v2.18.8, SRCH-018) The collection's BM25 b; unset = 0.75. Minimum 0. Maximum 1.
summaryMode string (v2.18.9+, RAG-009) What the documents' client-written summaries (metadata key summary; MDDB never writes one) do on vector and hybrid search, and on cross-collection search, where each target applies its own. off (default) ignores them; results are what they were before. blend scores a document by the better of its best chunk and its summary. expand blends and adds a summary hit's best chunks (up to 3, fewer under contextTokenBudget), one passage each with format passages. One of "off", "blend", "expand".
summaryWeight number (v2.18.9+, RAG-009) BM25F weight of the meta.summary field while summaryMode is not off. Unset = 2.0. Minimum 0. Maximum 10.

CodeConfig #

(v2.18.0+) Settings for collections of source code (#319).

Type: object

Property Type Description
includePaths array of string Collection-relative directories that C #include <...> resolves against, as a compiler's -I does. ["src"] makes <net/conn.h> in any file the document src/net/conn.h, which gives code_graph its include edges. Applied when a document is written.
role string (v2.18.8, AGT-003) "" for the project's own code, "reference" for code kept to learn from. Cross-search target "role:reference" selects every reference collection. One of "", "reference".

CollectionFTS #

(v2.18.2+) Full-text indexing for the collection (#335). With enabled=false no postings are written; fts-reindex removes existing ones and reports status "removed". The block is replaced as a whole.

Type: object

Property Type Description
enabled boolean Unset means on.
excludeMetaKeys array of string (v2.18.10+, #367) Meta keys kept out of full-text search: they get no meta. field postings, so changing them costs no full-text work. filterMeta and facets still work on them; they read the metadata index. Applies to documents written afterwards; after changing the list, run fts-reindex to apply it to documents already indexed.

EmbeddingChunking #

(v2.18.1+) This collection's chunking for embeddings (#325), overriding MDDB_EMBEDDING_CHUNK_SIZE and MDDB_EMBEDDING_CHUNK_MODE. Applies to documents embedded afterwards and to the passages search returns for them; existing vectors keep their chunks until a forced vector-reindex.

Type: object

Property Type Description
chunkSize integer Target chunk length in characters, 100-100000. 0 = the server's size. Minimum 0. Maximum 100000.
chunkMode string code splits at function and declaration boundaries, prose at paragraphs. Empty decides per document from its kind. One of "", "code", "prose".

CollectionConfig #

Type: object

Property Type Description
type string Collection type (e.g., default, website, images, audio, documents)
description string Collection description
icon string Collection icon (emoji or icon name)
color string Collection color (hex code)
customMeta object Custom key-value metadata for the collection
trackAccess boolean Record per-read access events for temporal analytics
trackHot boolean Maintain a hot-documents leaderboard for this collection
spellCorrect boolean Auto-correct FTS queries using the spell checker
spellLang string Override language for spell correction (defaults to query language)
encrypted boolean Encrypt documents and revisions of this collection at rest (AES-256-GCM; requires MDDB_ENCRYPTION_KEY on the server)
storageBackend string (Honoured from v2.12.0; accepted and ignored before that.) Where this collection's document bodies are stored. The metadata index, revisions, search indexes and replication binlog stay in the server's own database in every configuration — they are written in one transaction that a remote object store cannot join. A backend that cannot be reached is refused at configuration time, and writes to a collection whose backend fails later error rather than falling back to local disk. One of "boltdb", "memory", "s3".
storageConfig StorageConfigDef
quantization string Vector quantization level. int8 = 4x compression, int4 = 8x compression. Default: float32. One of "float32", "int8", "int4".
maxRevisions integer (v2.9.15+) Revision retention cap per document. 0 (default) = unlimited. When > 0, older revisions are trimmed synchronously on every write so history stays capped even under high write-churn. Default 0.
retrieval RetrievalProfile
responsePrompt string (v2.12.0+) How answers drawn from this collection should be formatted — numbered steps for runbooks, code blocks for API docs. Applied automatically by mddb-chat and returned alongside MCP search results, so the instruction travels with the data instead of living in every client. Supports and placeholders. Plain text for a model; never rendered as markup. Capped at 4 KiB because it is prepended to prompts automatically and would otherwise eat the context the answer needs. At most 4096 characters.
code CodeConfig
embedding EmbeddingChunking
fts CollectionFTS
wordpress WordPressTargetConfig
quota CollectionQuota
repository CollectionRepository
evalSet array of EvalQuery Evaluation queries (SRCH-019). Changed only through /v1/eval-queries; a PUT keeps the stored set. Read-only.
readOnly boolean The collection refuses every write (AGT-005): REST answers 403 with code READ_ONLY, gRPC PERMISSION_DENIED. Set only by installing a corpus pack; a PUT keeps it. Read-only.
corpus CorpusInfo

CorpusInfo #

The corpus pack a collection was installed from (AGT-005). See docs/CORPUS-PACKS.md.

Type: object

Read-only.

Property Type Description
name string
version string
license string
mddbVersion string
docCount integer
sha256 string sha256 of the pack's collection.db
installedAt string (date-time)
vectorsDisabled boolean The pack's vectors were made by another embedding model than the server's: they are not loaded, and hybrid search on the collection answers from full text only.
embedding CorpusEmbedding
description string
sources array of CorpusSource (FE-022) This collection's sources, as the manifest names them.
bytes integer (FE-022) Size of this collection's file in the pack.
packLicense string (FE-022) A pack of several collections only — the licence of the pack as a whole; license is this collection's.
collections array of string (FE-022) A pack of several collections only — every collection it installed.

CorpusEmbedding #

How a pack's vectors were made; null for a full-text-only pack.

Type: object \| null

Property Type Description
provider string
model string
dims integer

CorpusSource #

Type: object

Property Type Description
repo (required) string
commit string
license (required) string

CorpusBuildRequest #

Names the pack's collections in collection or in collections, not both.

Type: object

Property Type Description
collection string The collection to pack; the pack installs under this name.
collections array of oneOf string | CorpusBuildCollection (FE-022) The collections to pack, each a name or an object with its own licence and sources. Each installs as the collection it was built from.
name string (FE-022) The pack's name; required for several collections.
version string
description string
license (required) string Licence of the pack as a whole. Mandatory — pack only what may be redistributed.
sources array of CorpusSource Where the documents came from; each source needs a licence.

CorpusBuildCollection #

Type: object

Property Type Description
name (required) string
license string This collection's licence; without one, the pack's.
sources array of CorpusSource

CorpusManifest #

manifest.json of a pack (docs/CORPUS-PACKS.md).

Type: object

Property Type Description
format integer 1 for one collection, 2 for several.
name string
version string
description string
mddbVersion string
schemaVersion integer
createdAt string (date-time)
license string
sources array of CorpusSource
embedding CorpusEmbedding
docCount integer
sha256 string
bytes integer
collections array of object Format 2 only — the pack's collections, in archive order.
collections[].name string
collections[].license string
collections[].sources array of CorpusSource
collections[].schemaVersion integer
collections[].embedding CorpusEmbedding
collections[].docCount integer
collections[].sha256 string
collections[].bytes integer

CorpusInstallResult #

Type: object

Property Type Description
name string
version string
license string
docCount integer
vectorsDisabled boolean
warnings array of string
collections array of string (FE-022) The collections the pack installed.

WordPressTargetConfig #

(v2.11.0+) WordPress remote-publishing target used by the wordpress_publish / wordpress_set_status MCP tools. Points at a site running the mddb-sync plugin with "Remote publishing" enabled.

Type: object

Property Type Description
url (required) string Site base URL. Must be https:// (http only for localhost).
apiKey string mddb-sync publish key (Settings → MDDB Sync), sent as Authorization Bearer. (v2.12.0+) Write-only. Reads never return it — see apiKeySet. On write, an empty value keeps the stored key; remove the whole wordpress block to clear it. Write-only.
apiKeySet boolean (v2.12.0+) Read-only. true when a publish key is stored. Read-only.

StorageConfigDef #

Backend-specific configuration for non-default storage backends (required when storageBackend is 's3').

Type: object

Property Type Description
endpoint string S3-compatible endpoint URL
bucket string S3 bucket name
region string AWS region
accessKey string Access key for authentication
secretKey string (v2.12.0+) Write-only. Reads never return it — see secretKeySet. Reading a collection's configuration requires read permission on that collection, which is permission to read its documents, not to collect the credentials for the bucket underneath them. On write, an empty value keeps the stored secret, so the usual read-modify-write loop does not erase it. Send a new value to replace it; remove the whole storageConfig block to clear it. Write-only.
secretKeySet boolean (v2.12.0+) Read-only. true when a secret key is stored — so a blank secretKey field can be told apart from no credential at all. Read-only.
prefix string Key prefix within the bucket
useTLS boolean Use HTTPS for S3 connections

AggregateRequest #

Type: object

Property Type Description
collection (required) string Collection name
filterMeta object Optional metadata pre-filter (AND over keys, OR over values)
filter MetaFilter
facets array of object
facets[].field (required) string Metadata key to aggregate
facets[].orderBy string Sort order for facet buckets (default count descending) One of "count", "value".
histograms array of object
histograms[].field (required) string Time field to histogram (addedAt or updatedAt)
histograms[].interval string Histogram bucket interval (default month) One of "day", "week", "month", "year".
maxFacetSize integer Maximum number of values per facet (default 50)

AggregateResponse #

Type: object

Property Type Description
collection string
totalDocs integer Total documents matching the filter (or all docs if no filter)
facets object Facet results keyed by metadata field name
histograms object Histogram results keyed by field name
durationMs integer Query execution time in milliseconds

CrossSearchRequest #

Type: object

Property Type Description
rerank RerankOptions
includeImages boolean (v2.18.9, RAG-010) Attach each hit's image documents — those whose meta.parent is the hit's key — as images, with alt text, caption and page. Without it nothing is looked up and the response is unchanged.
searchType string (v2.18.8, AGT-003) fts and hybrid run the single-collection search in each target and fuse the lists by reciprocal rank; they need a query. A target "role:reference" stands for every collection whose code.role is reference. One of "vector", "fts", "hybrid". Default "vector".
format string passages returns path + lines + enclosing definition + text per hit instead of documents (AGT-002, v2.18.8); the response is a PassagesResponse. One of "results", "passages".
passageLines integer Lines of context on each side of a hit (default 10); a hit inside a shorter definition returns the definition. Minimum 0. Maximum 200.
passageTokens integer (v2.19.13) The most tokens one passage may hold. Unset, a passage cut around a hit holds at most 500; chunks and vector hits are cut only when this is set. A passage over it loses context lines, then the end of its hit line, and carries truncated: true. Minimum 0. Maximum 8000.
waitForIndex integer Wait up to this many ms for queued embeddings before searching; running out of time is not an error (indexing.timedOut). Minimum 0. Maximum 30000.
waitForKeys array of string With waitForIndex, wait only for these document keys.
groupBy GroupBy
oversample number (v2.12.0+) Recall/latency knob: candidates fetched per requested result before deduplication, merging or rescoring trims them. Omitted, uses the collection's retrieval profile then MDDB's default of 3.0. Out of range returns 422 rather than clamping. See SEARCH.md#oversampling for measured effect. Minimum 1. Maximum 10.
sourceCollection string Collection containing the source document (for document-as-query)
sourceDocID string ID of the source document whose embedding to use as query
query string Text query (alternative to sourceCollection/sourceDocID)
queryVector array of number Pre-computed query vector (alternative to query or source document)
targetCollections array of string Collections to search in
topK integer Number of results to return Default 10.
threshold number Minimum similarity score Default 0.
algorithm string Vector search algorithm. auto (v2.18.9+) plans each target collection on its own; the response then reports auto and, with explain, one plan per target under plan.collections. One of "flat", "auto", "hnsw", "ivf", "pq", "opq", "sq", "sq4", "bq". Default "flat".
explain PlanExplain
latencyTargetMs PlanLatencyTarget
positive FeedbackExamples
negative FeedbackExamples
feedbackMode FeedbackMode
feedbackWeight FeedbackWeight
rocchio RocchioWeights
distanceMetric string Distance metric for similarity computation One of "cosine", "dot_product", "euclidean". Default "cosine".
filterMeta object Metadata filters applied to target documents
filter MetaFilter
includeContent boolean Include document content in results Default false.

CrossSearchResponse #

Type: object

Property Type Description
rerank RerankReport
rerankSkipped RerankSkipped
limit LimitUsed
limitCapped LimitCapped
plan SearchPlan
indexing IndexWaitResult
results array of CrossSearchResultItem
total integer Total number of results
sourceCollection string Source collection (if document-as-query was used)
sourceDocID string Source document ID (if document-as-query was used)
targetCollections array of string Collections that were searched
algorithm string Vector search algorithm used
distanceMetric string Distance metric used
searchStats SearchStats

CrossSearchResultItem #

Type: object

Property Type Description
images array of ImageRef (v2.18.9, RAG-010) The document's images, with includeImages.
group string Group this result counted against (only with groupBy, SRCH-016).
groupRank integer 1-based place of this result within its group (only with groupBy).
collection string Collection the result came from
document Document
score number (float) Similarity score
rank integer Result rank (1-based)

FindDuplicatesRequest #

Type: object

Property Type Description
collection (required) string Collection to scan
mode string Detection mode. - exact: identical content hashes - similar: close embeddings — finds documents on the same topic, and needs an embedding provider configured - minhash: overlapping text (SRCH-002) — finds a page that was forked and lightly edited, which exact misses and similar cannot distinguish from two independent pages on one subject. Needs no embeddings. - both: exact and similar. Deliberately excludes minhash, which reads every document body. One of "exact", "similar", "minhash", "both". Default "both".
threshold number Similarity threshold for similar mode Default 0.9. Minimum 0. Maximum 1.
maxDocs integer Maximum documents to process (safety bound) Default 5000.
distanceMetric string One of "cosine", "dot_product", "euclidean". Default "cosine".
includeContent boolean Default false.

FindDuplicatesResponse #

Type: object

Property Type Description
collection string
mode string
threshold number
distanceMetric string
totalDocuments integer
totalEmbedded integer
exactGroups array of DuplicateGroup
similarGroups array of DuplicateGroup
minhashGroups array of DuplicateGroup Near-duplicates by text overlap; present only in minhash mode.
exactDuplicates integer
similarPairs integer
minhashPairs integer Pairs inside the minhash groups (n*(n-1)/2 per group); present only in minhash mode.
searchStats SearchStats

DuplicateGroup #

Type: object

Property Type Description
groupId integer
type string One of "exact", "similar", "minhash".
documents array of DuplicateDocInfo
score number Average similarity score for the group

DuplicateDocInfo #

Type: object

Property Type Description
docId string
key string
lang string The document's language (2.19.0+), so a caller need not parse it out of docId.
contentHash string
contentMd string
score number Max similarity to another document in the group