mcp
v8.29.0MCP server for React Query Builder: format, parse, convert, and validate queries; search docs
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
format_query Format query
Convert a React Query Builder (RQB) query object to another format with the library's own formatQuery (v8.29.0). Prefer this over hand-writing SQL/Mongo/etc. from an RQB query. Formats: sql, parameterized, parameterized_named, mongodb_query, mongodb, cel, spel, jsonlogic, elasticsearch, jsonata, ldap, cypher, gql, sparql, gremlin, pinecone, chroma, qdrant, weaviate, milvus, natural_language, json, json_without_ids, diagnostics. String outputs: sql, mongodb (JSON string), cel, spel, jsonata, ldap, cypher, gql, sparql, gremlin, milvus (vector DB filter expr), natural_language, json, json_without…
| Parameter | Type | Description |
|---|---|---|
format * | string | Target format. ORM formats (drizzle, prisma, sequelize, tanstack_db) are not supported over MCP; they return an error with guidance. |
query * | RQB query object (`RuleGroupType` `{ combinator, rules: [...] }` or `RuleGroupTypeIC` `{ rules: [rule, "and", rule, ...] }`), or its JSON string. `id`s optional. | |
options | object | JSON-serializable subset of `FormatQueryOptions` (no function options). |
parse_query Parse query
Parse a query string/object (sql, cel, mongodb, jsonlogic, spel, jsonata, cypher, gql, gremlin, sparql) into an RQB query object (RuleGroupType, or RuleGroupTypeIC with options.independentCombinators). Use the result as the QueryBuilder `query`/`defaultQuery` prop. Pass options.fields to drop unknown fields. To go straight to another format, use convert_query instead.
| Parameter | Type | Description |
|---|---|---|
input * | Source query: string for all formats; mongodb/jsonlogic also accept an object. sql accepts a full SELECT or just the WHERE clause. | |
sourceFormat * | string | Format of `input`. |
options | object | Parser options (subset common to all parsers; extras are format-specific). |
convert_query Convert query
Convert between query languages in one step (parse sql/cel/mongodb/jsonlogic/spel/jsonata/cypher/gql/gremlin/sparql → RQB query → any format_query format), e.g. SQL WHERE clause → MongoDB, JsonLogic → parameterized SQL. Returns the result plus the intermediate RQB query. Prefer this over separate parse_query + format_query calls unless you need to edit the intermediate query. `fields` applies to both steps.
| Parameter | Type | Description |
|---|---|---|
from * | string | Source format. |
input * | Source query: string for all formats; mongodb/jsonlogic also accept an object. sql accepts a full SELECT or just the WHERE clause. | |
to * | string | Target format. ORM formats (drizzle, prisma, sequelize, tanstack_db) are not supported over MCP; they return an error with guidance. |
fields | Field definitions: JSON subset of RQB `Field` — `name`, `label`, `operators`, `values`, `inputType`, `valueEditorType`, `valueSources`, `datatype` (category like `number`/`date`/`string` or raw DB t… | |
formatOptions | object | JSON-serializable subset of `FormatQueryOptions` (no function options). |
parseOptions | object | Parser options (subset common to all parsers; extras are format-specific). |
validate_query Validate query
Validate an RQB query against a fields config: shape, IC alternation (rule, combinator, rule...), unknown fields, operator allowed for field, value arity (between/in), value type vs inputType, values-list membership, placeholders. Returns { valid, errors[], warnings[] }. Pass targetFormat (e.g. "qdrant") to warn about rules that format can't express. Run this on any query you generate before using it in app code.
| Parameter | Type | Description |
|---|---|---|
fields * | Field definitions: JSON subset of RQB `Field` — `name`, `label`, `operators`, `values`, `inputType`, `valueEditorType`, `valueSources`, `datatype` (category like `number`/`date`/`string` or raw DB t… | |
query * | RQB query object (`RuleGroupType` `{ combinator, rules: [...] }` or `RuleGroupTypeIC` `{ rules: [rule, "and", rule, ...] }`), or its JSON string. `id`s optional. | |
queryType | string | Expected query type: "standard" (`RuleGroupType`) or "ic" (`RuleGroupTypeIC`). Omit to accept either. |
targetFormat | string | Export format the query will be sent to. Rules it cannot express (e.g. vector DB formats like "pinecone", "chroma", "qdrant", "weaviate", "milvus") are reported as warnings. |
get_query_schema Get query JSON Schema
Generate a JSON Schema describing valid RQB queries for a fields config (wraps getQueryJsonSchema). Use it for LLM structured output / tool input schemas or Ajv validation. Set options.strict for OpenAI structured outputs. For app code, call getQueryJsonSchema from @react-querybuilder/core directly; this tool previews the output.
| Parameter | Type | Description |
|---|---|---|
fields * | Field definitions: JSON subset of RQB `Field` — `name`, `label`, `operators`, `values`, `inputType`, `valueEditorType`, `valueSources`, `datatype` (category like `number`/`date`/`string` or raw DB t… | |
options | object | `GetQueryJsonSchemaOptions`. |
search_docs Search docs
Search the React Query Builder docs (v8.29.0, matching this package version). Returns ranked { title, url, snippet }. Follow up with get_doc for full content.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search terms, e.g. "parameterized sql", "custom value editor". |
limit | integer | Max results (default 5). |
get_doc Get doc page
Get a React Query Builder docs page (or one section, via #anchor) as markdown, by URL from search_docs or slug (e.g. "utils/export", "components/querybuilder", "compat").
| Parameter | Type | Description |
|---|---|---|
page * | string | Doc URL (from search_docs) or slug, e.g. "utils/export" or "https://react-querybuilder.js.org/docs/utils/export#sql". With an #anchor, returns only that section. |