fix: adjust mcp to always use absolute path in description (#143)
This commit is contained in:
@@ -27,7 +27,9 @@ export function registerAddDependencyTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -48,7 +48,9 @@ export function registerAddSubtaskTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
skipGenerate: z
|
||||
.boolean()
|
||||
.optional()
|
||||
|
||||
@@ -31,7 +31,7 @@ export function registerAddTaskTool(server) {
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Task priority (high, medium, low)'),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -42,7 +42,9 @@ export function registerAnalyzeTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
research: z
|
||||
.boolean()
|
||||
.optional()
|
||||
|
||||
@@ -29,7 +29,9 @@ export function registerClearSubtasksTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -43,7 +43,9 @@ export function registerExpandAllTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -35,7 +35,7 @@ export function registerExpandTaskTool(server) {
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Additional context for subtask generation'),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
@@ -43,7 +43,7 @@ export function registerExpandTaskTool(server) {
|
||||
'Root directory of the project (default: current working directory)'
|
||||
)
|
||||
}),
|
||||
execute: async (args, { log, reportProgress, session }) => {
|
||||
execute: async (args, { log, session }) => {
|
||||
try {
|
||||
log.info(`Starting expand-task with args: ${JSON.stringify(args)}`);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export function registerFixDependenciesTool(server) {
|
||||
name: 'fix_dependencies',
|
||||
description: 'Fix invalid dependencies in tasks automatically',
|
||||
parameters: z.object({
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -21,7 +21,7 @@ export function registerGenerateTool(server) {
|
||||
description:
|
||||
'Generates individual task files in tasks/ directory based on tasks.json',
|
||||
parameters: z.object({
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
output: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -39,7 +39,7 @@ export function registerShowTaskTool(server) {
|
||||
description: 'Get detailed information about a specific task',
|
||||
parameters: z.object({
|
||||
id: z.string().describe('Task ID to get'),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -21,7 +21,7 @@ export function registerNextTaskTool(server) {
|
||||
description:
|
||||
'Find the next task to work on based on dependencies and status',
|
||||
parameters: z.object({
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -24,9 +24,7 @@ export function registerParsePRDTool(server) {
|
||||
input: z
|
||||
.string()
|
||||
.default('tasks/tasks.json')
|
||||
.describe(
|
||||
'Path to the PRD document file (relative to project root or absolute)'
|
||||
),
|
||||
.describe('Absolute path to the PRD document file'),
|
||||
numTasks: z
|
||||
.string()
|
||||
.optional()
|
||||
@@ -37,7 +35,7 @@ export function registerParsePRDTool(server) {
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'Output path for tasks.json file (relative to project root or absolute, default: tasks/tasks.json)'
|
||||
'Output absolute path for tasks.json file (default: tasks/tasks.json)'
|
||||
),
|
||||
force: z
|
||||
.boolean()
|
||||
@@ -47,7 +45,7 @@ export function registerParsePRDTool(server) {
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'Root directory of the project (default: automatically detected from session or CWD)'
|
||||
'Absolute path to the root directory of the project (default: automatically detected from session or CWD)'
|
||||
)
|
||||
}),
|
||||
execute: async (args, { log, session }) => {
|
||||
|
||||
@@ -25,7 +25,9 @@ export function registerRemoveDependencyTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -34,7 +34,9 @@ export function registerRemoveSubtaskTool(server) {
|
||||
file: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe('Path to the tasks file (default: tasks/tasks.json)'),
|
||||
.describe(
|
||||
'Absolute path to the tasks file (default: tasks/tasks.json)'
|
||||
),
|
||||
skipGenerate: z
|
||||
.boolean()
|
||||
.optional()
|
||||
|
||||
@@ -23,7 +23,7 @@ export function registerRemoveTaskTool(server) {
|
||||
id: z
|
||||
.string()
|
||||
.describe("ID of the task or subtask to remove (e.g., '5' or '5.2')"),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -30,7 +30,7 @@ export function registerSetTaskStatusTool(server) {
|
||||
.describe(
|
||||
"New status to set (e.g., 'pending', 'done', 'in-progress', 'review', 'deferred', 'cancelled'."
|
||||
),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -31,7 +31,7 @@ export function registerUpdateSubtaskTool(server) {
|
||||
.boolean()
|
||||
.optional()
|
||||
.describe('Use Perplexity AI for research-backed updates'),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -31,7 +31,7 @@ export function registerUpdateTaskTool(server) {
|
||||
.boolean()
|
||||
.optional()
|
||||
.describe('Use Perplexity AI for research-backed updates'),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -33,7 +33,7 @@ export function registerUpdateTool(server) {
|
||||
.boolean()
|
||||
.optional()
|
||||
.describe('Use Perplexity AI for research-backed updates'),
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
@@ -21,7 +21,7 @@ export function registerValidateDependenciesTool(server) {
|
||||
description:
|
||||
'Check tasks for dependency issues (like circular references or links to non-existent tasks) without making changes.',
|
||||
parameters: z.object({
|
||||
file: z.string().optional().describe('Path to the tasks file'),
|
||||
file: z.string().optional().describe('Absolute path to the tasks file'),
|
||||
projectRoot: z
|
||||
.string()
|
||||
.optional()
|
||||
|
||||
Reference in New Issue
Block a user