Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
HERDR_SESSIONNo指定连接的命名持久化 Herdr 会话 (herdr --session)
HERDR_BIN_PATHNo指定 Herdr CLI 可执行文件路径
HERDR_MCP_PORTNoHTTP 模式监听端口8765
HERDR_MCP_MACHINENo转发命令至已保存的远程 SSH 机器配置 (herdr --machine),此模式下禁用本地实时事件流
HERDR_SOCKET_PATHNo覆盖 Herdr Socket API 套接字路径
HERDR_MCP_READ_ONLYNo设为 1 或 true 时仅暴露只读工具false
HERDR_MCP_PUBLIC_URLNoCloud MCP 外部 HTTPS 根地址
HERDR_MCP_TIMEOUT_MSNoCLI 子命令默认超时时间(毫秒)120000
HERDR_MCP_AUTH_SECRETNoCloud MCP 配对静态管理密钥 (亦可直接作为静态 Bearer Token 调试)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Control and inspect local Herdr workspaces, tabs, panes, coding agents, and live lifecycle events. Prefer workspace_list / agent_list for discovery, agent_prompt (or agent_dispatch_and_read) to delegate tasks to idle agents, and agent_read (with source='recent-unwrapped') to inspect terminal output.

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
herdr_statusA

Check local Herdr client and running background server status, protocol compatibility, and resolved binary/socket paths.

session_snapshotA

Return the complete live Herdr snapshot including workspaces, tabs, panes, detected agents, layouts, and focus. Large payload; prefer workspace_list, pane_list, or agent_list for routine checks.

agent_listA

List all detected coding agents across panes with their live name, pane_id, kind (codex, claude, agy, gemini, etc.), and status (idle, working, blocked, done, unknown).

agent_getB

Inspect a single detected agent by its unique live name or hosting pane ID (for example 'w1:p2').

agent_explainB

Explain how Herdr classified an agent's current screen detection state and matched manifest rules.

agent_readA

Read terminal output from a coding agent. Defaults to 'recent-unwrapped' (soft wraps joined) and 120 lines, which is best for reading completed responses and code reviews.

agent_startA

Start a supported interactive coding agent (such as codex, claude, agy, gemini, opencode) in an existing idle shell pane and assign it a unique agent name.

agent_promptA

Submit a prompt with bracketed paste + Enter to an idle/done agent. Rejects immediately with 'agent_blocked' if the agent is waiting on an approval dialog. Set wait=true to block until the agent settles into idle, done, or blocked.

agent_dispatch_and_readB

High-level one-shot helper for Gemini: submit a prompt to a Herdr agent, wait until it reaches a settled state (idle, done, or blocked), and immediately return both its final status and unwrapped terminal output.

agent_waitB

Block until an agent reaches idle, done, blocked (default), or one of the specified 'until' states.

agent_send_keysB

Send validated logical key presses to an agent's interactive UI, such as ['esc'], ['ctrl+c'], ['enter'], ['up'], or ['y', 'enter'].

agent_renameA

Assign a unique name to a detected agent, or clear its name when 'clear' is true or 'name' is omitted.

agent_focusA

Switch the user's Herdr TUI view to the target agent's pane and mark its completion as seen.

pane_listA

List terminal panes across all workspaces or within a single workspace.

pane_getB

Inspect a single pane by its pane ID (for example 'w1:p1').

pane_layoutA

Inspect a pane's dimensions and layout geometry to choose whether to split right or down.

pane_process_infoA

Inspect the foreground process, PID, and working directory inside a pane.

pane_readC

Read terminal text from any shell or process pane.

pane_splitA

Split an existing pane to create a new interactive shell pane beside or below it. Returns the new pane under result.pane.pane_id. Defaults to focus=false so user focus is not stolen.

pane_renameB

Set or clear the display title of a pane.

pane_runB

Submit a shell command followed by Enter into an ordinary shell pane.

pane_send_textA

Send raw text into a pane without pressing Enter.

pane_send_keysA

Send logical key presses (such as ['ctrl+c'], ['esc'], ['enter']) to a pane.

pane_wait_outputA

Block until a pane's terminal output contains a literal substring ('match') or matches a Rust regular expression ('regex'). Output already on screen matches immediately.

pane_closeA

Close a terminal pane and terminate its foreground process. Only close panes you created or the user named.

workspace_listA

List all Herdr workspaces (spaces) with their IDs, labels, working directories, and aggregate agent states.

workspace_getB

Inspect one workspace by ID (for example 'w1').

workspace_createB

Create a new Herdr workspace with one initial tab and root shell pane.

workspace_focusB

Switch the user's Herdr TUI view to a workspace.

workspace_renameC

Rename an existing Herdr workspace.

workspace_closeA

Close a workspace and terminate all pane processes inside it. Only close workspaces you created or the user named.

tab_listA

List tabs across all workspaces or within a specific workspace.

tab_createA

Create a new tab with one root shell pane inside a workspace.

tab_focusB

Switch the user's Herdr view to a specific tab (for example 'w1:t2').

tab_renameC

Rename a tab.

tab_closeA

Close a tab and terminate all pane processes inside it. Only close tabs you created or the user named.

worktree_listA

List Git worktrees known to a Herdr workspace or repository path.

worktree_createB

Create a Git worktree and open it as a linked Herdr workspace.

notification_showB

Display a toast notification inside the user's Herdr terminal UI.

events_statusA

Check whether the background Unix-socket event tap is connected and inspect sequence numbers.

events_recentB

Return buffered live lifecycle and agent status change events after 'after_seq'. Event names use underscore form such as 'pane_agent_status_changed', 'pane_created', 'workspace_created'.

events_waitB

Block until a matching Herdr lifecycle or agent status event arrives on the Unix socket (after 'after_seq' if given, or from now if omitted).

herdr_delegate_agentA

One-shot workflow for delegating tasks to claude, codex, agy, grok, etc. in the Herdr space matching 'project_name': stops with 'workspace_not_found' if the space does not exist; reuses an existing idle/done panel of 'agent_kind' in that space; stops with 'agent_busy_or_blocked' if an existing panel of that kind is busy/blocked; splits and starts a new agent panel only if none exists yet; aligns the agent's internal session name to 'session_name' (sending '/new' or '/clear' plus '/rename <session_name>' without --wait when mismatched); then submits 'prompt' and reads output.

herdr_run_shellA

One-shot workflow for executing commands or scripts in a dedicated reusable shell panel (default label 'gemini-shell') inside the Herdr space matching 'project_name': stops with 'workspace_not_found' if the space does not exist; reuses the existing 'gemini-shell' panel if idle (or stops with 'shell_panel_busy' if a foreground process is still running); splits and labels a new 'gemini-shell' panel on first use; executes 'command' and returns 'exit_code' and output.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3/5.0

Scored across 44 tools

Disambiguation3/5

Most low-level tools have clear boundaries (pane_run vs pane_send_text vs pane_send_keys, workspace vs tab vs pane vs agent scopes). However, the set contains deliberate overlap between primitives and one-shot helpers: agent_start/agent_prompt/agent_wait vs agent_dispatch_and_read vs herdr_delegate_agent, and pane_split/pane_run/pane_wait_output vs herdr_run_shell, forcing the agent to choose between equivalent paths. Descriptions do help distinguish them, but the boundaries are not always obvious.

Naming Consistency3/5

Names are uniformly snake_case and mostly follow a noun_verb pattern (agent_list, pane_split, workspace_create, worktree_list). Deviations exist: herdr_ prefixed tools (herdr_status, herdr_delegate_agent, herdr_run_shell), verb-first composites (agent_dispatch_and_read), and noun-only names (session_snapshot, pane_layout), so the convention is readable but not fully predictable.

Tool Count2/5

44 tools is heavy for a terminal/agent orchestration server and includes redundant orchestration wrappers that duplicate primitive sequences. The core surface (workspace/tab/pane/agent/events/worktree) legitimately needs many operations, but the count is bloated beyond what's necessary.

Completeness4/5

Coverage is broad and mostly complete: full lifecycle for workspaces, tabs, and panes (list/get/create/focus/rename/close plus split, read, send, wait), full agent lifecycle (list/get/explain/start/prompt/wait/send_keys/rename/focus), plus events, worktrees, and notifications. Minor gaps remain such as worktree removal, tab_get, and pane move/swap operations, but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues