fix(mcp): make projectRoot optional in all MCP tools
- Update all tool definitions to use z.string().optional() for projectRoot - Fix direct function implementations to use findTasksJsonPath(args, log) pattern - Enables consistent project root detection without requiring explicit params - Update changeset to document these improvements This change ensures MCP tools work properly with the smart project root detection system, removing the need for explicit projectRoot parameters in client applications. Improves usability and reduces integration friction.
This commit is contained in:
@@ -23,7 +23,7 @@ export function registerAddTaskTool(server) {
|
||||
dependencies: z.string().optional().describe("Comma-separated list of task IDs this task depends on"),
|
||||
priority: z.string().optional().describe("Task priority (high, medium, low)"),
|
||||
file: z.string().optional().describe("Path to the tasks file"),
|
||||
projectRoot: z.string().describe("Root directory of the project (default: current working directory)")
|
||||
projectRoot: z.string().optional().describe("Root directory of the project (default: current working directory)")
|
||||
}),
|
||||
execute: async ({ prompt, dependencies, priority, file, projectRoot }, log) => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user