Skip to main content
Glama

backlog_delete

Permanently remove a task from the backlog by specifying its ID to manage task completion and maintain an organized workflow.

Instructions

Delete an item permanently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTask ID to delete

Implementation Reference

  • Main handler implementation for backlog_delete tool. Registers the tool with the MCP server, defines the input schema (requiring an 'id' string parameter), and executes the delete operation by calling storage.delete(id) and returning a confirmation message.
    export function registerBacklogDeleteTool(server: McpServer) {
      server.registerTool(
        'backlog_delete',
        {
          description: 'Delete an item permanently.',
          inputSchema: z.object({
            id: z.string().describe('Task ID to delete'),
          }),
        },
        async ({ id }) => {
          storage.delete(id);
          return { content: [{ type: 'text', text: `Deleted ${id}` }] };
        }
      );
    }
  • Registration of backlog_delete tool. Imports registerBacklogDeleteTool and calls it within the registerTools function to make the tool available on the MCP server.
    import { registerBacklogDeleteTool } from './backlog-delete.js';
    import { registerBacklogSearchTool } from './backlog-search.js';
    import { registerBacklogContextTool } from './backlog-context.js';
    
    export function registerTools(server: McpServer) {
      registerBacklogListTool(server);
      registerBacklogGetTool(server);
      registerBacklogCreateTool(server);
      registerBacklogUpdateTool(server);
      registerBacklogDeleteTool(server);
  • Storage delete implementation. The delete method performs the actual deletion from TaskStorage and removes the document from the search index if search is ready. Returns a boolean indicating success.
    delete(id: string): boolean {
      const deleted = this.taskStorage.delete(id);
      if (deleted && this.searchReady) this.search.removeDocument(id);
      return deleted;
    }
  • Type definition for backlog_delete as part of the ToolName union type, which includes all write tools (backlog_create, backlog_update, backlog_delete, write_resource).
    export type ToolName = 'backlog_create' | 'backlog_update' | 'backlog_delete' | 'write_resource';
  • Middleware event mapping for backlog_delete. Maps the tool to the 'task_deleted' event type, which is emitted via the event bus when the tool executes to notify subscribers of the deletion.
    const TOOL_EVENT_MAP: Record<ToolName, BacklogEventType> = {
      backlog_create: 'task_created',
      backlog_update: 'task_changed',
      backlog_delete: 'task_deleted',
      write_resource: 'resource_changed',
    };

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

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