Skip to main content
Glama

export_task_status

Export task status reports from TaskFlow MCP to files in markdown, JSON, or HTML formats for documentation and tracking purposes.

Instructions

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

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

You can specify:

  • 'format': 'markdown', 'json', or 'html'

  • 'outputPath': Full path to save the file, or just a directory path

  • 'filename': Optional custom filename (auto-generated if not provided)

Path handling:

  • If outputPath is a directory, filename will be auto-generated as '{project-name}_tasks.{ext}'

  • If outputPath includes filename, it will be used as-is

  • Relative paths are resolved from current working directory

  • If no path specified, saves to current working directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
outputPathNoDirectory or full file path where to save the export
filenameNoOptional custom filename (auto-generated if not provided)
formatNomarkdown

Implementation Reference

  • MCP tool handler that extracts arguments and delegates to TaskFlowService.exportTaskStatus method.
    async export_task_status(args: any) {
      const { requestId, outputPath, filename, format } = args ?? {};
      return service.exportTaskStatus(String(requestId), outputPath, filename, format);
    },
  • Core business logic for exporting task status: finds request, resolves file path, generates content based on format (markdown, json, html), creates directory if needed, writes file, returns path.
    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}`);
      }
    }
  • Input schema used by the tool for parameter validation, including descriptions and default for format.
    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"],
    },
  • Registration of the tool in the MCP server's listTools handler, making it discoverable.
    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,
      ],
    }));
  • Tool specification object defining name, detailed description, and input schema, exported for use in 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"],
      },
    };
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it creates a file output (write operation), explains path resolution logic (directory vs. full path, relative paths), and describes auto-generation rules for filenames. It doesn't mention error conditions, permissions needed, or rate limits, but covers substantial operational behavior.

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 well-structured and front-loaded with the core purpose in the first sentence. Each subsequent sentence adds specific value: what gets saved, parameter explanations, and path handling rules. There's zero wasted text, and the bullet points enhance readability without verbosity.

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

Completeness4/5

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

For a tool with 4 parameters, no annotations, and no output schema, the description provides strong coverage of inputs, behavior, and output format options. It lacks details on error cases, exact file naming conventions (beyond extension), and what the exported content structurally contains, but it's largely complete for practical use given the context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (2 of 4 parameters have descriptions). The description compensates effectively by explaining all parameters: it clarifies 'format' options, distinguishes 'outputPath' usage (directory vs. file), explains 'filename' auto-generation, and implies 'requestId' is required (though not explicitly stated). This adds meaningful context beyond the schema's limited descriptions.

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?

The description clearly states the tool's purpose with specific verbs ('Export', 'saves') and resources ('current status of all tasks in a request', 'tasks, subtasks, dependencies, and notes'), distinguishing it from sibling tools that focus on individual operations like add/delete/update tasks or notes. It explicitly identifies what gets exported and to what format.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: to save task status for reference. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools (e.g., list_requests for overview vs. this for detailed export), though the context implies it's for archival/reference purposes rather than real-time querying.

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