Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SCRATCHBOOK_DBNoLanceDB directory~/.scratchbook/lancedb
SCRATCHBOOK_GAZE_DIRNoGaze boards directory<db-dir>/../gaze
SCRATCHBOOK_EMBED_DIMNoVector dimension (must match model)1024
SCRATCHBOOK_EMBED_URLNoOllama-style embed endpointhttp://localhost:11434/api/embed
SCRATCHBOOK_EMBED_BATCHNoTexts per embed request16
SCRATCHBOOK_EMBED_MODELNoEmbedding modelbge-m3
SCRATCHBOOK_MAX_FILE_KBNoSkip files larger than this (KB)512
SCRATCHBOOK_CHUNK_MAX_CHARSNoMaximum chunk size in characters1600
SCRATCHBOOK_CHUNK_MIN_CHARSNoMinimum chunk size before a soft cut240
SCRATCHBOOK_EMBED_CONCURRENCYNoParallel embed requests4
SCRATCHBOOK_CHUNK_OVERLAP_LINESNoOverlap 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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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 git ls-files when available). Run once when you start working on a project, and again after significant edits. Pass the absolute project root as path.

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 path to focus on a file or a directory prefix.

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 claude -p that carries no other context and concentrates SOLELY on that board — to reason about the RELATIONSHIPS between the pieces, write intermediate artifacts you can inspect/verify, and converge on a synthesis. Use it when a problem is too tangled to hold in the working session: dump the pieces with note=…, then focus a flow session on them with focus=…. The flow session runs in the BACKGROUND — poll with scratchbook_gaze_read; pass wait=true to block for the synthesis. Give project= to let it ground its thinking in real code. It can read/write files and search the codebase, but has no shell.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jinyaolin/scratchbook'

If you have feedback or need assistance with the MCP directory API, please join our Discord server