Besides a type’s own fields, every node has id, type, title, visibility, summary, updated, backlinks and tags.
Examples
brain query 'person where last_contact < -60d and closeness >= 4 sort last_contact'brain query 'meeting where date >= 2026-01-01 sort date desc limit 10'brain query 'decision where status = open'brain query 'book where missing category'brain query '* where title ~ pricing'
The same queries work at /q in the web app, through the MCP tool brain_query and at GET /api/query?q=….
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Brain","description":"A Markdown vault where every file is a typed node, built for one person and the AI agents that work for them.","colors":{"primary":"#3B5BDB","light":"#748FFC","dark":"#364FC7"},"integrations":{"telemetry":{"enabled":false}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4203"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[],"page":{"pagePath":"reference/query-language","slug":"/reference/query-language","pageMetadata":{"title":"Query language","description":"List nodes by type and field values.","href":"/reference/query-language"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"List nodes by type and field values.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`form`,children:`Form`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`\u003ctype | *> [where \u003ccondition> [and \u003ccondition>]…] [sort \u003cfield> [asc|desc]] [limit \u003cn>]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`conditions`,children:`Conditions`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Form`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`field = value`}),`, `,_jsx(_components.code,{children:`field != value`})]}),_jsx(_components.td,{children:`Equal, not equal`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`field \u003c value`}),`, `,_jsx(_components.code,{children:`\u003c=`}),`, `,_jsx(_components.code,{children:`>`}),`, `,_jsx(_components.code,{children:`>=`})]}),_jsx(_components.td,{children:`Comparison for numbers and dates`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`field ~ value`})}),_jsx(_components.td,{children:`Contains`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`has field`})}),_jsx(_components.td,{children:`The field is set`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`missing field`})}),_jsx(_components.td,{children:`The field is not set`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`values`,children:`Values`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Example`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Number`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`4`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Date`}),_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`2026-01-01`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Relative date`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`-60d`}),`, `,_jsx(_components.code,{children:`+2w`}),`, `,_jsx(_components.code,{children:`-3m`}),`, `,_jsx(_components.code,{children:`-1y`}),`, counted from today`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Text`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`\"two words\"`}),` or a bare word`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Besides a type’s own fields, every node has `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`type`}),`, `,_jsx(_components.code,{children:`title`}),`, `,_jsx(_components.code,{children:`visibility`}),`, `,_jsx(_components.code,{children:`summary`}),`, `,_jsx(_components.code,{children:`updated`}),`, `,_jsx(_components.code,{children:`backlinks`}),` and `,_jsx(_components.code,{children:`tags`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`examples`,children:`Examples`}),`\n`,_jsx(CodeBlock,{numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`brain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` query`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'person where last_contact \u003c -60d and closeness >= 4 sort last_contact'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`brain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` query`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'meeting where date >= 2026-01-01 sort date desc limit 10'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`brain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` query`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'decision where status = open'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`brain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` query`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'book where missing category'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`brain`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` query`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '* where title ~ pricing'`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The same queries work at `,_jsx(_components.code,{children:`/q`}),` in the web app, through the MCP tool `,_jsx(_components.code,{children:`brain_query`}),` and at `,_jsx(_components.code,{children:`GET /api/query?q=…`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Query language","description":"List nodes by type and field values.","href":"/reference/query-language"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Form","slug":"form","depth":2,"children":[]},{"title":"Conditions","slug":"conditions","depth":2,"children":[]},{"title":"Values","slug":"values","depth":2,"children":[]},{"title":"Examples","slug":"examples","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"localhost","siteName":"Brain","title":"Query language - Brain","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"reference/query-language.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"List nodes by type and field values.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Brain\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/local/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/local/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/local/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/local/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Query language - Brain\">\u003cmeta data-mint-head property=\"og:description\" content=\"List nodes by type and field values.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Brain\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./docs/reference/query-language\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Query language - Brain\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"List nodes by type and field values.\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/local/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Brain\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3B5BDB\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./docs/reference/query-language\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/reference/query-language.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Brain\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Brain\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/reference/query-language.md","siteName":"Brain","nav":{"groups":[{"group":"Start here","pages":[{"title":"Brain","href":"/index"},{"title":"Quickstart","href":"/quickstart"},{"title":"How it works","href":"/how-it-works"}]},{"group":"Concepts","pages":[{"title":"Nodes and types","href":"/concepts/nodes-and-types"},{"title":"Claims and freshness","href":"/concepts/claims-and-freshness"},{"title":"Links, mentions and groups","href":"/concepts/links-and-groups"},{"title":"Search and Ask","href":"/concepts/search-and-ask"}]},{"group":"Agents","pages":[{"title":"Agents overview","href":"/agents/overview"},{"title":"Context briefings","href":"/agents/context"},{"title":"MCP server","href":"/agents/mcp"},{"title":"HTTP API","href":"/agents/http-api"},{"title":"Writing back","href":"/agents/writing"}]},{"group":"Connectors","pages":[{"title":"Notion sync","href":"/connectors/notion"},{"title":"File imports","href":"/connectors/imports"},{"title":"Google Drive","href":"/connectors/google-drive"},{"title":"Publishing public pages","href":"/connectors/publish"}]},{"group":"Operations","pages":[{"title":"Web app","href":"/operations/web-app"},{"title":"Deploy","href":"/operations/deploy"},{"title":"Scheduled sync","href":"/operations/schedule"},{"title":"Testing","href":"/operations/testing"}]},{"group":"Reference","pages":[{"title":"CLI reference","description":"Every brain command.","href":"/reference/cli"},{"title":"Query language","href":"/reference/query-language"},{"title":"Environment variables","description":"Every setting the tool reads.","href":"/reference/environment"}]}]},"basePath":"/docs","title":"Query language - Brain","buildId":"3fee6f877672","dynamics":[],"chunks":[]}