scratchbook-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SCRATCHBOOK_DB | No | LanceDB directory | ~/.scratchbook/lancedb |
| SCRATCHBOOK_GAZE_DIR | No | Gaze boards directory | <db-dir>/../gaze |
| SCRATCHBOOK_EMBED_DIM | No | Vector dimension (must match model) | 1024 |
| SCRATCHBOOK_EMBED_URL | No | Ollama-style embed endpoint | http://localhost:11434/api/embed |
| SCRATCHBOOK_EMBED_BATCH | No | Texts per embed request | 16 |
| SCRATCHBOOK_EMBED_MODEL | No | Embedding model | bge-m3 |
| SCRATCHBOOK_MAX_FILE_KB | No | Skip files larger than this (KB) | 512 |
| SCRATCHBOOK_CHUNK_MAX_CHARS | No | Maximum chunk size in characters | 1600 |
| SCRATCHBOOK_CHUNK_MIN_CHARS | No | Minimum chunk size before a soft cut | 240 |
| SCRATCHBOOK_EMBED_CONCURRENCY | No | Parallel embed requests | 4 |
| SCRATCHBOOK_CHUNK_OVERLAP_LINES | No | Overlap when window-splitting (lines) | 8 |
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": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| scratchbook_indexA | Index or refresh a codebase into the scratchbook so it can be semantically searched. Incremental — only files changed since last run are re-read and re-embedded. Respects .gitignore (uses |
| scratchbook_searchA | Semantic search across a codebase's indexed code. Returns the most relevant code chunks with file:line locations, enclosing symbol and a snippet — across the whole repo, not just one directory (unlike grep). Use it to locate where a concept or behaviour lives before reading files. Ask in natural language ('where are TTS chunks cached', 'auth token verification'). The project must be indexed first. |
| scratchbook_outlineA | Structural map of a codebase (or a subtree / single file): each file's imports and top-level symbols with line numbers. Use it to grasp how a project is organised without reading every file. Provide |
| scratchbook_journalA | Write a dated work-note / diary entry into the scratchbook: what you're doing, a decision, a finding, or a suspected bug. Namespaced to a project (default) or 'global' for cross-project notes. Recall later with scratchbook_recall. Keep each note self-contained. |
| scratchbook_recallA | Search your past journal / work-notes by meaning. Use it to remember what you were doing, prior decisions, or issues you flagged. Scope to the current project, 'global', or all projects. |
| scratchbook_statusA | Scratchbook health and what's indexed: embedding-service status, the list of indexed projects with chunk / note counts, and detail for one project if given. |
| scratchbook_forgetA | Remove a project's indexed code chunks and file outlines from the scratchbook (journal notes are kept). Use to clean up or before a fresh full re-index. |
| scratchbook_gazeA | gaze-and-think: write the hard, tangled parts of a problem into a BOARD (a notebook), then launch a CLEAN, isolated flow session — a fresh |
| scratchbook_gaze_readA | Read a gaze board: its notebook, the flow sessions run against it (with status), their syntheses, and the intermediate artifacts they produced. Call with just board= to see the board plus the latest session's synthesis; add session= for a specific session, or artifact= to read one artifact file's full content. Pass remember=true to persist that session's converged synthesis into recall (scratchbook_recall) as durable memory — stamped with the commit it was grounded in, so a future session can reuse the understanding (and see how old it is). |
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 9 tools
Each tool targets a distinct concern: indexing, semantic search, structural outline, journaling, recall, status, forget, and gaze (create/read). There is no overlap in purpose, and the descriptions make boundaries clear.
All tools share the `scratchbook_` prefix and use consistent lowercase snake_case. The suffixes are single verbs/nouns, and even the compound `gaze_read` follows the established pattern. No style mixing.
With 9 tools covering codebase indexing/search/outline, journaling/recall, status/forget, and the gaze subsystem, the count is well-scoped and each tool earns its place.
Core workflows are covered: index, search, outline, journal, recall, forget, status, gaze, and gaze_read. Minor gaps exist—journal notes cannot be updated or deleted, and gaze boards lack a list/delete capability—but these are workable.