Skip to main content
Glama

ghost_shell

Run shell commands and manage persistent shell sessions for builds, git, CLIs, scripts, or opening apps. Control sessions, retrieve output, handle timeouts, and edit files via command execution.

Instructions

Run shell commands and drive persistent shells. THE way to run builds, git, CLIs, scripts, or open apps from a command line, and to edit files on machines with no file tools. op=run (default): one-shot - spawn shell, run 'cmd', return {output, exit_code, timed_out}. shell=bash (default) | sh | zsh | pwsh. op=open: start a persistent bash whose variables/cwd/env survive across commands (returns an 'id'). op=send: run 'cmd' in session 'id' (state persists). op=read: drain the rest of a command that hit its timeout (busy=true). op=list: show sessions. op=kill: end a session. Output is merged stdout+stderr, tail-capped at 24000 chars. Emergency-stop (ghost_stop) kills a runaway command. To START A NEW CLAUDE CODE SESSION: op=run cmd='gnome-terminal -- claude' (or your terminal of choice), then drive the terminal window with ghost_see / ghost_act / ghost_key. Disabled entirely when GHOST_SHELL=off.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoSession id (op=send|read|kill required; op=open optional custom name, else auto s1,s2,...)
opNoOperation (default run)
cmdNoCommand text (op=run|send)
cwdNoWorking directory (op=run|open)
shellNoop=run shell (default bash). Persistent sessions are bash only.
timeout_msNoPer-command timeout, default 30000, max 600000. On timeout op=run kills the process; op=send leaves it running (drain via op=read).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.23.4

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full behavioral burden and meets it: merged stdout+stderr with a 24000-char tail cap, timeout asymmetry (op=run kills the process; op=send leaves it running, drainable via op=read), persistent state across send, and the GHOST_SHELL=off kill switch. Destructive and stateful traits are all surfaced explicitly. No annotation contradiction exists because there are no annotations to contradict.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but densely packed, front-loading the core purpose before the op semantics, output behavior, and escape hatch. Compact notation (op=run, shell=bash) and enumeration avoid redundancy. It could be trimmed slightly, as the Claude Code session workflow is arguably supplementary material, but every section earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a stateful six-op tool with no output schema and no annotations, this is remarkably complete: return values, timeout nuances, output caps, session lifecycle, emergency stop, and disable condition are all specified. An agent has enough information to select and invoke the tool correctly without consulting external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, establishing a baseline of 3. The description adds real value beyond the schema for the op parameter, which the schema merely labels 'Operation (default run)': it defines each op's semantics, return shape ({output, exit_code, timed_out} vs an 'id'), and session behavior. The remaining parameters are already well covered by their schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence, 'Run shell commands and drive persistent shells,' names a specific verb and resource, and the op enum breakdown (run/open/send/read/list/kill) makes the scope unmistakable. It also enumerates concrete use cases: builds, git, CLIs, scripts, apps, and file editing. However, it never explicitly differentiates itself from the sibling ghost_run, which by name could be the one-shot variant, so sibling differentiation is implicit rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear when-to-use context: shell work for builds, git, CLIs, scripts, and file editing on machines lacking file tools. It also names follow-on alternatives for terminal driving (ghost_see / ghost_act / ghost_key) and an emergency backstop (ghost_stop). It stops short of explicit when-not-to-use exclusions, such as preferring ghost_http_get for network calls.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/NORTHTEKDevs/ghost'

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