Skip to main content
Glama
dylan-gluck

MCP Background Job Server

by dylan-gluck

MCP Background Job Server

Python 3.12+ FastMCP PyPI version License

An MCP (Model Context Protocol) server that enables coding agents to execute long-running shell commands asynchronously with full process management capabilities.

Overview

The MCP Background Job Server provides a robust solution for running shell commands in the background, allowing agents to start processes, monitor their status, interact with them, and manage their lifecycle. This is particularly useful for development workflows involving build processes, test suites, servers, or any long-running operations.

Related MCP server: MCP Shell Server

Features

  • Asynchronous Process Execution: Execute shell commands as background jobs with unique job IDs

  • Process Lifecycle Management: Start, monitor, interact with, and terminate background processes

  • Real-time Output Monitoring: Capture and retrieve stdout/stderr with buffering and tailing capabilities

  • Interactive Process Support: Send input to running processes via stdin

  • Resource Management: Configurable job limits and automatic cleanup of completed processes

  • MCP Protocol Integration: Full integration with Model Context Protocol for agent interactions

Installation

Install directly from PyPI using uvx:

# Install and run the MCP server
uvx mcp-background-job

Claude Code Integration

Add the server to your Claude Code configuration:

  1. Option A: Using Claude Code Desktop

    • Open Claude Code settings/preferences

    • Navigate to MCP Servers section

    • Add a new server:

      • Name: background-job

      • Command: uvx

      • Args: ["mcp-background-job"]

  2. Option B: Configuration File Add to your Claude Code configuration file:

    {
      "mcpServers": {
        "background-job": {
          "command": "uvx",
          "args": ["mcp-background-job"]
        }
      }
    }
  3. Restart Claude Code to load the new MCP server.

Development Setup

For local development or contributing:

Prerequisites

  • Python 3.12 or higher

  • uv package manager

Setup Steps

  1. Clone and navigate to the project directory:

    git clone https://github.com/dylan-gluck/mcp-background-job.git
    cd mcp-background-job
  2. Install dependencies:

    uv sync
  3. Install in development mode:

    uv add -e .

Quick Start

Using with Claude Code

Once configured, ask Claude to help you with background tasks:

You: "Start my development server in the background and monitor it"

Claude: I'll start your development server using the background job server.

[Uses the execute tool to run your dev server]
[Shows job ID and monitors startup progress]
[Provides status updates]

Claude: "Your development server is now running on http://localhost:3000. 
The job ID is abc123-def456 if you need to control it later."

Manual Server Usage

For development or direct usage:

# Run with stdio transport (most common)
uvx mcp-background-job

# Or for development:
uv run python -m mcp_background_job

Basic Usage Example

# 1. Execute a long-running command
execute_result = await execute_command("npm run dev")
job_id = execute_result.job_id

# 2. Check job status
status = await get_job_status(job_id)
print(f"Job status: {status.status}")

# 3. Get recent output
output = await tail_job_output(job_id, lines=20)
print("Recent output:", output.stdout)

# 4. Interact with the process
interaction = await interact_with_job(job_id, "some input\n")
print("Process response:", interaction.stdout)

# 5. Kill the job when done
result = await kill_job(job_id)
print(f"Kill result: {result.status}")

MCP Tools Reference

The server exposes 7 MCP tools for process management:

Read-only Tools

Tool

Description

Parameters

Returns

list

List all background jobs

None

{jobs: [JobSummary]}

status

Get job status

job_id: str

{status: JobStatus}

output

Get complete job output

job_id: str

{stdout: str, stderr: str}

tail

Get recent output lines

job_id: str, lines: int

{stdout: str, stderr: str}

Interactive Tools

Tool

Description

Parameters

Returns

execute

Start new background job

command: str

{job_id: str}

interact

Send input to job stdin

job_id: str, input: str

{stdout: str, stderr: str}

kill

Terminate running job

job_id: str

{status: str}

Job Status Values

  • running - Process is currently executing

  • completed - Process finished successfully

  • failed - Process terminated with error

  • killed - Process was terminated by user

Configuration

Environment Variables

Configure the server behavior using these environment variables:

# Maximum concurrent jobs (default: 10)
export MCP_BG_MAX_JOBS=20

# Maximum output buffer per job (default: 10MB)
export MCP_BG_MAX_OUTPUT_SIZE=20MB
# or in bytes:
export MCP_BG_MAX_OUTPUT_SIZE=20971520

# Default job timeout in seconds (default: no timeout)
export MCP_BG_JOB_TIMEOUT=3600

# Cleanup interval for completed jobs in seconds (default: 300)
export MCP_BG_CLEANUP_INTERVAL=600

# Working directory for jobs (default: current directory)
export MCP_BG_WORKING_DIR=/path/to/project

# Allowed command patterns (optional security restriction)
export MCP_BG_ALLOWED_COMMANDS="^npm ,^python ,^echo ,^ls"

Claude Code Configuration with Environment Variables

{
  "mcpServers": {
    "background-job": {
      "command": "uvx",
      "args": ["mcp-background-job"],
      "env": {
        "MCP_BG_MAX_JOBS": "20",
        "MCP_BG_MAX_OUTPUT_SIZE": "20MB"
      }
    }
  }
}

Programmatic Configuration

from mcp_background_job.config import BackgroundJobConfig

config = BackgroundJobConfig(
    max_concurrent_jobs=20,
    max_output_size_bytes=20 * 1024 * 1024,  # 20MB
    default_job_timeout=7200,  # 2 hours
    cleanup_interval_seconds=600  # 10 minutes
)

Architecture

The server is built with a modular architecture:

  • JobManager: Central service for job lifecycle management

  • ProcessWrapper: Abstraction layer for subprocess handling with I/O buffering

  • FastMCP Server: MCP protocol implementation with tool definitions

  • Pydantic Models: Type-safe data validation and serialization

Key Components

src/mcp_background_job/
├── server.py          # FastMCP server and tool definitions
├── service.py         # JobManager service implementation  
├── process.py         # ProcessWrapper for subprocess management
├── models.py          # Pydantic data models
├── config.py          # Configuration management
└── logging_config.py  # Logging setup

Development

Running Tests

# Run all tests
uv run pytest tests/

# Run unit tests only
uv run pytest tests/unit/ -v

# Run integration tests only  
uv run pytest tests/integration/ -v

Code Formatting

# Format code with ruff
uv run ruff format

# Run type checking
uv run mypy src/

Development Workflow

  1. Make your changes

  2. Run tests: uv run pytest tests/

  3. Format code: uv run ruff format

  4. Commit changes

Examples

Development Server Workflow

# Start a development server
job_id=$(echo '{"command": "npm run dev"}' | mcp-tool execute)

# Monitor the startup
mcp-tool tail --job_id "$job_id" --lines 10

# Check if server is ready
mcp-tool status --job_id "$job_id"

# Stop the server
mcp-tool kill --job_id "$job_id"

Long-running Build Process

# Start a build process
job_id=$(echo '{"command": "docker build -t myapp ."}' | mcp-tool execute)

# Monitor build progress
while true; do
  status=$(mcp-tool status --job_id "$job_id")
  if [[ "$status" != "running" ]]; then break; fi
  mcp-tool tail --job_id "$job_id" --lines 5
  sleep 10
done

# Get final build output
mcp-tool output --job_id "$job_id"

Interactive Process Example

# Start Python REPL
job_id=$(echo '{"command": "python -i"}' | mcp-tool execute)

# Send Python code
mcp-tool interact --job_id "$job_id" --input "print('Hello, World!')\n"

# Send more commands
mcp-tool interact --job_id "$job_id" --input "import sys; print(sys.version)\n"

# Exit REPL
mcp-tool interact --job_id "$job_id" --input "exit()\n"

Security Considerations

  • Process Isolation: Each job runs as a separate subprocess

  • Resource Limits: Configurable limits on concurrent jobs and memory usage

  • Input Validation: All parameters are validated using Pydantic models

  • Command Restrictions: Consider implementing command allowlists in production

  • Output Sanitization: Be aware that process output may contain sensitive information

Transport Support

The server supports multiple MCP transports:

  • stdio: Default transport for local development and agent integration

  • HTTP: For remote access (requires additional setup)

For stdio transport, ensure logging goes to stderr only to avoid protocol conflicts.

Troubleshooting

Common Issues

Import Errors: Ensure the package is installed in development mode:

uv add -e .

Tests Not Running: Install the package first, then run tests:

uv sync
uv add -e .
uv run pytest tests/

Permission Errors: Ensure proper permissions for the commands you're trying to execute.

Memory Issues: Adjust MCP_BG_MAX_OUTPUT_SIZE if dealing with processes that generate large amounts of output.

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes with tests

  4. Run the test suite and formatting

  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

v0.1.1

  • Published to PyPI for easy installation via uvx

  • Added console script entry point (mcp-background-job)

  • Updated documentation with installation and usage instructions

  • Fixed linting issues and improved code quality

v0.1.0

  • Initial implementation with full MCP tool support

  • Process lifecycle management

  • Configurable resource limits

  • Comprehensive test suite


Built with ❤️ using FastMCP and Python 3.12+

Available Tools

7 tools
execute_commandA

Execute a command as a background job and return job ID.

Args: command: Shell command to execute in the background

Returns: ExecuteOutput containing the job ID (UUID) of the started job

ParametersJSON Schema
NameRequiredDescriptionDefault
commandYesShell command to execute

Output Schema

ParametersJSON Schema
NameRequiredDescription
job_idYesUUID v4 job identifier

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: execution as a background job and return of a job ID, but lacks details on permissions, rate limits, error handling, or job lifecycle implications. It adequately covers the core operation but misses advanced context.

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 purpose in the first sentence, followed by structured Args and Returns sections. Every sentence adds value without redundancy, making it highly efficient and well-organized.

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?

Given the tool's moderate complexity (background execution), no annotations, and an output schema (ExecuteOutput), the description is mostly complete. It covers purpose, parameters, and returns, but could benefit from more behavioral context like security implications or job management links.

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?

The description adds minimal semantics beyond the schema (which has 100% coverage), noting the command is a 'Shell command to execute in the background,' slightly reinforcing the schema's description. With only one parameter, the baseline is high, but it doesn't provide format examples or constraints.

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 clearly states the specific action ('Execute a command as a background job') and resource ('command'), distinguishing it from sibling tools like get_job_output or kill_job by focusing on job initiation rather than monitoring or termination.

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 implies usage for starting background jobs, with context from sibling tools suggesting alternatives for job monitoring (get_job_status, tail_job_output) and management (kill_job, interact_with_job). However, it lacks explicit guidance on when to use this versus other job-related tools or prerequisites.

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

get_job_outputA

Get the complete stdout and stderr output of a job.

Args: job_id: The UUID of the job to get output from

Returns: ProcessOutput containing the complete stdout and stderr content

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID to get output from

Output Schema

ParametersJSON Schema
NameRequiredDescription
stderrYesStandard error content
stdoutYesStandard output content

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool retrieves 'complete' output, which is a useful behavioral trait beyond basic functionality. However, it does not mention potential issues like large output handling, permissions required, or rate limits, leaving gaps in behavioral context.

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 with the core purpose in the first sentence. The Args and Returns sections are concise and directly relevant, with no wasted words. Every sentence earns its place by clarifying inputs and outputs efficiently.

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?

Given the tool's low complexity (single parameter) and the presence of an output schema (Returns section), the description is mostly complete. It covers the purpose, input, and output, but lacks details on behavioral aspects like error handling or performance considerations, which could be useful despite the output schema.

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?

The schema description coverage is 100%, so the schema already documents the job_id parameter. The description adds minimal value by restating the parameter in the Args section, but it does not provide additional semantics like format details or examples. With high schema coverage, the baseline is 3, but the explicit Args section slightly enhances clarity, warranting a 4.

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 clearly states the specific action ('Get') and resource ('complete stdout and stderr output of a job'), distinguishing it from siblings like get_job_status (which returns status, not output) and tail_job_output (which likely streams partial output). The verb+resource combination is precise and unambiguous.

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?

The description implies usage when you need the full output of a job, but it does not explicitly state when to use this tool versus alternatives like tail_job_output (e.g., for streaming vs. complete output) or list_jobs (for job metadata). Guidelines are implied by the tool's purpose but lack explicit comparisons or exclusions.

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

get_job_statusA

Get the current status of a background job.

Args: job_id: The UUID of the job to check

Returns: The current status of the job (running, completed, failed, or killed)

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID to check

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusYesCurrent job status

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that this is a read operation (checking status) and lists possible status values (running, completed, failed, killed), which helps understand behavior. However, it lacks details on permissions, rate limits, or error handling, which are important for a job status tool.

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 with the core purpose, followed by clear 'Args' and 'Returns' sections. Every sentence is necessary and contributes to understanding, with no wasted words, making it highly efficient.

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?

Given the tool's low complexity (single parameter) and the presence of an output schema (implied by 'Returns' section), the description is mostly complete. It covers the purpose, parameter, and return values adequately. However, it could improve by addressing usage relative to siblings or adding behavioral details like error cases.

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?

The schema description coverage is 100%, so the schema already documents the 'job_id' parameter. The description adds minimal value by specifying it as a 'UUID', which clarifies the format beyond just 'string'. This slight enhancement justifies a score above the baseline of 3.

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 clearly states the specific action ('Get the current status') and resource ('a background job'), distinguishing it from siblings like 'get_job_output' (which retrieves output) or 'kill_job' (which terminates jobs). It precisely defines the tool's function without ambiguity.

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?

The description implies usage when needing to check job status, but does not explicitly state when to use this tool versus alternatives like 'list_jobs' (for overview) or 'tail_job_output' (for real-time monitoring). No exclusions or prerequisites are mentioned, leaving some context gaps.

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

interact_with_jobA

Send input to a job's stdin and return any immediate output.

Args: job_id: The UUID of the job to interact with input: Text to send to the job's stdin

Returns: ProcessOutput containing any immediate stdout/stderr output after sending input

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID to interact with
inputYesInput to send to the job's stdin

Output Schema

ParametersJSON Schema
NameRequiredDescription
stderrYesStandard error content
stdoutYesStandard output content

TDQS

A3.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions sending input and returning immediate output, but lacks details on behavioral traits such as whether this requires specific job states (e.g., running), if it blocks until output is available, potential rate limits, or error handling. For a tool that interacts with processes, this is a significant gap in transparency.

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 purpose in the first sentence, followed by structured sections for Args and Returns. Each sentence earns its place by clarifying parameters and return values without redundancy, making it efficient and well-organized.

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?

Given the complexity of job interaction, no annotations, and an output schema (implied by 'Returns' section), the description is mostly complete. It covers purpose, parameters, and return values, but lacks behavioral context like job state requirements or error scenarios, which would be beneficial for full completeness.

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 both parameters (job_id and input) with descriptions. The description adds minimal value beyond the schema by reiterating that job_id is a UUID and input is text for stdin, but doesn't provide additional semantics like format constraints or examples. Baseline 3 is appropriate as the schema does the heavy lifting.

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 clearly states the specific action ('Send input to a job's stdin') and resource ('a job'), distinguishing it from siblings like get_job_output (which retrieves output without sending input) or kill_job (which terminates a job). The verb 'send' and resource 'job's stdin' are precise and unambiguous.

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 implies usage context by specifying 'send input to a job's stdin,' suggesting it's for interacting with an active job, but it doesn't explicitly state when to use this versus alternatives like get_job_output (for reading output without input) or execute_command (for starting new jobs). No exclusions or prerequisites are mentioned, though the context is clear.

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

kill_jobA

Kill a running background job.

Args: job_id: The UUID of the job to terminate

Returns: KillOutput indicating the result of the kill operation

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID to kill

Output Schema

ParametersJSON Schema
NameRequiredDescription
statusYesKill result: 'killed', 'already_terminated', or 'not_found'

TDQS

A3.7/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is to 'terminate' a job, implying a destructive operation, but doesn't clarify critical aspects like whether the kill is reversible, what permissions are required, or potential side effects (e.g., data loss). This leaves significant gaps for a mutation tool.

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 highly concise and well-structured: a clear purpose statement followed by brief sections for Args and Returns. Every sentence earns its place, with no redundant information, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's complexity (a destructive operation) and the presence of an output schema (which handles return values), the description is moderately complete. It covers the basic purpose and parameter, but lacks behavioral details like safety warnings or prerequisites, which are important for a kill operation with no annotations.

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?

The schema description coverage is 100%, so the schema already documents the job_id parameter. The description adds minimal value by restating it as 'The UUID of the job to terminate', which slightly reinforces the parameter's purpose but doesn't provide additional syntax or format details 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 clearly states the specific action ('Kill') and target resource ('a running background job'), distinguishing it from sibling tools like get_job_status, list_jobs, or get_job_output. It precisely communicates the tool's function without ambiguity.

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?

The description implies usage context by specifying 'a running background job', suggesting this tool is for active jobs rather than completed ones. However, it lacks explicit guidance on when to use it versus alternatives like interact_with_job or when not to use it (e.g., for non-running jobs).

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

list_jobsA

List all background jobs with their status.

Returns a list of all background jobs, including their job ID, status, command, and start time. Jobs are sorted by start time (newest first).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
jobsYesList of all background jobs

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: returns a list with specific fields (job ID, status, command, start time) and sorting by start time (newest first). However, it lacks details on pagination, rate limits, or error handling, which are relevant for a list operation.

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 purpose in the first sentence, followed by specific details in a second sentence. Every sentence adds value: the first defines the action, and the second clarifies output format and sorting. No wasted words.

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?

Given the tool's low complexity (0 parameters, output schema exists), the description is mostly complete. It covers purpose, output fields, and sorting. However, with no annotations, it could benefit from mentioning any limitations (e.g., large result sets) or prerequisites, though the output schema may handle return values.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately adds no parameter information, focusing on output semantics instead. Baseline is 4 for zero parameters, as it avoids unnecessary details.

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 clearly states the specific verb ('List') and resource ('all background jobs'), and distinguishes from siblings by focusing on comprehensive listing rather than individual job operations like get_job_status or kill_job. It specifies the scope includes all jobs with their status.

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 implies usage for viewing all jobs, which contrasts with siblings that target specific jobs (e.g., get_job_status, kill_job). However, it does not explicitly state when to use this tool versus alternatives like get_job_status for individual checks, leaving some ambiguity.

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

tail_job_outputA

Get the last N lines of stdout and stderr from a job.

Args: job_id: The UUID of the job to tail lines: Number of lines to return (1-1000, default 50)

Returns: ProcessOutput containing the last N lines of stdout and stderr

ParametersJSON Schema
NameRequiredDescriptionDefault
job_idYesJob ID to tail
linesNoNumber of lines to return

Output Schema

ParametersJSON Schema
NameRequiredDescription
stderrYesStandard error content
stdoutYesStandard output content

TDQS

A4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the tool's read-only nature (implied by 'Get') and the lines parameter constraints (1-1000, default 50), but lacks details on permissions, rate limits, error conditions, or whether the job must be active. It adds some behavioral context but is incomplete for a tool that interacts with job execution.

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 purpose, followed by structured Args and Returns sections. Every sentence earns its place by providing essential information without redundancy. The formatting is clear and efficient, making it easy to parse quickly.

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?

Given the tool's moderate complexity (2 parameters, job interaction), no annotations, and the presence of an output schema (Returns section), the description is mostly complete. It covers purpose, parameters, and return values, but lacks behavioral details like error handling or job state requirements, which would be beneficial for full contextual understanding.

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 description coverage is 100%, so the baseline is 3. The description adds value by clarifying that 'lines' refers to 'Number of lines to return' for both stdout and stderr, and specifies the range (1-1000) and default (50), which enhances understanding beyond the schema's basic documentation. However, it does not explain the 'job_id' parameter further.

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 clearly states the specific action ('Get the last N lines') and resource ('stdout and stderr from a job'), distinguishing it from siblings like get_job_output (likely full output) and get_job_status (status only). The verb 'tail' is precise and matches the tool name, providing immediate understanding of its function.

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?

The description implies usage for viewing recent job output, but does not explicitly state when to use this tool versus alternatives like get_job_output or get_job_status. No guidance is provided on prerequisites, such as needing a running or completed job, or exclusions for when not to use it.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 7 tool updates
    • First observedexecute_command
    • First observedget_job_output
    • First observedget_job_status
    • First observedinteract_with_job
    • First observedkill_job
    • First observedlist_jobs
    • First observedtail_job_output

TDQS

A4.2/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no ambiguity: execute_command starts jobs, get_job_output retrieves full output, get_job_status checks status, interact_with_job sends input, kill_job terminates jobs, list_jobs enumerates all jobs, and tail_job_output gets recent output. The tools cover different aspects of job management without overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case: execute_command, get_job_output, get_job_status, interact_with_job, kill_job, list_jobs, and tail_job_output. The naming is predictable and readable throughout the set.

Tool Count5/5

With 7 tools, the count is well-scoped for a background job server. Each tool earns its place by covering essential operations like starting, monitoring, interacting with, and managing jobs, without being overly sparse or bloated.

Completeness5/5

The tool set provides complete lifecycle coverage for background jobs: execute_command (create), get_job_status/get_job_output/tail_job_output/interact_with_job (read/update), kill_job (delete), and list_jobs (list). No obvious gaps exist for the domain, enabling full agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    MCP server for managing interactive processes, enabling AI agents to start, interact with, and terminate long-running programs like SSH sessions, REPLs, and installers via read/write operations.
    8
    8
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    A secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.
    13
    704
    6
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    An MCP server that allows AI assistants to manage background processes, enabling start, stop, monitoring, and querying of long-running shell commands without blocking the conversation.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-first MCP server and CLI wrapper for AI coding agents. SAGE routes shell commands through a tracked local runner, stores command history on the user’s machine, and returns compressed terminal output to reduce noisy context.
    16
    10
    MIT