chore/doc: renames list-tasks to get-tasks and show-tasks to get-tasks in the mcp tools to follow api conventions and likely natural language used (get my tasks). also updates changeset.
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
- Adjusts the MCP server invokation in the mcp.json we ship with `task-master init`. Fully functional now.
|
- Adjusts the MCP server invokation in the mcp.json we ship with `task-master init`. Fully functional now.
|
||||||
|
|
||||||
|
- Rename MCP tools to better align with API conventions and natural language in client chat:
|
||||||
|
- Rename `list-tasks` to `get-tasks` for more intuitive client requests like "get my tasks"
|
||||||
|
- Rename `show-task` to `get-task` for consistency with GET-based API naming conventions
|
||||||
|
|
||||||
- Implement robust project root detection with a hierarchical precedence system:
|
- Implement robust project root detection with a hierarchical precedence system:
|
||||||
- Environment variable override (TASK_MASTER_PROJECT_ROOT)
|
- Environment variable override (TASK_MASTER_PROJECT_ROOT)
|
||||||
- Explicitly provided project root (--project-root parameter)
|
- Explicitly provided project root (--project-root parameter)
|
||||||
@@ -31,7 +35,7 @@
|
|||||||
- Implement update-subtask MCP command for appending information to specific subtasks
|
- Implement update-subtask MCP command for appending information to specific subtasks
|
||||||
- Implement generate MCP command for creating individual task files from tasks.json
|
- Implement generate MCP command for creating individual task files from tasks.json
|
||||||
- Implement set-status MCP command for updating task status
|
- Implement set-status MCP command for updating task status
|
||||||
- Implement show-task MCP command for displaying detailed task information
|
- Implement get-task MCP command for displaying detailed task information (renamed from show-task)
|
||||||
- Implement next-task MCP command for finding the next task to work on
|
- Implement next-task MCP command for finding the next task to work on
|
||||||
- Implement expand-task MCP command for breaking down tasks into subtasks
|
- Implement expand-task MCP command for breaking down tasks into subtasks
|
||||||
- Implement add-task MCP command for creating new tasks using AI assistance
|
- Implement add-task MCP command for creating new tasks using AI assistance
|
||||||
@@ -45,7 +49,9 @@
|
|||||||
- Implement fix-dependencies MCP command for automatically fixing invalid dependencies
|
- Implement fix-dependencies MCP command for automatically fixing invalid dependencies
|
||||||
- Implement complexity-report MCP command for displaying task complexity analysis reports
|
- Implement complexity-report MCP command for displaying task complexity analysis reports
|
||||||
- Implement add-dependency MCP command for creating dependency relationships between tasks
|
- Implement add-dependency MCP command for creating dependency relationships between tasks
|
||||||
|
- Implement get-tasks MCP command for listing all tasks (renamed from list-tasks)
|
||||||
- Document MCP server naming conventions in architecture.mdc and mcp.mdc files (file names use kebab-case, direct functions use camelCase with Direct suffix, tool registration functions use camelCase with Tool suffix, and MCP tool names use snake_case)
|
- Document MCP server naming conventions in architecture.mdc and mcp.mdc files (file names use kebab-case, direct functions use camelCase with Direct suffix, tool registration functions use camelCase with Tool suffix, and MCP tool names use snake_case)
|
||||||
|
- Update MCP tool naming to follow more intuitive conventions that better align with natural language requests in client chat applications
|
||||||
- Enhance task show view with a color-coded progress bar for visualizing subtask completion percentage
|
- Enhance task show view with a color-coded progress bar for visualizing subtask completion percentage
|
||||||
- Add "cancelled" status to UI module status configurations for marking tasks as cancelled without deletion
|
- Add "cancelled" status to UI module status configurations for marking tasks as cancelled without deletion
|
||||||
- Improve MCP server resource documentation with comprehensive implementation examples and best practices
|
- Improve MCP server resource documentation with comprehensive implementation examples and best practices
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* tools/show-task.js
|
* tools/get-task.js
|
||||||
* Tool to show task details by ID
|
* Tool to get task details by ID
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -11,15 +11,15 @@ import {
|
|||||||
import { showTaskDirect } from "../core/task-master-core.js";
|
import { showTaskDirect } from "../core/task-master-core.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the show-task tool with the MCP server
|
* Register the get-task tool with the MCP server
|
||||||
* @param {Object} server - FastMCP server instance
|
* @param {Object} server - FastMCP server instance
|
||||||
*/
|
*/
|
||||||
export function registerShowTaskTool(server) {
|
export function registerShowTaskTool(server) {
|
||||||
server.addTool({
|
server.addTool({
|
||||||
name: "show_task",
|
name: "get_task",
|
||||||
description: "Display detailed information about a specific task",
|
description: "Get detailed information about a specific task",
|
||||||
parameters: z.object({
|
parameters: z.object({
|
||||||
id: z.string().describe("Task ID to show"),
|
id: z.string().describe("Task ID to get"),
|
||||||
file: z.string().optional().describe("Path to the tasks file"),
|
file: z.string().optional().describe("Path to the tasks file"),
|
||||||
projectRoot: z
|
projectRoot: z
|
||||||
.string()
|
.string()
|
||||||
@@ -30,7 +30,7 @@ export function registerShowTaskTool(server) {
|
|||||||
}),
|
}),
|
||||||
execute: async (args, { log }) => {
|
execute: async (args, { log }) => {
|
||||||
try {
|
try {
|
||||||
log.info(`Showing task details for ID: ${args.id}`);
|
log.info(`Getting task details for ID: ${args.id}`);
|
||||||
|
|
||||||
// Call the direct function wrapper
|
// Call the direct function wrapper
|
||||||
const result = await showTaskDirect(args, log);
|
const result = await showTaskDirect(args, log);
|
||||||
@@ -39,14 +39,14 @@ export function registerShowTaskTool(server) {
|
|||||||
if (result.success) {
|
if (result.success) {
|
||||||
log.info(`Successfully retrieved task details for ID: ${args.id}${result.fromCache ? ' (from cache)' : ''}`);
|
log.info(`Successfully retrieved task details for ID: ${args.id}${result.fromCache ? ' (from cache)' : ''}`);
|
||||||
} else {
|
} else {
|
||||||
log.error(`Failed to show task: ${result.error.message}`);
|
log.error(`Failed to get task: ${result.error.message}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use handleApiResult to format the response
|
// Use handleApiResult to format the response
|
||||||
return handleApiResult(result, log, 'Error retrieving task details');
|
return handleApiResult(result, log, 'Error retrieving task details');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(`Error in show-task tool: ${error.message}`);
|
log.error(`Error in get-task tool: ${error.message}`);
|
||||||
return createErrorResponse(`Failed to show task: ${error.message}`);
|
return createErrorResponse(`Failed to get task: ${error.message}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* tools/listTasks.js
|
* tools/get-tasks.js
|
||||||
* Tool to list all tasks from Task Master
|
* Tool to get all tasks from Task Master
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -11,13 +11,13 @@ import {
|
|||||||
import { listTasksDirect } from "../core/task-master-core.js";
|
import { listTasksDirect } from "../core/task-master-core.js";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register the listTasks tool with the MCP server
|
* Register the getTasks tool with the MCP server
|
||||||
* @param {Object} server - FastMCP server instance
|
* @param {Object} server - FastMCP server instance
|
||||||
*/
|
*/
|
||||||
export function registerListTasksTool(server) {
|
export function registerListTasksTool(server) {
|
||||||
server.addTool({
|
server.addTool({
|
||||||
name: "list-tasks",
|
name: "get-tasks",
|
||||||
description: "List all tasks from Task Master",
|
description: "Get all tasks from Task Master",
|
||||||
parameters: z.object({
|
parameters: z.object({
|
||||||
status: z.string().optional().describe("Filter tasks by status"),
|
status: z.string().optional().describe("Filter tasks by status"),
|
||||||
withSubtasks: z
|
withSubtasks: z
|
||||||
@@ -34,16 +34,16 @@ export function registerListTasksTool(server) {
|
|||||||
}),
|
}),
|
||||||
execute: async (args, { log }) => {
|
execute: async (args, { log }) => {
|
||||||
try {
|
try {
|
||||||
log.info(`Listing tasks with filters: ${JSON.stringify(args)}`);
|
log.info(`Getting tasks with filters: ${JSON.stringify(args)}`);
|
||||||
|
|
||||||
// Call core function - args contains projectRoot which is handled internally
|
// Call core function - args contains projectRoot which is handled internally
|
||||||
const result = await listTasksDirect(args, log);
|
const result = await listTasksDirect(args, log);
|
||||||
|
|
||||||
// Log result and use handleApiResult utility
|
// Log result and use handleApiResult utility
|
||||||
log.info(`Retrieved ${result.success ? (result.data?.tasks?.length || 0) : 0} tasks`);
|
log.info(`Retrieved ${result.success ? (result.data?.tasks?.length || 0) : 0} tasks`);
|
||||||
return handleApiResult(result, log, 'Error listing tasks');
|
return handleApiResult(result, log, 'Error getting tasks');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(`Error listing tasks: ${error.message}`);
|
log.error(`Error getting tasks: ${error.message}`);
|
||||||
return createErrorResponse(error.message);
|
return createErrorResponse(error.message);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
* Export all Task Master CLI tools for MCP server
|
* Export all Task Master CLI tools for MCP server
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { registerListTasksTool } from "./list-tasks.js";
|
import { registerListTasksTool } from "./get-tasks.js";
|
||||||
import logger from "../logger.js";
|
import logger from "../logger.js";
|
||||||
import { registerSetTaskStatusTool } from "./set-task-status.js";
|
import { registerSetTaskStatusTool } from "./set-task-status.js";
|
||||||
import { registerParsePRDTool } from "./parse-prd.js";
|
import { registerParsePRDTool } from "./parse-prd.js";
|
||||||
@@ -11,7 +11,7 @@ import { registerUpdateTool } from "./update.js";
|
|||||||
import { registerUpdateTaskTool } from "./update-task.js";
|
import { registerUpdateTaskTool } from "./update-task.js";
|
||||||
import { registerUpdateSubtaskTool } from "./update-subtask.js";
|
import { registerUpdateSubtaskTool } from "./update-subtask.js";
|
||||||
import { registerGenerateTool } from "./generate.js";
|
import { registerGenerateTool } from "./generate.js";
|
||||||
import { registerShowTaskTool } from "./show-task.js";
|
import { registerShowTaskTool } from "./get-task.js";
|
||||||
import { registerNextTaskTool } from "./next-task.js";
|
import { registerNextTaskTool } from "./next-task.js";
|
||||||
import { registerExpandTaskTool } from "./expand-task.js";
|
import { registerExpandTaskTool } from "./expand-task.js";
|
||||||
import { registerAddTaskTool } from "./add-task.js";
|
import { registerAddTaskTool } from "./add-task.js";
|
||||||
|
|||||||
Reference in New Issue
Block a user