Document new MCP tools in sx-tools page and CLAUDE.md

- Add Debugging & analysis section to tool catalogue (sx_trace, sx_deps,
  sx_build_manifest)
- Update harness entry to mention multi-file and setup support
- Update tool count from 35+ to 40+
- Add tool table to CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 12:12:03 +00:00
parent 3ac8cb48f3
commit c04f3ab7ce
2 changed files with 17 additions and 5 deletions

View File

@@ -102,7 +102,7 @@ Read the error carefully. Fragment errors give the parse failure in the new sour
| Tool | Purpose |
|------|---------|
| `sx_harness_eval` | Evaluate SX in a sandboxed harness with mock IO. Returns result + IO trace. Params: `expr`, optional `mock` (SX dict of overrides), optional `file` (load definitions) |
| `sx_harness_eval` | Evaluate SX in a sandboxed harness with mock IO. Returns result + IO trace. Params: `expr`, optional `mock`, `file`, `files` (array), `setup` (SX expr run before eval) |
**Analysis:**
@@ -112,6 +112,14 @@ Read the error carefully. Fragment errors give the parse failure in the new sour
| `sx_doc_gen` | Generate component docs from signatures across a directory |
| `sx_playwright` | Run Playwright browser tests for the SX docs site |
**Debugging & analysis:**
| Tool | Purpose |
|------|---------|
| `sx_trace` | Step-through CEK evaluation showing symbol lookups, function calls, returns. Params: `expr`, optional `file`, `max_steps` |
| `sx_deps` | Dependency analysis — shows all free symbols in a component and where they're defined. Params: `file`, optional `name`, `dir` |
| `sx_build_manifest` | Show build contents: adapters, spec modules, primitives. Params: optional `target` ("js" or "ocaml") |
## Deployment
- **Do NOT push** until explicitly told to. Pushes reload code to dev automatically.

View File

@@ -49,7 +49,7 @@
:title "Tool catalogue"
:id "catalogue"
(p
"The SX tree MCP server provides 35+ tools across 8 categories. Every tool operates on the parsed tree, not raw text.")
"The SX tree MCP server provides 40+ tools across 9 categories. Every tool operates on the parsed tree, not raw text.")
(h4
:class "font-semibold text-stone-700 mt-6 mb-2"
"Comprehension (7 tools)")
@@ -273,8 +273,9 @@
:src ";; What changed on this branch?\nsx_diff_branch\n;; → adapter-dom.sx: ADDED [3] (define *memo-cache* ...)\n;; → adapter-dom.sx: ADDED [4] (define contains-deref? ...)\n;; → boot.sx: CHANGED [12,4,2,2,2,2,3,3,1,0] cek-try wrapper")
(h4
:class "font-semibold text-stone-700 mt-6 mb-2"
"Test harness (1 tool)")
(p "Sandboxed evaluation with mock IO.")
"Test harness (1 tool, multi-file)")
(p
"Sandboxed evaluation with mock IO. Supports loading multiple files and setup expressions.")
(table
:class "min-w-full text-sm mb-6"
(thead
@@ -289,7 +290,7 @@
(td :class "pr-4 py-1 font-mono text-xs" "sx_harness_eval")
(td
:class "py-1"
"Evaluate SX with mock IO platform. Returns result + IO trace."))))
"Evaluate SX with mock IO. Load multiple files via files param. Setup expressions run before eval."))))
(~docs/code
:src ";; Test a component's IO behavior\nsx_harness_eval\n expr=\"(fetch-data \\\"users\\\" \\\"all\\\")\"\n mock=\"{:fetch (fn (url opts) {:status 200 :body \\\"[]\\\"})}\"")
(h4 :class "font-semibold text-stone-700 mt-6 mb-2" "Analysis (3 tools)")
@@ -1007,3 +1008,6 @@
" to restructure — would be a tree operation. No character-counting, no mental stack simulation, no risk of introducing a second paren error while fixing the first."))
(p
"The gap between intended tree and actual tree stops being invisible. Claude sees trees, edits trees, and the brackets take care of themselves."))))
(~docs/code
:src ";; Run Playwright tests\nsx_playwright spec=\"demo-interactions.spec.js\"")