Skip to main content
Glama

next_task

Retrieve and mark the next highest priority task as in-progress using the MCP Think Tank server, ensuring efficient task management and focused execution.

Instructions

Get the next highest priority todo task and mark it as in-progress.

Input Schema

NameRequiredDescriptionDefault
random_stringNoDummy parameter for no-parameter tools

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "random_string": { "description": "Dummy parameter for no-parameter tools", "type": "string" } }, "type": "object" }

Implementation Reference

  • The execute handler for the next_task tool. Retrieves the highest priority 'todo' task from taskStorage, marks it as 'in-progress', and returns the updated task.
    execute: async () => { try { const nextTask = taskStorage.getHighestPriority("todo"); if (!nextTask) { return JSON.stringify({ message: "No todo tasks found", task: null }); } // Update task status to in-progress const updatedTask = taskStorage.update(nextTask.id, { status: "in-progress" }); return JSON.stringify({ task: updatedTask, message: "Task marked as in-progress" }); } catch (error) { return JSON.stringify({ error: `Failed to get next task: ${error instanceof Error ? error.message : String(error)}` }); } }
  • Registers the 'next_task' tool with the FastMCP server instance in the registerTaskTools function.
    server.addTool({ name: "next_task", description: "Get the next highest priority todo task and mark it as in-progress.", execute: async () => { try { const nextTask = taskStorage.getHighestPriority("todo"); if (!nextTask) { return JSON.stringify({ message: "No todo tasks found", task: null }); } // Update task status to in-progress const updatedTask = taskStorage.update(nextTask.id, { status: "in-progress" }); return JSON.stringify({ task: updatedTask, message: "Task marked as in-progress" }); } catch (error) { return JSON.stringify({ error: `Failed to get next task: ${error instanceof Error ? error.message : String(error)}` }); } } });

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/flight505/mcp-think-tank'

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