Skip to main content
Glama
nanoseil
by nanoseil

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")}`, }, ], }; } } );

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