Skip to main content
Glama

export_task_status

Save the status of all tasks in a request to a file in markdown, JSON, or HTML format. Track task details, subtasks, dependencies, and notes for reference by exporting to a specified output path.

Instructions

Export the current status of all tasks in a request to a file.

This tool allows you to save the current state of tasks, subtasks, dependencies, and notes to a file for reference.

You can specify the output format as 'markdown', 'json', or 'html'.

It's recommended to use absolute paths (e.g., 'C:/Users/username/Documents/task-status.md') rather than relative paths for more reliable file creation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNomarkdown
outputPathYes
requestIdYes

Implementation Reference

  • The main handler function for the 'export_task_status' tool. It extracts arguments and delegates to the TaskFlowService.exportTaskStatus method.
    async export_task_status(args: any) { const { requestId, outputPath, filename, format } = args ?? {}; return service.exportTaskStatus(String(requestId), outputPath, filename, format); },
  • JSON Schema definition for the 'export_task_status' tool input validation.
    export_task_status: { type: "object", properties: { requestId: { type: "string" }, format: { type: "string", enum: ["markdown", "json", "html"] }, outputPath: { type: "string" }, filename: { type: "string" }, }, required: ["requestId"], },
  • Registration of the 'export_task_status' tool (via EXPORT_TASK_STATUS_TOOL) in the MCP server's list of available tools.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ PLAN_TASK_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ADD_SUBTASKS_TOOL, MARK_SUBTASK_DONE_TOOL, UPDATE_SUBTASK_TOOL, DELETE_SUBTASK_TOOL, EXPORT_TASK_STATUS_TOOL, ADD_NOTE_TOOL, UPDATE_NOTE_TOOL, DELETE_NOTE_TOOL, ADD_DEPENDENCY_TOOL, GET_PROMPTS_TOOL, SET_PROMPTS_TOOL, UPDATE_PROMPTS_TOOL, REMOVE_PROMPTS_TOOL, ARCHIVE_COMPLETED_REQUESTS_TOOL, LIST_ARCHIVED_REQUESTS_TOOL, RESTORE_ARCHIVED_REQUEST_TOOL, ], }));
  • Core service method implementing the task status export logic, supporting markdown, json, and html formats.
    public async exportTaskStatus( requestId: string, outputPath?: string, filename?: string, format: "markdown" | "json" | "html" = "markdown" ): Promise<{ outputPath: string; format: string }> { const req = this.data.requests.find((r) => r.requestId === requestId); if (!req) throw new Error("Request not found"); const finalPath = await resolveExportPath(req, outputPath, filename, format); let content = ""; switch (format) { case "markdown": content = generateMarkdownStatus(req); break; case "json": content = JSON.stringify(req, null, 2); break; case "html": content = generateHtmlStatus(req); break; default: throw new Error(`Unsupported format: ${format}`); } try { const dir = path.dirname(finalPath); await fs.mkdir(dir, { recursive: true }); await fs.writeFile(finalPath, content, "utf-8"); return { outputPath: finalPath, format }; } catch (error: unknown) { console.error(`Error writing to file ${finalPath}:`, error); const msg = error instanceof Error ? error.message : String(error); throw new Error(`Failed to write to file ${finalPath}: ${msg}`); } }
  • Tool definition object (EXPORT_TASK_STATUS_TOOL) including name, description, and inputSchema, exported for server registration.
    export const EXPORT_TASK_STATUS_TOOL: Tool = { name: "export_task_status", description: "Export the current status of all tasks in a request to a file.\n\n" + "This tool saves the current state of tasks, subtasks, dependencies, and notes to a file for reference.\n\n" + "You can specify:\n" + "- 'format': 'markdown', 'json', or 'html'\n" + "- 'outputPath': Full path to save the file, or just a directory path\n" + "- 'filename': Optional custom filename (auto-generated if not provided)\n\n" + "Path handling:\n" + "- If outputPath is a directory, filename will be auto-generated as '{project-name}_tasks.{ext}'\n" + "- If outputPath includes filename, it will be used as-is\n" + "- Relative paths are resolved from current working directory\n" + "- If no path specified, saves to current working directory", inputSchema: { type: "object", properties: { requestId: { type: "string" }, outputPath: { type: "string", description: "Directory or full file path where to save the export" }, filename: { type: "string", description: "Optional custom filename (auto-generated if not provided)" }, format: { type: "string", enum: ["markdown", "json", "html"], default: "markdown" }, }, required: ["requestId"], }, };

Other Tools

Related 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