@svgrid/mcp 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +40 -40
- package/README.md +2 -2
- package/dist/core-tools.d.ts +2 -2
- package/dist/core-tools.js +13 -3
- package/dist/data.d.ts +6 -0
- package/dist/data.js +2124 -622
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +1 -1
- package/dist/validate.d.ts +9 -0
- package/dist/validate.js +246 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 jQWidgets Ltd
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
------------------------------------------------------------------------
|
|
24
|
-
|
|
25
|
-
NOTE ON BUNDLED CONTENT
|
|
26
|
-
|
|
27
|
-
This package embeds SvGrid documentation, API reference, and example sources
|
|
28
|
-
so the server can answer questions offline. That material is Copyright (c)
|
|
29
|
-
2026 jQWidgets Ltd and is also published openly at https://svgrid.com/docs/,
|
|
30
|
-
https://svgrid.com/llms.txt and https://svgrid.com/llms-full.txt for exactly
|
|
31
|
-
this purpose. The MIT grant above covers it.
|
|
32
|
-
|
|
33
|
-
SvGrid(TM) and sv-grid(TM) are trademarks of jQWidgets Ltd. This license
|
|
34
|
-
covers the source code and bundled content only; it grants no rights to the
|
|
35
|
-
SvGrid / sv-grid names or logos.
|
|
36
|
-
|
|
37
|
-
Some tools exposed by this server generate SvGrid Studio projects. Studio
|
|
38
|
-
itself is a commercial product (https://svgrid.com/pricing) and needs a
|
|
39
|
-
license key to use in production, but this server, and asking it questions,
|
|
40
|
-
are free.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 jQWidgets Ltd
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
NOTE ON BUNDLED CONTENT
|
|
26
|
+
|
|
27
|
+
This package embeds SvGrid documentation, API reference, and example sources
|
|
28
|
+
so the server can answer questions offline. That material is Copyright (c)
|
|
29
|
+
2026 jQWidgets Ltd and is also published openly at https://svgrid.com/docs/,
|
|
30
|
+
https://svgrid.com/llms.txt and https://svgrid.com/llms-full.txt for exactly
|
|
31
|
+
this purpose. The MIT grant above covers it.
|
|
32
|
+
|
|
33
|
+
SvGrid(TM) and sv-grid(TM) are trademarks of jQWidgets Ltd. This license
|
|
34
|
+
covers the source code and bundled content only; it grants no rights to the
|
|
35
|
+
SvGrid / sv-grid names or logos.
|
|
36
|
+
|
|
37
|
+
Some tools exposed by this server generate SvGrid Studio projects. Studio
|
|
38
|
+
itself is a commercial product (https://svgrid.com/pricing) and needs a
|
|
39
|
+
license key to use in production, but this server, and asking it questions,
|
|
40
|
+
are free.
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ tools, 79% of them Studio tools most sessions never call once.
|
|
|
32
32
|
|
|
33
33
|
| Tool | Purpose |
|
|
34
34
|
| --- | --- |
|
|
35
|
-
| `svgrid_search` | Search the docs, all
|
|
35
|
+
| `svgrid_search` | Search the docs, all 400+ demos and the API surface **in one call**. No arguments returns an index. |
|
|
36
36
|
| `svgrid_get` | Read one thing in full: a doc slug, a demo id, or `api`. |
|
|
37
37
|
| `svgrid_check_code` | **Verify** a file against the real API surface + the Svelte compiler. |
|
|
38
38
|
| `svgrid_scaffold` | Studio: turn a Drizzle schema, sample rows or an `EntitySchema` into runnable SvelteKit files. |
|
|
@@ -90,7 +90,7 @@ What it checks:
|
|
|
90
90
|
"no errors" is never mistaken for "this compiles".
|
|
91
91
|
|
|
92
92
|
It is tuned to shut up when the code is right: it reports **nothing** across all
|
|
93
|
-
|
|
93
|
+
400+ demos in this repo, which is what a CI test asserts. A verifier that cries
|
|
94
94
|
wolf is worse than none, because a model will happily "fix" working code.
|
|
95
95
|
|
|
96
96
|
### Studio: drive the app model (agent co-designer)
|
package/dist/core-tools.d.ts
CHANGED
|
@@ -53,11 +53,11 @@ export declare const CORE_TOOLS: readonly [{
|
|
|
53
53
|
readonly properties: {
|
|
54
54
|
readonly ref: {
|
|
55
55
|
readonly type: "string";
|
|
56
|
-
readonly description: "A doc slug, a demo id, or \"
|
|
56
|
+
readonly description: "A doc slug, a demo id, \"api\", or a schema id such as \"chart-spec\" (or \"chart spec schema\"). The kind is inferred; pass `kind` to force it.";
|
|
57
57
|
};
|
|
58
58
|
readonly kind: {
|
|
59
59
|
readonly type: "string";
|
|
60
|
-
readonly enum: readonly ["auto", "doc", "example", "api"];
|
|
60
|
+
readonly enum: readonly ["auto", "doc", "example", "api", "schema"];
|
|
61
61
|
readonly description: "Override the inferred kind. Default \"auto\".";
|
|
62
62
|
readonly default: "auto";
|
|
63
63
|
};
|
package/dist/core-tools.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* response is capped and paged, because returning all 375 examples cost ~31k
|
|
14
14
|
* tokens on the call the old description invited a model to start with.
|
|
15
15
|
*/
|
|
16
|
-
import { apiReference, apiSurface, docs, examples } from './data.js';
|
|
16
|
+
import { apiReference, apiSurface, docs, examples, schemas } from './data.js';
|
|
17
17
|
import { meaningfulTerms, rankDocs } from './search.js';
|
|
18
18
|
const DOCS_FOOTER = '\n\nSvGrid reference: full docs & 375 live demos at https://svgrid.com/docs';
|
|
19
19
|
const text = (body) => ({ content: [{ type: 'text', text: body }] });
|
|
@@ -107,11 +107,11 @@ export const CORE_TOOLS = [
|
|
|
107
107
|
properties: {
|
|
108
108
|
ref: {
|
|
109
109
|
type: 'string',
|
|
110
|
-
description: 'A doc slug, a demo id, or "
|
|
110
|
+
description: 'A doc slug, a demo id, "api", or a schema id such as "chart-spec" (or "chart spec schema"). The kind is inferred; pass `kind` to force it.',
|
|
111
111
|
},
|
|
112
112
|
kind: {
|
|
113
113
|
type: 'string',
|
|
114
|
-
enum: ['auto', 'doc', 'example', 'api'],
|
|
114
|
+
enum: ['auto', 'doc', 'example', 'api', 'schema'],
|
|
115
115
|
description: 'Override the inferred kind. Default "auto".',
|
|
116
116
|
default: 'auto',
|
|
117
117
|
},
|
|
@@ -340,6 +340,16 @@ function get(args) {
|
|
|
340
340
|
}
|
|
341
341
|
return withDocs(json(apiReference));
|
|
342
342
|
}
|
|
343
|
+
// A JSON schema by id ("chart-spec"), or by asking for "the chart spec
|
|
344
|
+
// schema" in words: every schema id's words must appear in the request.
|
|
345
|
+
if (kind === 'schema' || (kind === 'auto' && /schema/i.test(ref))) {
|
|
346
|
+
const words = ref.toLowerCase().replace(/schema/g, ' ').split(/[^a-z0-9]+/).filter(Boolean);
|
|
347
|
+
const hit = schemas.find((s) => s.id === ref) ?? schemas.find((s) => s.id.split('-').every((w) => words.includes(w)));
|
|
348
|
+
if (hit)
|
|
349
|
+
return text(clip(hit.json));
|
|
350
|
+
if (kind === 'schema')
|
|
351
|
+
return fail(`No schema "${ref}". Available: ${schemas.map((s) => s.id).join(', ')}.`);
|
|
352
|
+
}
|
|
343
353
|
if (kind === 'doc' || kind === 'auto') {
|
|
344
354
|
const doc = docs.find((d) => d.slug === ref);
|
|
345
355
|
if (doc)
|
package/dist/data.d.ts
CHANGED
|
@@ -29,3 +29,9 @@ export declare const apiReference: {
|
|
|
29
29
|
readonly utilities: readonly ["getKeyboardIntent", "getNextActiveCell", "parseEditorValue", "applyExcelFilter", "formatNumericWithConfig", "resolveDatePattern"];
|
|
30
30
|
};
|
|
31
31
|
export declare const apiSurface: ApiSurface;
|
|
32
|
+
/** The JSON schemas under https://svgrid.com/schemas/, by id. */
|
|
33
|
+
export declare const schemas: ReadonlyArray<{
|
|
34
|
+
id: string;
|
|
35
|
+
describes: string;
|
|
36
|
+
json: string;
|
|
37
|
+
}>;
|