mathematica-wstp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MATHEMATICA_WSTP_LIB | No | Override to the WSTP library path. | |
| MATHEMATICA_WSTP_KERNEL | No | Override to the kernel binary location. | |
| MATHEMATICA_WSTP_INSTALL | No | Override to the Mathematica installation directory. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| evaluateA | Evaluate Wolfram Language code in the persistent kernel. State carries between calls. On timeout the evaluation is ABORTED but the kernel and all its definitions survive, so you can retry a smaller piece. |
| abortA | Interrupt the evaluation the kernel is running right now. The kernel survives with all state intact. Use this instead of kernel(action='restart') for a runaway computation -- restart destroys every definition. |
| kernelA | Kernel administration. actions: state | restart | abort | subkernels | reap. 'restart' clears ALL definitions and closes subkernels properly; prefer abort() for a merely slow evaluation. |
| statusB | Server, kernel and installation status, plus any orphaned kernels. |
| notebooksC | Notebook sessions over .nb files on disk. actions: open(path) | create(title,path) | list | info | save(path) | close. Cells are evaluated from their original stored boxes, so nothing is lost in translation. |
| cellsB | List or read cells of an open notebook. Use style to filter (e.g. 'Input'). Cell indices are positions in the document and are what evaluate_cells takes. |
| evaluate_cellsA | Evaluate notebook cells in document order, in the persistent kernel, with state carrying between them. Give either index, or from_+to for a range. A long replay can be interrupted with abort(). Large ranges come back summarised (counts, failures, messages, slowest cells); set detail='full' to force per-cell output, or 'summary' to force the compact form. |
| edit_cellsC | Insert or delete a cell. actions: write(content,style,position) | delete(index). |
| renderA | Render with the Wolfram front end, headlessly: typeset an expression, rasterise a notebook cell, or export a notebook. actions: expression(code) | cell(index) | export(path) | available. This RENDERS only -- it never evaluates through the front end; use evaluate() for that. Export renders what is visible, so collapsed cell groups export collapsed; pass open_groups=True for the whole document. |
| varsB | Inspect or change the kernel's Global` symbols. actions: list | get(name) | set(name,value) | clear(name) | clear_all. Use this to see what a notebook replay actually defined, or to clear one symbol without restarting. |
| batchA | Run several of this server's tools in one round trip. ops: [{"tool": "evaluate", "args": {"code": "1+1"}}, ...]. Stops at the first failure unless stop_on_error is false. Useful for a fixed setup sequence; not a substitute for one compound Wolfram expression. |
| read_notebook_fileA | Read a .nb file from disk without opening a kernel session for it. modes: outline (headings only) | markdown | wolfram (code cells only) | plain | json. Use notebooks(action='open') instead when you intend to evaluate anything. |
| verify_derivationB | Check a chain of expressions step by step: each step must equal the one before it. Returns the first step that does not follow. steps are Wolfram expressions as strings, in order. |
| guideB | Usage notes for this server. topics: workflow | abort | errors | notebooks | performance. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Most tools map cleanly to different resources or actions: kernel evaluation, notebook/cell access, rendering, variable inspection, and batch orchestration. There are a couple of overlapping boundaries—abort vs kernel(action='abort') and status vs kernel(state)—but the descriptions generally clarify which one is intended.
Names are readable and mostly action-oriented, but the convention is mixed: bare verbs (evaluate, abort, render), bare nouns (kernel, status, notebooks, cells, vars), and underscore compounds (evaluate_cells, read_notebook_file, verify_derivation). It is not chaotic, but there is no single predictable verb_noun pattern.
Fourteen tools is within the well-scoped range and each tool addresses a genuinely distinct part of the server's purpose: persistent evaluation, kernel admin, notebook sessions, cell operations, rendering, symbol inspection, batching, and guidance. The count is substantial but not padded.
The surface covers the main lifecycle for both the persistent kernel (evaluate, abort, restart, vars) and notebooks (open/create/list/save/close, read cells, write/delete cells, evaluate cells), plus rendering and derivation verification. There are no obvious dead ends or missing core operations for this domain.