SvGrid
v3.0.1Checks AI-written SvGrid code against the real API, plus version-pinned Svelte 5 grid docs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
svgrid_search Search SvGrid
Search SvGrid docs, example demos and the API surface in ONE call. Start here for any "how do I ..." question - it covers all three, so you do not have to guess which one holds the answer. Call with no arguments for an index of doc sections, demo categories and API groups. Returns ids/slugs you can pass to svgrid_get.
| Parameter | Type | Description |
|---|---|---|
category | string | Restrict demos to one category, exactly, e.g. "Kanban". Call with no arguments to see the categories. |
detail | string | "concise" (default) returns titles plus a short excerpt. "full" returns the matching doc excerpts at length - more tokens, fewer follow-up calls. |
kind | string | Restrict the search. Default "all". |
limit | number | Max results per corpus. Default 10, max 50. |
query | string | What you are trying to do, e.g. "pin a column", "server side pagination", "kanban swimlanes". Omit for the index. |
section | string | Restrict docs to one section, exactly, e.g. "Help". Call with no arguments to see the sections. |
svgrid_get Read a doc or demo
Fetch one thing in full by reference: a doc slug ("help/columns/column-definitions"), a demo id ("11-stock-market"), or "api" for the curated API reference. Use svgrid_search first to find the reference.
| Parameter | Type | Description |
|---|---|---|
ref * | string | A doc slug, a demo id, or "api". The kind is inferred; pass `kind` to force it. |
detail | string | "full" (default) returns the whole thing; "concise" truncates long content. |
kind | string | Override the inferred kind. Default "auto". |
svgrid_check_code Check and fix SvGrid code
Verify SvGrid code BEFORE handing it to the user. Checks the source against the real exported surface for this version - props, column options, api methods, imports - and compiles it. Reports unknown props, wrong imports and compile errors with the line to fix, AND returns a corrected copy of the file (`fixed`) whenever the correction is exact, with `applied` listing every edit. Nothing else in this server prevents a confidently wrong answer; call it on every component you write, then use `fixed` rather than re-deriving the edits.
| Parameter | Type | Description |
|---|---|---|
source * | string | The file contents to check. |
filename | string | Optional filename, used in messages, e.g. "Grid.svelte". |
svgrid_preview Preview a grid
Render a REAL, interactive SvGrid in the conversation - sortable, filterable, scrollable - from columns and rows you pass, or from a demo id. Use it to show the user what a grid will look like before they build it, and after svgrid_check_code to demonstrate the result. In clients without UI support it returns a text summary instead, so it is always safe to call.
| Parameter | Type | Description |
|---|---|---|
columns | array | Column definitions, e.g. [{ "field": "name", "header": "Name", "width": 160 }]. Required unless `demo` is set. |
data | array | Rows to display. Required unless `demo` is set. Keep it under a few hundred for a preview. |
demo | string | Preview a shipped demo instead, by id (e.g. "11-stock-market"). Its source is returned as text; find ids with svgrid_search. |
filterable | boolean | Filtering. Default true. |
groupBy | array | Group by these column ids. |
pageable | boolean | Pagination footer. |
sortable | boolean | Sortable headers. Default true. |
title | string | Caption shown above the grid. |
svgrid_scaffold Scaffold a CRUD screen
SvGrid Studio (commercial): turn a data source into runnable SvelteKit files - the $lib schema module, a +server.ts API route, and a +page.svelte with SvGrid + SvGridEditPanel. Accepts a Drizzle schema, sample JSON rows, or an EntitySchema you already have; infers the schema and generates in one call. Set schemaOnly to stop after inference. Generated bodies carry svgrid:managed markers so regeneration preserves your edits outside them.
| Parameter | Type | Description |
|---|---|---|
from * | string | "drizzle" a schema file, "json" sample rows, or "schema" an EntitySchema. |
apiRoute | string | API route, e.g. "/api/people". |
drizzle | string | For from:"drizzle": the schema source. |
name | string | For from:"json": the entity name. |
route | string | Page route, e.g. "/people". |
rows | array | For from:"json": a non-empty array of sample rows. |
schema | object | For from:"schema": an EntitySchema. |
schemaOnly | boolean | Return the inferred EntitySchema without generating files. |