You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MCP `coursecode_lint` tool runs the build linter (config validation, CSS class verification, structure checks). It does NOT include runtime errors. For runtime errors and contrast warnings, use `coursecode_errors` (lightweight — just errors and console logs) or `coursecode_state` (full state snapshot including errors).
682
+
The MCP `coursecode_lint` tool runs the static/build-time linter (config validation, CSS class verification, structure checks). It does **not** inspect the running preview and does **not** include live runtime, browser console, or Vite build-watch diagnostics.
683
+
684
+
Use:
685
+
- `coursecode_lint` for static preflight validation after source/config edits
686
+
- `coursecode_errors` for the live "what is broken right now?" preview rollup
687
+
- `coursecode_state` when you also need current slide, TOC, engagement, LMS state, and diagnostics
683
688
684
689
### Shared Rules (`lib/validation-rules.js`)
685
690
@@ -861,16 +866,18 @@ The MCP server runs a **persistent headless Chrome** internally via `puppeteer-c
861
866
862
867
### Preview Server Ownership
863
868
864
-
The MCP does **not** start or manage the preview server. The preview must be running before using runtime tools:
869
+
The MCP does **not** start or manage the preview server. Runtime tools connect to an already-running preview server.
865
870
866
-
- **Human**: run `coursecode preview` (or `npm run preview`) in a terminal
867
-
- **AI agent**: use your terminal/command execution tool to run `npm run preview`
871
+
- If preview is already running for the current project, use it. Do **not** start a second preview server.
872
+
- If preview is not running, start it in a terminal with `coursecode preview`.
873
+
- For framework development from this repo, use `npm run preview`.
874
+
- AI agents may start preview only via their terminal/command execution tool, and only after confirming preview is not already running or after a runtime MCP tool reports that preview is not running.
868
875
869
876
If the preview is not running, runtime tools fail fast with a clear error message.
870
877
871
878
### Setup
872
879
873
-
1. Start the preview server externally (see above)
880
+
1. Make sure the preview server is running externally (see above)
874
881
2. Add to IDE MCP config:
875
882
876
883
```json
@@ -887,8 +894,8 @@ If the preview is not running, runtime tools fail fast with a clear error messag
| `coursecode_errors` | Errors + console logs only | `{errors, consoleLogs, count, clean}` — same error sources as `coursecode_state`, without the state payload |
| `coursecode_errors` | Live diagnostic rollup only | `{build, runtime, framework, console, issues, errors, count, clean}` — same diagnostic sources as `coursecode_state`, without the state payload |
892
899
| `coursecode_navigate` | Go to slide by ID | `{slide, interactions, engagement, accessibility}` |
|`coursecode_component_catalog`| Browse available UI components (tabs, accordion, cards, etc.) |
302
303
|`coursecode_interaction_catalog`| Browse available interaction types (multiple choice, drag-drop, etc.) |
303
304
|`coursecode_css_catalog`| Browse available CSS classes by category |
@@ -306,7 +307,7 @@ Once connected, your AI assistant gains these capabilities:
306
307
|`coursecode_workflow_status`| Get guidance on what to do next based on your project's current state |
307
308
|`coursecode_build`| Build the course for LMS deployment |
308
309
309
-
> **Note:** The preview server must be running before using runtime tools like `coursecode_state`, `coursecode_screenshot`, or `coursecode_navigate`. Start it with `coursecode preview` in a terminal.
310
+
> **Note:** The preview server must be running before using runtime tools like `coursecode_state`, `coursecode_errors`, `coursecode_screenshot`, or `coursecode_navigate`. If preview is not already running for this project, start it with `coursecode preview` in a terminal. Do not start a second preview server if one is already running.
Use this first to understand the course state before taking actions.
37
-
For error checking only (after file edits), prefer coursecode_errors — same error sources, smaller payload.
40
+
For checking what is broken after file edits, prefer coursecode_errors — same live diagnostic sources, smaller payload.
38
41
Requires preview server to be running.`,
39
42
inputSchema: {
40
43
type: 'object',
@@ -48,15 +51,23 @@ Requires preview server to be running.`,
48
51
},
49
52
{
50
53
name: 'coursecode_errors',
51
-
description: `Get runtime errors and warnings from the live preview. Uses the same error sources as coursecode_state (preview server errors + browser console) but without the heavyweight state payload.
54
+
description: `Get all current live preview diagnostics without the heavyweight course state payload.
55
+
56
+
This is the primary "what is broken right now?" tool after edits. It aggregates:
57
+
- build: Vite/build-watch errors and warnings from the running preview server
58
+
- runtime: stub LMS/debug-panel errors and warnings
59
+
- framework: CourseCode logger warnings/errors
60
+
- console: browser console warnings/errors
61
+
62
+
This is different from coursecode_lint, which is a static/build-time linter and does not inspect the running preview.
52
63
53
64
Returns:
54
-
- errors: [{type, message, hint?, isWarning?}] — preview server errors and warnings
Use after making file changes to check for breakage without the overhead of coursecode_state.
60
71
Requires preview server to be running.`,
61
72
inputSchema: {
62
73
type: 'object',
@@ -378,16 +389,16 @@ Use to discover available interactions before creating assessments.`,
378
389
},
379
390
{
380
391
name: 'coursecode_lint',
381
-
description: `Run the course linter and get structured results.
392
+
description: `Run the static course linter and get structured results.
382
393
383
-
Always runs build-time lint (config, CSS classes, structure). Does NOT include runtime errors — use coursecode_state for runtime errors and contrast warnings when the preview server is running.
394
+
This is a preflight/static validation tool for config, source structure, CSS class names, and schema rules. It does NOT inspect the running preview and does NOT include live runtime, browser console, or Vite build-watch diagnostics. Use coursecode_errors for the live "what is broken right now?" view when preview is running.
0 commit comments