Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

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 drives DeepSeek Harness (DSH) as a coding agent you can keep working with. DSH has its own file, shell, search, skill and subagent tools; you give it a goal and it decides how.

[Iron rules]

  • Give goals, not commands. DSH's internal tool names (read, pwsh, ...) are not tools of this server; this server only has dsh_*.

  • Do not dsh_send to a busy conversation. To run after the current turn use dsh_send(queue=true) (returns at once); to stop and redirect use dsh_interject (blocks until the new turn ends); to just stop use dsh_interrupt.

  • Before treating a result as done, verify it with your own tools (read files, git diff, run tests), then submit pass/partial/fail with dsh_review (fail and partial need a reason).

  • Do not open a conversation this server drives in the DSH GUI: opening it gives the GUI the write lock and it is not returned. To look at it there, dsh_release first.

[Three ids] conversation_id = the long-lived conversation (the process is only a cache; after reaping or a crash the next dispatch resumes it); run_id = one dispatch; cursor = dsh_read's incremental position.

[Flow] dsh_start(cwd?) -> dsh_send(conversation_id, prompt), non-blocking by default, returns run_id + sentinel_file at once -> wait for the sentinel -> read it or collect with dsh_get -> dsh_review. dsh_status / dsh_read / dsh_list(only_running=true) work at any time. dsh_release when done.

[Waiting: the sentinel file, not polling] Every turn that ends (success, failure or cancel) writes a sentinel JSON atomically. Wait for it with a background task (the receipt has ready-made commands: sentinel_file_posix for Bash, sentinel_wait_powershell for PowerShell) and the host wakes you when it lands; read it for status and result (in Windows PowerShell read with -Encoding UTF8; the receipt has sentinel_read_powershell). wait=true blocks in place; a wait timeout only moves the turn to the background and never cancels it. Progress notifications are sent only when the call carries a progressToken.

[Write lock] One writer per conversation at a time. On "already owned by an active write handle" (or a vague Internal error) do not retry; read lock_holder from dsh_status: stale-mcp -> dsh_takeover; live-mcp -> dsh_release on that side, or dsh_takeover(force=true) if you must; none usually means the GUI holds it -> ask the user to close it there. This server never kills the GUI.

[Defaults] permission workspace-write, machine approval ceiling auto-deny. Read-only forces auto-deny. Reasoning is hidden by default (returned only with reasoning='full'). Reasoning effort defaults to max (lower it with reasoning_effort).

[Privacy] This server's logs, sentinels and registry never contain reasoning text, but DSH's own ~/.dsh/sessions does store it. Sentinels contain the answer and tool inputs (common secrets redacted) and are kept for 7 days.

Tool results follow the same language as this text. A few less common error messages are still Chinese; the field names in structured output are always English.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
dsh_startA

Create a DSH conversation: a coding agent you can keep working with. The conversation lives on disk and the process is only a cache; if the process is reaped or crashes, the next dispatch brings it back with ACP session/resume and nothing is lost. Returns the conversation_id and the conversation title. Dispatch work to it with dsh_send.

dsh_sendA

Dispatch a task to a conversation. Give a goal, not commands: DSH decides which file, shell, search, skill, subagent and team tools to use, and this server does not preload or proxy DSH's tool surface. Non-blocking by default (wait=false): it returns run_id + sentinel_file at once, the turn runs in the background and you are notified when it ends, so you can do other work and the task is never cut off by a timeout. Pass wait=true to block for the result (optionally with timeout_ms; on expiry it only moves to the background and does not cancel the turn). [A timeout never destroys the task] when wait=true reaches timeout_ms before the turn ends, this tool does not error and does not cancel: it downgrades to background, returns run_id + sentinel_file, and the turn runs to the end with the result delivered through the sentinel file (timeout_ms=0 means wait forever). In both modes a small file holding the final result is written atomically when the turn ends. Wait for it with a background task (Bash run_in_background + until [ -f sentinel_file ]; on Windows/PowerShell a Test-Path loop, and the receipt contains ready-made commands) and you are woken when it lands; no polling needed. Once the file exists, read it for the result, or collect with dsh_get(conversation_id, run_id); dsh_read shows output while the turn is running. Reasoning is hidden by default (answer plus reasoning statistics only). Results and background receipts carry a review ticket (advisory by default): verify, then submit a verdict with dsh_review. If the conversation is busy this tool errors: use dsh_send(queue=true) to enqueue (returns at once), dsh_interject to stop and redirect, or dsh_interrupt to just stop.

dsh_listA

List conversations and their live state, for keeping track of several at once. state: running (a turn is in progress) / idle (process alive, nothing running) / detached (no process; resumable). A running conversation also reports elapsed time, the tool it is executing and how much it has output this turn. Two sources are merged: conversations this server holds, and ones on DSH's disk that are not open (DSH's session/list leaves out open sessions). Pass only_running=true for just the active ones; follow up with dsh_read to see what one is producing.

dsh_readA

Read a conversation's run-time output (cursor-based and incremental): see what a running conversation has produced so far without waiting for the turn to end. Typical use: dsh_list(only_running) to find active conversations, then call dsh_read repeatedly, passing back the last cursor, to watch several in turn. The output buffer is memory-only and bounded (a ring; the oldest entries are dropped) and disappears when the server or process exits. Reasoning is not buffered: live reasoning of the turn currently running is attached only with include_reasoning=true. The cursor is a revision number: an entry whose text grew is returned again; match it by seq and replace its text (do not append twice).

dsh_getA

Details of one conversation; with run_id, the final result of that dispatch (the place to collect asynchronous work). Without run_id it uses the most recent turn. Returns: title, workspace, permission tier, state, turn count, token usage, context pressure, pending approvals, and the turn's full result (answer, tools, usage, error) with its review ticket. The service keeps the latest 20 runs in memory. After a restart or eviction the result is read back from the sentinel file, which is on disk and survives restarts.

dsh_reviewA

Record the caller's review verdict on the result of a turn that has ended (to allow or deny a permission request while a turn is running, use dsh_approval_decide). Results from dsh_send / dsh_interject and the sentinel carry a review ticket (checklist, evidence summary, review_id). Before treating a result as done, verify it yourself (read the changed files, look at git diff, run tests), then call this tool to record pass / partial / fail. Reviews are advisory by default: they do not block later dsh_send calls and are not fed back to DSH automatically; send another dsh_send if something needs fixing. A verdict can still be submitted after the run record was evicted from memory or the server restarted (the sentinel file is the reference).

dsh_interjectA

Say something to a conversation while it is running a turn. This tool blocks until the new turn ends (it moves to the background only when timeout_ms expires). Two modes: interject (default) stops the current turn and redirects at once; queue does not stop it and speaks right after the current turn ends naturally (without using the dsh_queue queue). To stop without saying anything use dsh_interrupt; to run after the current turn without blocking use dsh_send(queue=true). On an idle conversation it runs as an ordinary wait=true turn (full result, not a receipt). Note: ACP refuses concurrent prompts, so steering the model inside the same turn is not possible; interject is the practical equivalent (cancel, then start a new turn immediately, with history intact).

dsh_interruptA

Stop without saying anything new: interrupt the turn the conversation is running (ACP's native session/cancel, the same path as a user pressing stop). The interrupted turn is recorded as cancelled; the text and tool calls it had produced stay in its result (dsh_get / sentinel), and files it changed are not rolled back. The conversation itself stays healthy and can take a new task right away. To stop and redirect use dsh_interject; to cancel a queued task that has not started use dsh_queue(action=remove).

dsh_takeoverA

Preempt a conversation's write lock. DSH's write lock is a cross-process kernel semaphore that never expires while its holder lives, and no API can take it away: the only means is killing the holder, so this tool first works out who that is. (1) If the lock is actually free, a normal resume follows and nothing is killed. (2) If the holder is an orphan this server left behind, its OS start time must match the registration before takeover. (3) Another live dsh-any-agent instance also requires force=true. (4) If the holder is unknown, or its start time is missing or differs from the registration, release the conversation in its original host and retry. Killing a holder that is running a turn interrupts that turn (logged as interrupted); the conversation itself is unharmed.

dsh_releaseA

Release the DSH process a conversation occupies (this frees the write lock so the user can open the same conversation in their own DSH GUI). The conversation stays on disk and can be resumed later; forget=true writes a tombstone: it is removed from the registry and later lookups by id say it was forgotten (to bring it back, delete the tombstone file named in the error, by default $DSH_HOME/.dsh-any-agent-forgotten/<id>.json). To free memory in one go when you are done, pass all=true (each conversation is about 300-480 MB; the default MAX_LIVE=4 already reaps the least recently used one; all=true releases idle conversations and skips ones running a turn unless force=true). Releasing a single conversation stops its DSH process; if a turn is running, it is interrupted.

dsh_approval_decideA

While a turn is running, decide a permission request DSH is waiting on (these only appear when the conversation uses on_approval=ask); after you allow or deny, the turn continues. It hands DSH's out-of-sandbox and escalation requests to the caller instead of allowing or denying them all. To grade the result of a finished turn use dsh_review.

dsh_statusA

A lightweight snapshot of one conversation: reads live state from this server's memory without spawning a DSH process. Returns state (running/idle/detached), the current tool and output size while running, the latest turn's run_id, status and review status, pending approvals, queue length, and the write-lock holder lock_holder (when you hit the lock, use it to choose between dsh_takeover and asking the other side to dsh_release). For a turn's full result use dsh_get, for live output dsh_read, for all conversations dsh_list.

dsh_inboxA

Inbox of pending approvals across conversations (dsh_status covers a single one). Lists every approval waiting for your decision: conversation id and title, approval id, tool, reason, a summary of the command or path, and how long it has waited. Decide with dsh_approval_decide. Returns an empty list when nothing is pending.

dsh_queueA

Inspect or change a conversation's queue of pending tasks (it only manages tasks already queued; enqueue with dsh_send(queue=true)). A restart marks unstarted receipts cancelled. action=list lists them. remove cancels one and writes a cancelled sentinel; update rewrites the queued text; promote moves one to the front.

dsh_doctorA

Read-only health check: the DSH executable and version, whether the profile exists or has drifted, the state file, whether the runs/locks directories are writable, orphan locks, the number of sessions and their RSS, and the effective configuration. It reports and changes nothing; ok=false means at least one check failed.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 15 tools

Disambiguation4/5

Most tools target a clearly distinct lifecycle action (start/send/read/get/interrupt/release), and the descriptions aggressively cross-reference the sibling tool to disambiguate (read vs get, status vs list, inbox vs approval_decide vs review). The residual overlap is small but real: dsh_send(queue=true), dsh_interject(queue), and dsh_interrupt all touch 'steering a running turn', and dsh_release vs dsh_interrupt both stop work — an agent has to read carefully to pick correctly.

Naming Consistency5/5

Every tool uses the same dsh_ prefix plus a lowercase action word (start, send, read, get, list, status, interrupt, release, doctor). No camelCase or mixed verb styles anywhere; the surface reads as one predictable namespace.

Tool Count4/5

15 tools sits at the top of the well-scoped band, and the domain (managing long-lived async coding-agent conversations with locks, queues, approvals and reviews) genuinely needs most of them. A few, such as dsh_doctor and dsh_takeover, are narrow operational escapes that most sessions never touch, pushing it slightly past lean.

Completeness4/5

The lifecycle is well covered end to end: create, dispatch, watch live output, collect results, steer, stop, queue management, approvals, review verdicts, lock preemption, release/forget, and health checks. Gaps are minor — no way to change a conversation's configuration (workspace, permission tier, profile) or to enumerate past runs beyond the in-memory 20 / sentinel file, so history and reconfiguration require working around the surface.

Maintenance

ActivityNo data
ResponsivenessOutdated data