CLI and MCP Server Technical Reference
Summary
- Every command and its MCP tool, with a sample of what it prints, the JSON envelope and the exit codes
- Call the MCP tool when the server is configured. Otherwise run the CLI with
--json. A script only ever has the CLI - Install, and the choice between the MCP server and the CLI, is on the CLI and MCP Server page
Important
- This page is for the Agent Skills - it is the command and tool reference they follow
- Install, and the choice between the MCP server and the CLI, is on the CLI and MCP Server page
Which binding to call
Prefer the MCP tool when the server is configured. Otherwise run the CLI as npx adaptable <command> --json. A script cannot reach the MCP session, so a script only ever runs the CLI.
Both return the same envelope. The server exposes tools only: docs are read through search_docs and get_doc. A dash in the MCP column means the command is CLI-only.
The tool name is not the command name. detect is detect_environment, docs search is search_docs, changes is list_changes, compat is get_compatibility, and aql functions is list_expression_functions.
Generated from adaptable --help --json of @adaptabletools/adaptable-mcp@1.0.0 (schema 1); 20 commands, 12 of them also MCP tools.
Commands
| Command | MCP tool | What it does |
|---|---|---|
adaptable anonymise <file> | — | Replaces the values of a State, Options, Grid Info, columns or row-data JSON with shape-preserving placeholders — names, column ids, expressions and structure kept, licence keys and user names redacted, row data scrubbed — for a support case. |
adaptable check expression <expression> | check_expression | Validates an AdapTableQL expression with the 24 engine: syntax, functions, kinds the module accepts, column references; exact rewrites for JavaScript-style operators and pre-24 syntax. |
adaptable migrate expression <expression> | migrate_expression | Rewrites one pre-24 AdapTableQL expression to the target major's syntax with the library's own migration (brace aggregations, named operands, legacy observable rules) and validates the result. |
adaptable aql functions | list_expression_functions | Lists the AdapTableQL functions, aggregations, observable functions and clauses the engine accepts, with signatures, examples and docs slugs; filter by group, module or text. |
adaptable changes | list_changes | Lists the changes between two AdapTable majors from the release-note records; with --repo keeps the ones the project's code hits (file:line) and the ones that always apply. |
adaptable compat | get_compatibility | AG Grid pairing, wrapper packages and environment requirements for an AdapTable major, from the docs manifest. |
adaptable detect | detect_environment | Detects the AdapTable projects at or below the folder: versions, framework, AG Grid, source layout hints. |
adaptable convert coldefs <file> | — | Turns AG Grid columnDefs into an AdapTable Layout (order, hidden columns, sizing, pinning, sorts, row groups, aggregations, pivots), lists the ColDef properties to remove with file:line, and the cellStyle / valueFormatter / valueGetter / cellRenderer snippets to re-express as Format, Calculated, Styled or Action Columns. The Layout is run through check state first. |
adaptable docs list | — | Lists the docs pages for the project’s AdapTable version, grouped by sidebar section: the feature index. |
adaptable docs search <query> | search_docs | Searches the docs for the project’s AdapTable version and framework; returns matching sections with slugs and URLs. |
adaptable docs get <pages...> | get_doc | Reads docs pages as Markdown for the project’s version and framework; one section with --section, demo code trimmed unless --full. |
adaptable docs demos <page> | — | Lists the demos embedded in a docs page, with the files each demo owns. |
adaptable docs demo <name> | get_demo | Returns one demo’s own files (adaptableOptions.ts by default; --files for others). Template files are never returned. |
adaptable migrate state <file> | migrate_state | Migrates Adaptable State between majors with the library's own migration engine; reports the log, what the target major does not know (leftovers) and the check state result for the target. |
adaptable cache add <spec> | — | Downloads a @adaptabletools/adaptable version into the cache so checks and migrations for that major work offline. |
adaptable cache list | — | Shows cached library packages, bundled entries and docs corpora with sizes and ages. |
adaptable cache clear | — | Removes cached docs corpora and/or library packages (with their entry bundles); everything when no flag is given. |
adaptable scaffold | — | Overlays the AdapTable files the docs demos run on onto a creator project (Vite or Angular CLI): columns, row data and an Initial State inferred from a CSV / JSON / XLSX file, dependencies pinned from the docs manifest, an AGENTS.md snippet. Never overwrites without --force. |
adaptable check setup | check_setup | Audits how AdapTable is wired into a project: stylesheet, required options, licence literal, version skew, AG Grid modules, column typing, direct grid use, ColDef ownership, React refs, ready hook, and the Options shape against the major’s types. |
adaptable check state <file> | check_state | Validates Adaptable State (a JSON file or the literal in a .ts/.tsx/.js/.jsx/.vue file) against the checked major: shape, semantics, column references and AdapTableQL. |
CLI-only, and why:
scaffold,convert coldefs,anonymiseandcachewrite files or manage the machine's cache. Run them in a terminaldocs listanddocs demosare browsing aids. The tools reach the same pages throughsearch_docs,get_docandget_demolist_changesreturns the change records.changes --repoadds the repository search, and that search is CLI-only
Note
In a long-lived server the docs manifest is re-validated at most once a minute, and the AdapTable package is resolved per call, so one server serves projects on different majors.
Commands by job
One command per job, with a trimmed sample of what it prints (paths shortened, long messages cut at …). The tool name for each is in the table above. Every flag is in the Command reference.
Know your project
_AdapTable 24.0.0 (detected) · react · AG Grid 36.2.0 · code: installed · docs: https://www.adaptabletools.com_
## /work/trades-blotter
- AdapTable: 24.0.0 (declared 24.0.0), major 24
- Wrapper: @adaptabletools/adaptable-react-aggrid 24.0.0 (declared 24.0.0)
- AG Grid: ag-grid-enterprise 36.2.0 (declared 36.2.0)
- Framework: react (react 19.3.1 (declared ^19.0.0), react-dom 19.3.1 (declared ^19.0.0))
- Licence key in sources: no
- Initial State literals: `src/adaptableOptions.ts`
- columnDefs files: `src/columnDefs.ts`compat prints the AG Grid version, wrapper packages and environment (Node, TypeScript, framework) a major needs, and which majors have change records.
Read the docs for your version
1. **FormatColumn** › Property Details > Rule — `reference/formatcolumn` (AdapTable Types Reference, ~58 tokens)
https://www.adaptabletools.com/docs/reference/formatcolumn?framework=react
AdapTableQL boolean expression (evaluated per row) deciding whether to apply the Format, e.g. `[price] > 100` …
3. **Format Columns** › Condition — `handbook-column-formatting` (Cell Rendering, ~110 tokens)
https://www.adaptabletools.com/docs/handbook-column-formatting?framework=react
By default, a Format Column applies to every cell in scope. An optional **Rule** limits application to matching rows …docs list— the feature index, with the demos each page shows (--area,--sectionnarrow it)docs search <query>— the pages of your version and framework, ranked, with the section that matcheddocs get <page>— a page as Markdown;--section "<heading>"returns one section,--max-tokenscuts at a heading boundary,--fullinlines demo codedocs demos <page>anddocs demo <name>— the runnable demos a page shows, and one demo's files.docs demosis CLI-only; one demo's files are theget_demotoolaql functions— the functions the engine accepts, with signatures and examples.--module,--groupor--querynarrows the list. Calllist_expression_functionsbefore using a function you are not certain exists for the installed version
All of it comes from this site's docs export (/llms/manifest.json, pages.json, one .md per page), picked for the detected major, re-validated with a conditional request and cached.
Check what was written
The three commands the Skills run after every edit, and the ones worth wiring into CI.
## Issues (3)
| Severity | Rule | Where | Message |
| --- | --- | --- | --- |
| error | `layout/current-exists` | src/adaptableOptions.ts:8:22 | CurrentLayout "Trading" does not match any Layout Name ("Trades"). — Set `CurrentLayout` to one of "Trades", or rename that Layout to "Trading". |
| error | `layout/column-refs` | src/adaptableOptions.ts:12:25 | Column "trader" is not in the grid's columns (columnDefs.ts). — Use a column id from columnDefs (`colId`, else `field`) … |
| error | `aql/syntax` | src/adaptableOptions.ts:22:17 | FormatColumn expression `[pnl] < 0 && [status] == "Open"`: Parse error on line 1 … got '&' |
# check state — 3 errors
- Input: src/adaptableOptions.ts:6:17 (property), initial State
- Checked: shape types.d.ts@24.0.0; semantics 16 rules; column refs yes (columnDefs.ts); options visible; AdapTableQL yes
- Stats: 2 sections, 1 layouts, 1 expressions, 6 columnscheck state reads the initialState literal out of a source file (or a JSON file, or stdin with -), type-checks it against the installed version's InitialState type, runs its semantic rules — CurrentLayout names a Layout, every column reference exists in --columns, Scopes are consistent, every embedded Expression parses for its Module — and reports what it could not verify (a spread, a function call, a computed key). --kind persistent checks a State exported from a running Grid (getPersistentState() from the DevTools In-page API); --columns takes a columnDefs source file or a getColumns() dump. --major <n> checks against a major that is not installed yet, which is how a plan checks State for the target version.
## `[pnl] < 0 AND [status] = 'Open'`
- Valid as **boolean** in FormatColumn (accepts boolean), returns boolean
- Functions: —; columns: [pnl], [status]
_Engine 24.0.0 (installed); module rules from the engine._check expression validates one AdapTableQL Expression for the Module it will be used in, with the column types from --columns. Written with JavaScript operators (&&, ==), the same Expression fails with AQL_SPLIT_BRAIN and the AdapTableQL to write instead. aql functions lists the functions available, by --module, --group or --query.
## Issues (3)
| Severity | Rule | Where | Message |
| --- | --- | --- | --- |
| error | `setup/css-import` | | AdapTable's stylesheet (`@adaptabletools/adaptable/index.css`) is not imported anywhere; the grid renders unstyled. — Import it once … |
| error | `setup/modules` | | No AG Grid module registration was found (`ModuleRegistry.registerModules([...])`); AG Grid 33+ renders nothing without it. — Register `AllEnterpriseModule` once at startup … |
| info | `setup/ready-hook` | | No ready hook was found; the Adaptable API (`adaptableApi`) is delivered through it. — Pass `onAdaptableReady={({ adaptableApi }) => …}` to `<AdaptableReact>`. |
# check setup — 2 errorscheck setup audits the wiring: the wrapper package and its version against the core, AG Grid Enterprise at the paired version, the modules registered, the CSS imported, adaptableId and primaryKey set (and the key naming a real column), the Options literal against the installed AdaptableOptions type, the licence key not in source, the framework component used (not the grid directly), adaptableApi taken from the ready hook, stable references in React, cellDataType on every column, and ColDef properties that AdapTable's Layout owns (hide, pinned, width, sort, rowGroup, aggFunc …).
Move between majors
# Changes 23 → 24
- Environment for 24: node >=20 · typescript >=5.5.4 · react >=18 · angular >=20 · vue >=3
- Searched 7 files in /work/trades-blotter
### Adaptable Options
#### New option defaults
- **BEHAVIOUR** · auto-migrated: n/a · id `options-new-defaults`
- Batched Alerts default: `one Alert per changed cell` → `alertOptions.consolidateBatchAlerts defaults to true (set false to restore)`
- Note: Accept the new defaults or restore v.23 behaviour per row …
- Release note: https://www.adaptabletools.com/support/version-240-release-note#chg-options-new-defaults
- Matches: (applies to every project)changes lists every change record between two majors — the tagged rows of the release notes' Upgrade Guides — and, with --repo, searches your repository for each record's tokens so the plan names file:line; --with-docs inlines the release-note section that holds the remedy.
migrate state runs AdapTable's own State migration on an initialState literal or an exported State, writes the result with --out, logs every change it made, re-checks the result against the target major and lists the leftovers it could not convert. The adaptable-upgrade Skill drives this, migrate expression and changes.
migrate expression rewrites one Expression to the target major with AdapTable's own migration (brace aggregations, named operands, legacy observable rules) and validates the result. --from and --to match migrate state. The MCP tool is migrate_expression.
Start and share
scaffold --framework <fw> --out <dir> --data <file>overlays an AdapTable project onto a fresh framework shell from a CSV, JSON or XLSX sample: columns typed from the data, one Layout, the AGENTS.md snippet, keys read from environment variables (--dry-runpreviews it)convert coldefs <file>turns AG GridcolumnDefsinto an AdapTable Layout and Format Columns, and checks the resultanonymise <file>replaces the values of a State, Options, Grid Info or row data with shape-preserving placeholders — names, column ids, Expressions and structure kept, licence keys and user names redacted — for a support case
# anonymise — 3 strings and 3 numbers replaced, 1 identifier kept
- Input: grid-info.json (json)
- Redacted: `userName`, `licenseKey`
- Row data: 1 row; fields renamed: tradeId → field1, counterparty → field2, notional → field3, pnl → field4
- Written to: anonymised.jsonCache
cache add <spec>downloads an AdapTable package (a major such as24, an exact version or a dist-tag) so checks and migrations for it work offlinecache listshows the packages, engine bundles and docs held, with sizes and agescache clearremoves everything, or only--docsor--pkgs
What a run resolves
Every command resolves the project before it does anything: the AdapTable major (and exact version) from package.json and the lockfile, the framework, the AG Grid version and whether the pair is compatible, and which docs site serves that major. --major <n> and --framework <fw> override detection for a folder that has no project yet; the resolved context is in the Markdown header and in resolvedContext of the JSON envelope. In a monorepo pass --cwd <dir> for the project. When detect finds more than one project it stops; --all-projects lists every one.
The checks and migrations load their engine from an AdapTable package of major 24 or later:
- the one installed in the project when it is 24+ (
codeSource: installed) - otherwise a copy of the right version downloaded through
npminto the cache (codeSource: cached), so a 22 or 23 project is checked with 22 or 23 types and migrated with the 24 engine
Output
Markdown by default: a context line, warnings, a table of issues with file:line positions, then the command's own report. --quiet drops warnings and info issues.
--json prints the envelope, the same for every command and for the MCP tools:
{
"schemaVersion": 1,
"ok": true,
"resolvedContext": { "adaptableMajor": 24, "framework": "react", "source": "detected", "docsHost": "https://www.adaptabletools.com", "codeSource": "installed" },
"warnings": [],
"issues": [
{
"code": "layout/current-exists",
"severity": "error",
"path": "Layout.CurrentLayout",
"message": "CurrentLayout \"Trading\" does not match any Layout Name (\"Trades\").",
"fix": "Set `CurrentLayout` to one of \"Trades\", or rename that Layout to \"Trading\".",
"docs": "handbook-layouts",
"file": "src/adaptableOptions.ts",
"line": 8,
"column": 20
}
],
"data": { }
}issues[]— findings about your input: a rulecode, aseverity(error,warning,info), thepathinside the checked object, the position in the source file when the input was one, afixand thedocspage for the rulewarnings[]— about the run itself (a package not installed, docs served from cache, a host for another major)data— the command's payload; its shape per command is in the command reference
A failed call is { "ok": false, "error": { "code", "message", "hint" } }; hint says what to do about it.
Exit codes
| Code | Meaning |
|---|---|
0 | ok, no findings |
1 | findings: at least one error or warning issue (info does not count) — what a pre-commit hook or CI step keys on |
2 | usage: a bad flag or argument, an input that could not be read or extracted, a command the MCP binding does not offer |
3 | environment: no AdapTable dependency, an unsupported version, a package or the docs could not be fetched, network required |
Offline and restricted networks
--offline(or no network) uses the cached docs and packages and touches nothing; a command that needs something not cached fails withNETWORK_REQUIREDorDOCS_NOT_AVAILABLEand says socache add <spec>downloads a package ahead of time;cache listandcache clearmanage the cache (~/.cache/adaptable-mcp, orADAPTABLE_MCP_CACHE_DIR). Copy that folder to a machine without registry access — see Prepare a machine with no network- Package downloads go through the
npmCLI, soHTTPS_PROXYand.npmrc(registry mirror, auth) apply. Docs downloads use Node'sfetch: on Node 24+ setNODE_USE_ENV_PROXY=1for the proxy to apply; on Node 20–22 warm the cache from a connected machine --docs-host <url>(orADAPTABLE_MCP_DOCS_HOST) reads a different docs site — an internal mirror, or a pre-release host
Note
~/.cache/adaptable-mcpholds the docs export per docs host, AdapTable packages per version and the engine bundles built from them; nothing in it is specific to a project, and none of your code, State or data is written to it- The only commands that write files are
scaffold --out,migrate state --out,anonymise --outand the cache
Prepare a machine with no network
On a connected machine, with the same CLI version:
cache add stores the package. Any docs command stores the docs for the detected major. Copy ~/.cache/adaptable-mcp to the other machine (or point ADAPTABLE_MCP_CACHE_DIR at a shared copy) and run with --offline.
Environment variables
| Variable | Default | Use |
|---|---|---|
ADAPTABLE_MCP_CACHE_DIR | $XDG_CACHE_HOME/adaptable-mcp or ~/.cache/adaptable-mcp | Cache for docs, packages and bundled engine entries |
ADAPTABLE_MCP_DOCS_HOST | the docs site matching the detected major | Docs site to read instead (same as --docs-host) |
HTTPS_PROXY, .npmrc | Honoured by the package downloads (they go through npm) | |
NODE_USE_ENV_PROXY | Set to 1 on Node 24+ so docs downloads use HTTPS_PROXY |
Troubleshooting
Troubleshooting
Symptom
NETWORK_REQUIRED or DOCS_NOT_AVAILABLESuggested fix
--offline or has no network. Run it once with network access, or prepare the cache on a connected machine — see Prepare a machine with no networkSymptom
check state lists properties as "unverifiable"Suggested fix
Symptom
Suggested fix
detect to see what it found. In a monorepo pass --cwd for the project; for a folder with no project yet, or to check against another major, pass --major <n>Symptom
Suggested fix
NODE_USE_ENV_PROXY=1 alongside HTTPS_PROXY; on Node 20–22, warm the cache from a connected machine. Package downloads already use your npm proxy and .npmrcUse it in CI and hooks
check state and check setup exit 1 on findings, so a CI step or a pre-commit hook fails on them without any parsing. Install the package as a devDependency so the version is pinned.
A GitHub Actions job:
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- name: Check AdapTable setup
run: npx adaptable check setup
- name: Check AdapTable Initial State
run: npx adaptable check state src/adaptableOptions.ts --columns src/columnDefs.tsA pre-commit hook (for example .husky/pre-commit):
npx adaptable check state src/adaptableOptions.ts --columns src/columnDefs.ts --quiet- On an AdapTable 24+ project the checks use the installed package and need no download
- On a 21–23 project the checks also need a 24 package as the engine. If the runner has no registry access, run
npx adaptable cache add 24when the runner image is built --jsongives the envelope instead of Markdown, for a step that posts the issues as annotations
Command reference
Global options
Accepted before or after any command.
| Option | Description |
|---|---|
--cwd <dir> | Project folder; defaults to the current directory |
--major <n> | AdapTable major to assume instead of detecting it |
--framework <fw> | Framework to assume instead of detecting it (vanilla, react, angular, vue) |
--offline | Never touch the network; use caches and bundled snapshots |
--quiet | Markdown output without warnings and info issues |
--json | Print the response envelope as JSON |
--docs-host <url> | Docs host to read instead of the default one |
Exit codes
| Code | Meaning |
|---|---|
0 | ok / no findings |
1 | findings |
2 | usage |
3 | environment |
adaptable anonymise <file>
Replaces the values of a State, Options, Grid Info, columns or row-data JSON with shape-preserving placeholders — names, column ids, expressions and structure kept, licence keys and user names redacted, row data scrubbed — for a support case.
CLI only. Reads stdin when the file is -.
| Input | Type | Description |
|---|---|---|
<file> | string | JSON / JSONC / JSON5 to anonymise (a State, Options, DevTools output or rows), or a source file holding a State / Options literal; - reads stdin |
stdin (pass `-` as the file) | string | The input text itself (stdin); the CLI fills it for - |
--keep-keys | boolean | Keep the field names of row data (they are renamed field1, field2, … otherwise); values are scrubbed either way |
--out | string | Write the anonymised JSON to this file; never the input file |
adaptable check expression <expression>
Validates an AdapTableQL expression with the 24 engine: syntax, functions, kinds the module accepts, column references; exact rewrites for JavaScript-style operators and pre-24 syntax.
MCP tool check_expression. Reads stdin when the file is -.
| Input | Type | Description |
|---|---|---|
<expression>MCP: expression | string | The AdapTableQL expression; - reads a batch from stdin (one per line, or a JSON array) |
--moduleMCP: module | Alert · CalculatedColumn · ColumnFilter · Export · FlashingCell · FormatColumn · GridFilter · NamedQuery · PlusMinus · StyledColumn | Module the expression belongs to; applies its kinds and function availability |
--kindMCP: kind | boolean · scalar · aggregatedScalar · aggregatedBoolean | Expression kind; inferred from the module and the expression when omitted |
--columnsMCP: columns | string | Grid columns: a columnDefs JSON / source file or DevTools getColumns() output; enables column checks |
--columns-valueMCP: columnsValue | string[] | Grid columns as a value (MCP): ColDefs or DevTools getColumns() output |
--fileMCP: file | string | Batch: a JSON array of strings or { expression, module?, kind? } objects, or one expression per line |
stdin (pass `-` as the file)MCP: text | string | Batch text (stdin); the CLI fills it for - |
--expressionsMCP: expressions | object[] | Batch (MCP) |
adaptable migrate expression <expression>
Rewrites one pre-24 AdapTableQL expression to the target major's syntax with the library's own migration (brace aggregations, named operands, legacy observable rules) and validates the result.
MCP tool migrate_expression.
| Input | Type | Description |
|---|---|---|
<expression>MCP: expressionrequired | string | The AdapTableQL expression as written for the from major |
--fromMCP: from | integer | Major the expression was written for; defaults to the project's major |
--toMCP: to | integer | Target major; defaults to the engine's own major (the newest) |
--moduleMCP: module | Alert · CalculatedColumn · ColumnFilter · Export · FlashingCell · FormatColumn · GridFilter · NamedQuery · PlusMinus · StyledColumn | Module the expression belongs to; picks the kinds tried and the validation rules |
--kindMCP: kind | boolean · scalar · aggregatedScalar · aggregatedBoolean | Expression kind; inferred from the module and the expression when omitted (SUM([x]) is an aggregation only in the aggregated kinds) |
--columnsMCP: columns | string | Grid columns for the validation: a columnDefs JSON / source file or DevTools getColumns() output |
--columns-valueMCP: columnsValue | string[] | Grid columns as a value (MCP): ColDefs or DevTools getColumns() output |
adaptable aql functions
Lists the AdapTableQL functions, aggregations, observable functions and clauses the engine accepts, with signatures, examples and docs slugs; filter by group, module or text.
MCP tool list_expression_functions.
| Input | Type | Description |
|---|---|---|
--groupMCP: group | scalar · aggregation · observable · clause | Only this group |
--moduleMCP: module | Alert · CalculatedColumn · ColumnFilter · Export · FlashingCell · FormatColumn · GridFilter · NamedQuery · PlusMinus · StyledColumn | Only the functions usable in this module’s expressions |
--queryMCP: query | string | Case-insensitive match on name, description and category |
adaptable changes
Lists the changes between two AdapTable majors from the release-note records; with --repo keeps the ones the project's code hits (file:line) and the ones that always apply.
MCP tool list_changes.
| Input | Type | Description |
|---|---|---|
--fromMCP: from | integer | Major the project is on; defaults to the detected one |
--toMCP: to | integer | Target major; defaults to the newest the manifest knows |
--repoMCP: repo | string | Project folder to search for each record's tokens (CLI) |
--projectsMCP: projects | string[] | More project folders to search, e.g. workspace members (CLI) |
--allMCP: all | boolean | With a search, keep every record rather than only the hit and always-on ones |
--with-docsMCP: withDocs | boolean | Inline each kept record's release-note section (needs the docs host; CLI) |
adaptable compat
AG Grid pairing, wrapper packages and environment requirements for an AdapTable major, from the docs manifest.
MCP tool get_compatibility.
| Input | Type | Description |
|---|---|---|
--adaptableMCP: adaptable | integer | AdapTable major; defaults to the detected one, else the latest |
--ag-gridMCP: agGrid | integer | AG Grid major to check against the pairing |
--frameworkMCP: framework | vanilla · react · angular · vue | Return only this framework’s wrapper |
adaptable detect
Detects the AdapTable projects at or below the folder: versions, framework, AG Grid, source layout hints.
MCP tool detect_environment (stdio server only).
| Input | Type | Description |
|---|---|---|
--all-projectsMCP: allProjects | boolean | Describe every project found instead of requiring a single one |
adaptable convert coldefs <file>
Turns AG Grid columnDefs into an AdapTable Layout (order, hidden columns, sizing, pinning, sorts, row groups, aggregations, pivots), lists the ColDef properties to remove with file:line, and the cellStyle / valueFormatter / valueGetter / cellRenderer snippets to re-express as Format, Calculated, Styled or Action Columns. The Layout is run through check state first.
CLI only. Reads stdin when the file is -.
| Input | Type | Description |
|---|---|---|
<file> | string | columnDefs input: a JSON / JSONC / JSON5 array, or a .ts/.tsx/.js/.jsx/.vue file holding the literal; - reads stdin |
stdin (pass `-` as the file) | string | The input text itself (stdin); the CLI fills it for - |
--layout-name | string | Name of the Layout to emit |
--out | string | Write the Layout (JSON) to this file; never the input file |
adaptable docs list
Lists the docs pages for the project’s AdapTable version, grouped by sidebar section: the feature index.
CLI only.
| Input | Type | Description |
|---|---|---|
--section | string | Only this sidebar section (or category) |
--area | handbook · dev-guide · reference · tutorial · support · all | handbook | dev-guide | reference | tutorial | support | all; reference pages are listed only when asked for |
adaptable docs search <query>
Searches the docs for the project’s AdapTable version and framework; returns matching sections with slugs and URLs.
MCP tool search_docs.
| Input | Type | Description |
|---|---|---|
<query>MCP: queryrequired | string | What to look for: exact API names (LayoutApi, GROUP_BY) or a plain question |
--limitMCP: limit | integer | Results to return (default 8) |
--areaMCP: area | handbook · dev-guide · reference · tutorial · support · all | Restrict to one docs area; release notes are searched only with support or all |
--frameworkMCP: framework | vanilla · react · angular · vue | Defaults to the detected framework |
adaptable docs get <pages...>
Reads docs pages as Markdown for the project’s version and framework; one section with --section, demo code trimmed unless --full.
MCP tool get_doc.
| Input | Type | Description |
|---|---|---|
<pages>MCP: pagesrequired | string[] | Slugs (handbook-layouts), reference names (LayoutApi), routes (/docs/…) or docs URLs |
--frameworkMCP: framework | vanilla · react · angular · vue | Defaults to the detected framework |
--sectionMCP: section | string | Return only the section under this heading |
--max-tokensMCP: maxTokens | integer | Cut at a heading boundary above this many tokens (default 8000) |
--fullMCP: full | boolean | Inline demo code and never truncate |
adaptable docs demos <page>
Lists the demos embedded in a docs page, with the files each demo owns.
CLI only.
| Input | Type | Description |
|---|---|---|
<page>required | string | Slug, route or URL of the page |
adaptable docs demo <name>
Returns one demo’s own files (adaptableOptions.ts by default; --files for others). Template files are never returned.
MCP tool get_demo.
| Input | Type | Description |
|---|---|---|
<name>MCP: namerequired | string | Demo name, as listed by docs demos or in the page |
--filesMCP: files | string[] | File names or paths to return, e.g. columnDefs.ts rowData.ts |
adaptable migrate state <file>
Migrates Adaptable State between majors with the library's own migration engine; reports the log, what the target major does not know (leftovers) and the check state result for the target.
MCP tool migrate_state. Reads stdin when the file is -.
| Input | Type | Description |
|---|---|---|
<file>MCP: file | string | State input: JSON / JSONC / JSON5, or a source file holding the literal; - reads stdin |
stdin (pass `-` as the file)MCP: text | string | The input text itself (stdin); the CLI fills it for - |
--stateMCP: state | string | object | The State as an object or JSON string (MCP; for a running grid, DevTools getPersistentState()) |
--fromMCP: from | integer | Major the State was written for; defaults to the project's major |
--toMCP: to | integer | Target major; defaults to the engine's own major (the newest) |
--outMCP: out | string | Write the migrated State (JSON) to this file; never the input file |
--columnsMCP: columns | string | Grid columns for the post-migration check: a columnDefs JSON / source file, or DevTools getColumns() output |
--columns-valueMCP: columnsValue | string[] | The columns as a value (MCP) |
--kindMCP: kind | initial · persistent | initial for an initialState literal, persistent for a persisted State |
adaptable cache add <spec>
Downloads a @adaptabletools/adaptable version into the cache so checks and migrations for that major work offline.
CLI only.
| Input | Type | Description |
|---|---|---|
<spec>required | string | A major (23), an exact version (23.1.1) or a dist-tag (canary) |
adaptable cache list
Shows cached library packages, bundled entries and docs corpora with sizes and ages.
CLI only.
No inputs beyond the global options.
adaptable cache clear
Removes cached docs corpora and/or library packages (with their entry bundles); everything when no flag is given.
CLI only.
| Input | Type | Description |
|---|---|---|
--docs | boolean | Remove docs corpora only |
--pkgs | boolean | Remove packages and entry bundles only |
adaptable scaffold
Overlays the AdapTable files the docs demos run on onto a creator project (Vite or Angular CLI): columns, row data and an Initial State inferred from a CSV / JSON / XLSX file, dependencies pinned from the docs manifest, an AGENTS.md snippet. Never overwrites without --force.
CLI only.
| Input | Type | Description |
|---|---|---|
--out | string | The project folder — a fresh creator project or an existing app with a package.json; defaults to the current folder |
--data | string | CSV, TSV, JSON or XLSX file to infer the columns from; its rows are embedded in rowData.ts |
--sample | string | A JSON array (e.g. fetched from a REST endpoint) to infer the columns from |
--source-url | string | rowData.ts fetches the rows from this URL at run time (columns from --sample or --data) |
--row-model | client · server | AG Grid row model; server writes a serverSideDatasource stub over the embedded rows |
--primary-key | string | Column to use as primaryKey instead of the best unique candidate |
--field-names | camelCase · keep | Column names with spaces: camelCase makes them camelCase fields (Order Cost → orderCost, header kept); keep uses them as they are |
--dry-run | boolean | Print the creator command and the file plan; write nothing |
--force | boolean | Overwrite existing files (the creator's entry component always exists) |
adaptable check setup
Audits how AdapTable is wired into a project: stylesheet, required options, licence literal, version skew, AG Grid modules, column typing, direct grid use, ColDef ownership, React refs, ready hook, and the Options shape against the major’s types.
MCP tool check_setup (stdio server only).
| Input | Type | Description |
|---|---|---|
--projectMCP: project | string | Project folder (its package.json) when the cwd holds several or none |
adaptable check state <file>
Validates Adaptable State (a JSON file or the literal in a .ts/.tsx/.js/.jsx/.vue file) against the checked major: shape, semantics, column references and AdapTableQL.
MCP tool check_state. Reads stdin when the file is -.
| Input | Type | Description |
|---|---|---|
<file>MCP: file | string | State input: JSON / JSONC / JSON5, or a source file holding the literal; - reads stdin |
stdin (pass `-` as the file)MCP: text | string | The input text itself (stdin); the CLI fills it for - |
--stateMCP: state | string | object | The State as an object or JSON string (MCP; for a running grid, DevTools getPersistentState()) |
--columnsMCP: columns | string | Grid columns: a columnDefs JSON / source file, or DevTools getColumns() output |
--columns-valueMCP: columnsValue | string[] | The columns as a value (MCP) |
--kindMCP: kind | initial · persistent | initial for an initialState literal, persistent for a persisted State (every section required) |