Skip to main content
Glama

restore_archived_request

Restore archived requests to active status in TaskFlow MCP, allowing continued work on previously archived tasks by moving them back to the active tasks file.

Instructions

Restore a specific archived request back to the active tasks file.

This moves the request from the archive back to active status, allowing you to continue working on it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYesThe ID of the archived request to restore

Implementation Reference

  • The main handler function for the 'restore_archived_request' tool. It extracts the requestId from args and delegates to the TaskFlowService.restoreArchivedRequest method.
    async restore_archived_request(args: any) {
      const { requestId } = args ?? {};
      return service.restoreArchivedRequest(String(requestId));
    },
  • Tool schema definition including name, description, and inputSchema requiring 'requestId'.
    export const RESTORE_ARCHIVED_REQUEST_TOOL: Tool = {
      name: "restore_archived_request",
      description:
        "Restore a specific archived request back to the active tasks file.\n\n" +
        "This moves the request from the archive back to active status, allowing you to continue working on it.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: {
            type: "string",
            description: "The ID of the archived request to restore"
          },
        },
        required: ["requestId"],
      },
    };
  • The tool is registered in the server's list of tools returned by ListToolsRequestSchema handler.
      RESTORE_ARCHIVED_REQUEST_TOOL,
    ],
  • The core service method that implements the restoration logic: loads archive and tasks, finds the archived request, validates, converts to active format (sets completed=false), adds to active tasks, removes from archive, and saves both files.
    public async restoreArchivedRequest(requestId: string) {
      const archive = await this.loadArchive();
      await this.loadTasks();
      
      const archivedIndex = archive.archivedRequests.findIndex(req => req.originalRequestId === requestId);
      if (archivedIndex === -1) {
        return {
          status: "error",
          message: `Archived request with ID ${requestId} not found.`
        };
      }
      
      const archivedRequest = archive.archivedRequests[archivedIndex];
      
      // Check if request ID already exists in active tasks
      if (this.data.requests.some(req => req.requestId === requestId)) {
        return {
          status: "error",
          message: `Request with ID ${requestId} already exists in active tasks.`
        };
      }
      
      // Convert back to active request format
      const restoredRequest: RequestEntry = {
        requestId: archivedRequest.originalRequestId,
        originalRequest: archivedRequest.originalRequest,
        splitDetails: archivedRequest.splitDetails,
        tasks: archivedRequest.tasks,
        completed: false, // Mark as not completed when restored
        dependencies: archivedRequest.dependencies,
        notes: archivedRequest.notes
      };
      
      // Add to active tasks and remove from archive
      this.data.requests.push(restoredRequest);
      archive.archivedRequests.splice(archivedIndex, 1);
      archive.archiveInfo.totalArchivedRequests = archive.archivedRequests.length;
      
      await this.saveTasks();
      await this.saveArchive(archive);
      
      return {
        status: "request_restored",
        restoredRequest: {
          requestId: restoredRequest.requestId,
          originalRequest: restoredRequest.originalRequest,
          tasksCount: restoredRequest.tasks.length
        },
        message: `Request ${requestId} has been restored from archive.`
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the action 'moves the request from the archive back to active status', which implies a mutation but doesn't disclose behavioral traits like permissions needed, whether it's reversible, potential side effects (e.g., impact on dependencies), or response format. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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?

The description is two sentences, front-loaded with the core action ('Restore a specific archived request back to the active tasks file') and followed by a clarifying sentence. Every sentence earns its place by explaining the purpose and effect without redundancy or fluff, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter with full schema coverage but no annotations or output schema, the description is moderately complete. It explains what the tool does but lacks details on behavioral aspects (e.g., success/failure outcomes, error conditions) and doesn't leverage the sibling context to guide usage more precisely. For a mutation tool, this leaves room for improvement in completeness.

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%, with the single parameter 'requestId' documented as 'The ID of the archived request to restore'. The description adds no additional parameter semantics beyond this, such as format examples or constraints. With high schema coverage, the baseline is 3, as the description doesn't compensate but also doesn't detract.

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 verb 'restore' and resource 'archived request', specifying it moves the request 'back to active status'. It distinguishes from siblings like 'archive_completed_requests' and 'list_archived_requests' by focusing on restoration rather than archiving or listing. However, it doesn't explicitly contrast with 'list_requests' (which might show active requests) or other task management tools, keeping it from a perfect score.

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

Usage Guidelines3/5

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

The description implies usage when you need to 'continue working on' an archived request, suggesting it's for reactivation. However, it lacks explicit guidance on when to use this versus alternatives like creating new tasks or using other request tools, and doesn't mention prerequisites (e.g., the request must be archived first). This leaves some ambiguity in context.

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/pinkpixel-dev/taskflow-mcp'

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