Skip to main content
Glama
nanoseil

MCP Background Task Server

by nanoseil

List Background Tasks

list-background-tasks

View all active background tasks like development servers and builds managed by the MCP Background Task Server.

Instructions

Lists all currently running background tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the tool logic: checks if there are any running background tasks and either returns a message indicating none are running or lists all tasks with their name, PID, and state.
    async () => {
      if (processes.size === 0) {
        return {
          content: [
            {
              type: "text",
              text: "No background tasks are currently running.",
            },
          ],
        };
      } else {
        const tasks = Array.from(processes.entries()).map(([name, child]) => ({
          name,
          pid: child.getPid(),
          state: child.getState(),
        }));
        return {
          content: [
            {
              type: "text",
              text: `Currently running tasks:\n${tasks
                .map(
                  (task) =>
                    `- ${task.name} (PID: ${task.pid}, State: ${task.state})`
                )
                .join("\n")}`,
            },
          ],
        };
      }
    }
  • The input schema definition for the tool, which requires no parameters (empty inputSchema), along with title and description.
    {
      title: "List Background Tasks",
      description: "Lists all currently running background tasks.",
      inputSchema: {},
    },
  • src/index.ts:141-179 (registration)
    The server.registerTool call that registers the 'list-background-tasks' tool, providing its name, schema, and handler function.
    server.registerTool(
      "list-background-tasks",
      {
        title: "List Background Tasks",
        description: "Lists all currently running background tasks.",
        inputSchema: {},
      },
      async () => {
        if (processes.size === 0) {
          return {
            content: [
              {
                type: "text",
                text: "No background tasks are currently running.",
              },
            ],
          };
        } else {
          const tasks = Array.from(processes.entries()).map(([name, child]) => ({
            name,
            pid: child.getPid(),
            state: child.getState(),
          }));
          return {
            content: [
              {
                type: "text",
                text: `Currently running tasks:\n${tasks
                  .map(
                    (task) =>
                      `- ${task.name} (PID: ${task.pid}, State: ${task.state})`
                  )
                  .join("\n")}`,
              },
            ],
          };
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits like pagination, rate limits, permissions required, or output format. It fails to add meaningful context beyond the minimal purpose, leaving critical operational details unspecified.

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 a single, efficient sentence that front-loads the core purpose without any wasted words. It is appropriately sized for a simple tool with no parameters, earning its place by directly stating the tool's function.

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

Completeness2/5

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

Given the tool's complexity (listing tasks) and lack of annotations or output schema, the description is incomplete. It does not explain what information is returned (e.g., task IDs, statuses), how results are structured, or any limitations, leaving significant gaps for an AI agent to use it effectively.

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 omits parameter details, aligning with the schema's completeness. A baseline of 4 is applied as it correctly avoids redundancy while maintaining clarity.

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 ('Lists') and resource ('all currently running background tasks'), distinguishing it from siblings like get-task-stderr (retrieves error output) or run-background-task (initiates tasks). It precisely communicates the tool's function without redundancy.

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 monitoring active tasks but provides no explicit guidance on when to use this tool versus alternatives (e.g., to check task status vs. retrieving logs). It lacks context on prerequisites or exclusions, leaving usage inferred rather than clearly defined.

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/nanoseil/mcp-bgtask'

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