Skip to main content
Glama
rwese
by rwese

done

Mark backlog items as complete and optionally add completion summaries to track work progress in the MCP Backlog Server.

Instructions

Mark backlog items as complete with optional summary - done operation and list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoOperation to perform (default: done)
topicNoTopic name (required for done)
summaryNoOptional completion summary describing what was accomplished, lessons learned, or final notes
statusNoStatus filter for list operation
priorityNoPriority filter for list operation

Implementation Reference

  • Core handler function that implements the 'done' tool logic: locates the backlog item, updates its status to 'done' or 'wontfix' based on content, adds completion metadata and optional summary, archives it to the completed directory, and removes it from the active backlog.
    async function handleDone(args: any, context: any) {
      const { topic, summary } = args;
    
      if (!topic) {
        throw new Error("topic is required for done action");
      }
    
      const filename = topic
        .toLowerCase()
        .replace(/\s+/g, "-")
        .replace(/[^a-z0-9-]/g, "");
      const backlogDir = getBacklogDir();
      const filepath = `${backlogDir}/${filename}/item.md`;
      const legacyPath = `${backlogDir}/${filename}.md`;
    
       let actualPath: string | null = null;
       const newExists = await fileExists(filepath);
       const legacyExists = await fileExists(legacyPath);
       
       if (newExists) {
         actualPath = filepath;
       } else if (legacyExists) {
         actualPath = legacyPath;
       } else {
         throw new Error(`Backlog item not found for topic: ${topic}`);
       }
    
       let content = await readFile(actualPath, 'utf8');
      
      let finalStatus = 'done';
      if (content.startsWith('---\n')) {
        const statusMatch = content.match(/status: (wontfix|done)/);
        if (statusMatch) {
          finalStatus = statusMatch[1];
        }
      }
    
      if (content.startsWith('---\n')) {
        content = content.replace(/status: .*/, `status: ${finalStatus}`);
      } else {
        content = content.replace(/## Status: .*/, `## Status: ${finalStatus}`);
      }
    
      const timestamp = new Date().toISOString();
      let completionSection = `\n## Completed\n- Date: ${timestamp}\n- Agent: ${context.agent}\n- Session: ${context.sessionID}\n`;
      
      if (summary) {
        completionSection += `\n### Summary\n\n${summary}\n`;
      }
    
      content = content.replace(/\n---\n/, `${completionSection}\n---\n`);
    
       const prefix = finalStatus === 'wontfix' ? 'WONTFIX' : 'DONE';
       const completedDir = getCompletedBacklogDir();
       const completedPath = `${completedDir}/${prefix}_${filename}.md`;
       await writeFile(completedPath, content, 'utf8');
    
      if (actualPath === filepath) {
        const dirpath = `${backlogDir}/${filename}`;
        rmSync(dirpath, { recursive: true, force: true });
      } else {
        unlinkSync(actualPath);
      }
    
      return `Marked backlog item as ${finalStatus}: ${completedPath}${summary ? ' (with summary)' : ''}`;
    }
  • Input schema and metadata for the 'done' tool as returned in ListTools response.
      name: "done",
      description: "Mark backlog items as complete with optional summary - done operation and list",
      inputSchema: {
        type: "object",
        properties: {
          action: {
            type: "string",
            enum: ["done", "list"],
            description: "Operation to perform (default: done)",
          },
          topic: {
            type: "string",
            description: "Topic name (required for done)",
          },
          summary: {
            type: "string",
            description: "Optional completion summary describing what was accomplished, lessons learned, or final notes",
          },
          status: {
            type: "string",
            enum: ["new", "ready", "review", "done", "reopen", "wontfix"],
            description: "Status filter for list operation",
          },
          priority: {
            type: "string",
            enum: ["high", "medium", "low"],
            description: "Priority filter for list operation",
          },
        },
      },
    },
  • src/index.ts:834-836 (registration)
    Registration of the 'done' tool handler in the MCP CallToolRequestSchema switch statement, delegating to handleBacklogDone.
    case "done":
      result = await handleBacklogDone(request.params.arguments, context);
      break;
  • Dispatcher handler for the 'done' tool that routes 'done' action to handleDone and 'list' to listBacklogItems.
    // Backlog Done Handler
    async function handleBacklogDone(args: any, context: any) {
      const action = args.action || "done";
    
      switch (action) {
        case "done":
          return await handleDone(args, context);
        case "list":
          return await listBacklogItems(args);
        default:
          throw new Error(`Unknown action: ${action}`);
      }
    }
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 of behavioral disclosure. While it mentions the tool can 'mark backlog items as complete' (implying a mutation) and 'list', it doesn't describe what 'complete' means in this context, whether changes are reversible, what permissions are required, or what the response looks like. For a tool with mutation capabilities and no annotation coverage, this is a significant gap in behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the main purpose. The two-part structure ('mark backlog items as complete with optional summary' and '- done operation and list') is efficient, though the dash separator is slightly awkward. Every phrase adds value, and there's no redundant information.

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 (5 parameters, mutation capability, no output schema, and no annotations), the description is incomplete. It doesn't explain the relationship between 'done' and 'list' operations, what 'backlog items' refer to, or how the tool interacts with siblings. For a tool that both mutates data and lists items, more context is needed to guide effective use.

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 all 5 parameters with descriptions and enums. The description adds minimal value beyond the schema by implying that 'topic' is required for the 'done' action and that 'summary' is optional for completion, but it doesn't provide additional context like format examples or dependencies between parameters. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Mark backlog items as complete with optional summary - done operation and list'. This specifies the verb ('mark as complete'), resource ('backlog items'), and scope ('done operation and list'). However, it doesn't explicitly distinguish this tool from its siblings like 'todo-done' or 'write', which likely have overlapping functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'todo-done', 'read', 'write', 'todo-read', and 'todo-write', there's no indication of which tool to choose for specific scenarios. The description mentions both 'done' and 'list' operations but doesn't clarify when to use each or their relationship to other tools.

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/rwese/mcp-backlog'

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