Skip to main content
Glama

Run Command or Script in Dedicated Project Shell Panel

herdr_run_shell

Run shell commands or scripts in a reusable Herdr shell panel for a specified project, reusing an idle panel or creating one and returning exit code and output.

Instructions

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_name": "<project_name>",
      "command": "<command>"
    },
    "name": "herdr_run_shell"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoOptional absolute working directory to cd into before running.
waitNoWait for completion and return exit_code + output (default true; set false for background servers).
linesNoNumber of output lines to read back (default 200).
commandYesShell command or script invocation to run in the dedicated shell panel.
timeout_msNoTimeout in milliseconds when wait=true (default 120000).
panel_labelNoLabel of the reusable shell panel in that space (default 'gemini-shell').
project_nameYesProject directory name matching the target Herdr space label (for example 'svg-motion-forge').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the panel lifecycle side effects (reuse if idle, split and label on first use), the two named error conditions, and the return payload (exit_code plus output). This is exactly the state-changing context an agent needs before invoking a non-read-only tool.

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 single semicolon-delimited sentence front-loads the core action and then walks through preconditions, reuse behavior, and return values in execution order. It is dense and slightly run-on, but no clause is filler.

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

Completeness4/5

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

For a 7-parameter mutation tool with no output schema, the description covers preconditions, side effects, and return values well. It omits what happens on timeout or with wait=false beyond the schema hint, but those gaps are minor given full schema coverage.

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

Parameters3/5

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

Schema coverage is 100%, so every parameter already carries its own description; the description only reinforces 'command', the project_name-to-space-label matching, and the 'gemini-shell' default. It adds little semantic detail the schema does not already supply, so the baseline of 3 applies.

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 description states a concrete verb and resource: execute a command or script in a dedicated reusable shell panel inside a named Herdr space. The panel lifecycle (reuse idle panel, split and label a new one) makes the mechanism unmistakable, though it never names a sibling such as pane_run to sharpen the boundary.

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

Usage Guidelines3/5

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

Usage is implied by 'one-shot workflow' and by the stated failure modes (workspace_not_found, shell_panel_busy), which tell the agent the preconditions for a successful call. However, there is no explicit statement of when to prefer this over pane_run, agent_prompt, or herdr_delegate_agent, and no exclusion guidance.

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