Tasks in tasks.json have the following structure:
| Field | Description | Example |
|---|---|---|
id |
Unique identifier for the task. | 1 |
title |
Brief, descriptive title. | "Initialize Repo" |
description |
What the task involves. | "Create a new repository, set up initial structure." |
status |
Current state. | "pending", "done", "deferred" |
dependencies |
Prerequisite task IDs. | [1, 2] |
priority |
Task importance. | "high", "medium", "low" |
details |
Implementation instructions. | "Use GitHub client ID/secret, handle callback..." |
testStrategy |
How to verify success. | "Deploy and confirm 'Hello World' response." |
subtasks |
Nested subtasks related to the main task. | [{"id": 1, "title": "Configure OAuth", ...}] |
metadata |
Optional user-defined data (see below). | {"githubIssue": 42, "sprint": "Q1-S3"} |
Individual task files follow this format:
# Task ID: <id>
# Title: <title>
# Status: <status>
# Dependencies: <comma-separated list of dependency IDs>
# Priority: <priority>
# Description: <brief description>
# Details:
<detailed implementation notes>
# Test Strategy:
<verification approach>
The metadata field allows you to store arbitrary custom data on tasks without requiring schema changes. This is useful for:
Fully Optional — The field is optional. Existing tasks work without it.
AI-Safe — AI operations preserve your metadata — it's never overwritten by AI.
Flexible Schema — Store any JSON-serializable data: strings, numbers, objects, arrays.
Subtask Support — Both tasks and subtasks can have their own metadata.
GitHub Issue Linking
{
"id": 1,
"title": "Implement authentication",
"metadata": {
"githubIssue": 42,
"githubIssueUrl": "https://github.com/org/repo/issues/42"
}
}
Sprint & Project Management
{
"id": 2,
"title": "Refactor API endpoints",
"metadata": {
"sprint": "Q1-S3",
"storyPoints": 5,
"epic": "API Modernization"
}
}
External System Integration
{
"id": 3,
"title": "Fix login bug",
"metadata": {
"jira": {
"key": "PROJ-123",
"type": "bug",
"priority": "P1"
},
"importedAt": "2024-01-15T10:30:00Z",
"lastSyncedAt": "2024-01-20T14:00:00Z"
}
}
Stable UUID Tracking
{
"id": 4,
"title": "Add user preferences",
"metadata": {
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"version": 2,
"createdBy": "import-script"
}
}
Do not store secrets, API keys, or sensitive credentials in the metadata field. Task data may be visible in logs, exports, or shared with AI providers.
| Operation | Metadata Behavior |
|---|---|
parse-prd |
New tasks are created without metadata |
update-task |
Existing metadata is preserved unless explicitly changed |
expand |
Parent task metadata is preserved; subtasks don't inherit it |
update-subtask |
Subtask metadata is preserved |
| Manual edit | You can add/modify metadata directly in tasks.json |
| MCP (with flag) | Use the metadata parameter to explicitly update metadata |
The update_task and update_subtask MCP tools support a metadata parameter for updating task metadata. This feature is disabled by default for safety.
To enable MCP metadata updates:
Add TASK_MASTER_ALLOW_METADATA_UPDATES=true to your MCP server environment configuration in .mcp.json:
{
"mcpServers": {
"task-master-ai": {
"command": "npx",
"args": ["-y", "task-master-ai"],
"env": {
"TASK_MASTER_ALLOW_METADATA_UPDATES": "true",
"ANTHROPIC_API_KEY": "your_key_here"
}
}
}
}
Usage example:
// Update task metadata (merges with existing)
update_task({
id: "1",
projectRoot: "/path/to/project",
metadata: '{"githubIssue": 42, "sprint": "Q1-S3"}'
})
// Update only metadata (no prompt required)
update_task({
id: "1",
projectRoot: "/path/to/project",
metadata: '{"status": "reviewed"}'
})
The metadata parameter accepts a JSON string. The new metadata is merged with existing metadata, allowing you to update specific fields without losing others.
The analyze-complexity command:
The generated report contains:
The complexity-report command:
The expand command automatically checks for and uses the complexity report:
When a complexity report exists:
Example workflow:
# Generate the complexity analysis report with research capabilities
task-master analyze-complexity --research
# Review the report in a readable format
task-master complexity-report
# Expand tasks using the optimized recommendations
task-master expand --id=8
# or expand all tasks
task-master expand --all
The next command:
The show command: