Skip to main content
Glama
dwgx

SmartCLI

by dwgx

start

Launch a command in a detached, persistent terminal session and get its session ID for later interaction. Configure working directory, environment variables, and terminal size as needed.

Instructions

Spawn a program in a new detached, persistent session and return its id.

The session survives across tool calls (a localhost-only daemon owns the live PtySession). cmd is the command line to spawn, e.g. "python3" or "lazygit". cwd and env configure only the controlled child process. Returns {"ok", "sid"} on success. Use the returned sid for every other tool.

Server-side limits (violations return an error): at most 8 concurrent sessions by default (tunable via SMARTCLI_MAX_SESSIONS); sid must be 1-64 chars matching [A-Za-z0-9][A-Za-z0-9_.-]*; env keys must be valid identifiers and may not start with SMARTCLI_TUI_; cwd must be an existing directory; terminal size is capped at 1000 cols x 500 rows (100000 cells). Note: env values pass through the process command line briefly (visible in ps) — avoid secrets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cmdYes
cwdNo
envNo
sidNo
colsNo
rowsNo
Behavior5/5

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

Beyond the annotations, the description discloses key behaviors: the session is owned by a localhost-only daemon, persists across calls, has server-side limits (concurrent sessions, sid format, env restrictions, terminal size cap), and env values may be visible in ps. This is rich, non-obvious behavioral context that helps the agent anticipate side effects and constraints.

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

Conciseness5/5

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

The description is well-structured and front-loaded: purpose first, then persistence semantics, then parameter details, then constraints, then security note. Every sentence contributes essential information without repetition or fluff, making it readable despite the density.

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 complex 6-parameter tool with no output schema, the description covers purpose, return format, workflow integration, supported parameter range, failure modes, and security implications. It is complete enough for an agent to invoke the tool correctly and to interpret the returned sid.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining cmd with examples, cwd as a required existing directory, env key constraints, sid format, and cols/rows via the terminal size cap and defaults. It also adds security guidance about env values appearing on the command line, which is vital for safe invocation.

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

Purpose5/5

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

The opening sentence 'Spawn a program in a new detached, persistent session and return its id' is a specific verb+resource statement that clearly distinguishes start from sibling tools like list_sessions, send_text, and close. It also immediately establishes the tool's role as the session creation entrypoint.

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 explains that the session survives across tool calls and instructs 'Use the returned sid for every other tool,' which clearly positions start as the first step in a session lifecycle. It does not explicitly mention alternatives or when-not-to-use, but the context makes the intended workflow clear.

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

Install Server

Other Tools

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/dwgx/SmartCLI'

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