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:
@@ -20,8 +20,8 @@ import { findTasksJsonPath } from '../utils/path-utils.js';
|
||||
*/
|
||||
export async function addTaskDirect(args, log) {
|
||||
try {
|
||||
// Resolve the tasks file path
|
||||
const tasksPath = findTasksJsonPath(args.file, args.projectRoot);
|
||||
// Find the tasks.json path
|
||||
const tasksPath = findTasksJsonPath(args, log);
|
||||
|
||||
// Check required parameters
|
||||
if (!args.prompt) {
|
||||
|
||||
Reference in New Issue
Block a user