Terminal
Terminal/Skill
Looks up built-in SurrealQL function names and signatures for your installed version, using the SurrealQL language server for editor hints.
By SurrealDB
Works with
npx skills add surrealdb/agent-skills --skill surrealql-functionsSurrealDB ships hundreds of built-in functions grouped into namespaces
(string::, array::, math::, type::, …). Function names and signatures
change between releases, so the authoritative, version-current source is the
SurrealQL tooling rather than memory:
For mapping any function to authoritative documentation, see references/catalog.md.
.surql filesInstall the language server from crates.io — the published crate bundles the grammar, so no separate tree-sitter checkout is needed:
cargo install surrealql-language-server
# -> installs the `surrealql-language-server` binary on your PATH (~/.cargo/bin)
Verify it is on your PATH:
surrealql-language-server --help
Only needed for development or to track unreleased changes. The source build requires the tree-sitter grammar checked out as a sibling directory:
git clone https://github.com/surrealdb/surrealql-language-server.git
cd surrealql-language-server
bash scripts/setup-grammar.sh # clones/updates the grammar
# ...or: export TREE_SITTER_SURREALQL_DIR=/abs/path/to/surrealql-tree-sitter
cargo build --release # -> target/release/surrealql-language-server
For browser/editor embedding, build the wasm-bindgen npm package instead with
bash scripts/build-wasm.sh (outputs to pkg/).
Point your editor's LSP client at the surrealql-language-server binary for the
.surql / surrealql language. Generic stdio LSP configuration:
surrealql-language-server (or the absolute path from a source build)*.surqlThe server then provides, against the installed grammar version:
record<table> types, and keywords.surql buffer connected to the LSP.string::) and trigger completion to enumerate
that namespace's built-in functions for the installed version.Because completions and signatures come from the installed grammar, they reflect the current SurrealDB version — preventing stale or renamed functions from older releases. To read full documentation and examples for any namespace, follow the links in references/catalog.md.