Skip to main content
Glama

get_next_task

Fetch the next pending task from a project's work queue, activate it, and obtain task details with PRD context to pick up work where you left off.

Instructions

Get the next pending task for a project and mark it active.

Fetches the lowest-sequence pending task from the project_tasks queue, sets its status to 'active', and returns the task details plus a brief from the linked PRD memory.

NOTE: project_tasks is a structured work queue — separate from recall_memories todos. Tasks are created explicitly via the task management workflow, not auto-populated from saved conversations. If this returns "no pending tasks", the project queue is empty — use recall_memories to find work items in saved conversations instead.

Call this at the start of a work session to pick up where you left off. When done, call complete_task({ task_id, verification_summary }) to close the loop.

RETURNS:

  • task.id — use this in complete_task

  • task.sequence — task order number

  • task.title — what to do

  • task.description — how to do it

  • task.acceptance_criteria — how to know it's done

  • task.context_brief — first 500 chars of the PRD for context

  • task.total_remaining — pending tasks left (including this one)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_nameYesThe project name to fetch the next task for (e.g. "purmemo")
Behavior5/5

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

Discloses state change (marks task active), mentions the structured queue nature, and that tasks are created explicitly. Annotations indicate readOnlyHint=false and no destructiveHint, consistent with description. No contradictions.

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?

Well-structured with sections, bullet points for return values. Front-loaded with main purpose. No unnecessary sentences.

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?

Given no output schema, description explicitly lists all return fields. Covers context, usage, side effects, error case. Complete for a task fetching/updating tool.

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 coverage is 100% with description for project_name. Description adds minimal value beyond schema (example value 'purmemo'). Baseline 3 appropriate.

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?

Clearly states 'Get the next pending task for a project and mark it active.' Specifies verb (get), resource (next pending task), and scope (for a project). Distinguishes from sibling tools like complete_task and recall_memories.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: call at start of work session, use recall_memories if no pending tasks, and call complete_task after finishing. Clearly distinguishes from recall_memories as alternative for finding work items.

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/purmemo-ai/purmemo-mcp'

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