Skip to main content
Glama

Start a background task

task_start
Destructive

Start detached background shell commands and return a task ID, PID, and log path so long-running jobs persist across restarts. Use companion tools to read incremental output or stop the task.

Instructions

Start a detached background shell command and return immediately with a task id, PID and log path. The task keeps running if termux-mcp restarts, and its exit code is persisted in a status file. Use task_output to read incremental output and task_stop to terminate it. Background tasks are non-interactive; use terminal_create for prompts and TUI programs.

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Default $HOME.
envNoExtra environment variables.
nameNoOptional human-readable label.
commandYesShell command to run in the background.
wait_msNoWait this long before returning, so initial output/failures are visible. Default 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, it discloses key behavior: the task is detached, returns immediately, survives termux-mcp restarts, and persists its exit code in a status file. It also warns that background tasks are non-interactive, which is important for correct invocation.

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 front-loaded with the core action and return behavior, then adds operational context and alternatives. Every sentence contributes useful information without redundancy.

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?

There is no output schema, so the description appropriately explains the immediate return values: task id, PID and log path. It also covers lifecycle behavior, persisted exit codes, follow-up tools and the non-interactive boundary.

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 description coverage is 100%, so the schema already documents all five parameters. The description adds useful return-value context but does not meaningfully elaborate on parameter semantics beyond the schema.

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 description states a specific verb and resource: start a detached background shell command. It also distinguishes the tool from terminal_create by calling out non-interactive use and immediate return with a task id, PID and log path.

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?

It clearly names related tools for follow-up actions: task_output for reading output and task_stop for termination. It also gives a useful exclusion for prompts and TUI programs via terminal_create, though it does not explicitly compare against run_command for foreground execution.

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