mcp

v8.29.0
@react-querybuilder/mcp Checked 2 hours ago Published 4 days ago

MCP 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…

ParameterTypeDescription
format *stringTarget 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.
optionsobjectJSON-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.

ParameterTypeDescription
input *Source query: string for all formats; mongodb/jsonlogic also accept an object. sql accepts a full SELECT or just the WHERE clause.
sourceFormat *stringFormat of `input`.
optionsobjectParser 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.

ParameterTypeDescription
from *stringSource 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 *stringTarget format. ORM formats (drizzle, prisma, sequelize, tanstack_db) are not supported over MCP; they return an error with guidance.
fieldsField definitions: JSON subset of RQB `Field` — `name`, `label`, `operators`, `values`, `inputType`, `valueEditorType`, `valueSources`, `datatype` (category like `number`/`date`/`string` or raw DB t…
formatOptionsobjectJSON-serializable subset of `FormatQueryOptions` (no function options).
parseOptionsobjectParser 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.

ParameterTypeDescription
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.
queryTypestringExpected query type: "standard" (`RuleGroupType`) or "ic" (`RuleGroupTypeIC`). Omit to accept either.
targetFormatstringExport 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.

ParameterTypeDescription
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…
optionsobject`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.

ParameterTypeDescription
query *stringSearch terms, e.g. "parameterized sql", "custom value editor".
limitintegerMax 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").

ParameterTypeDescription
page *stringDoc 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.