lewm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEWM_PYTHON | No | Python executable to use for model subprocess | python3 |
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 | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| load_modelA | Load the ViT world-model encoder into memory. Call this before other tools for faster inference. Defaults to a tiny pretrained ViT (hidden_size=192, 3 layers, patch_size=16). |
| get_model_statusA | Check whether the model is loaded, which checkpoint is active, parameter count, and which device (mps/cuda/cpu) is in use. |
| analyze_screenshotB | Encode a screenshot through the ViT encoder and optionally compute a surprise score vs a previous frame. Returns embedding vector, cosine similarity, MSE, and anomaly flag. |
| compare_statesA | Compare two screenshots in embedding space. Useful for 'does this screen match what I expected?' Returns cosine similarity, MSE, surprise score, and match/anomaly flags. |
| analyze_videoA | Extract frames from a video file, run them through the ViT encoder, and compute frame-to-frame surprise scores. Returns timestamp array, surprise scores, z-score normalized scores, anomaly windows (>2σ spikes), and top N anomaly timestamps. |
| run_surprise_detectionA | Run full surprise detection pipeline on a directory of screenshots or a video file. Returns annotated timeline, list of frames exceeding threshold, and summary stats. |
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 6 tools
Some tools have overlapping purposes: analyze_screenshot with a previous frame and compare_states both compare two screenshots and return similar metrics. Similarly, analyze_video and run_surprise_detection both process videos and compute surprise scores, though run_surprise_detection is a higher-level pipeline.
All tool names follow a consistent verb_noun pattern (e.g., load_model, analyze_screenshot, get_model_status). The naming is predictable and easy to infer.
Six tools is a well-scoped count for a surprise-detection server. Each tool addresses a distinct part of the workflow (model management, single-image analysis, pairwise comparison, video analysis, full pipeline) without redundancy.
The server covers the core workflow: load model, check status, analyze images/videos, compare states, and run a full detection pipeline. Minor gaps exist, such as no explicit way to unload the model or customize the loaded checkpoint beyond defaults, but these are not critical.