update_prompts
Modify specific prompt fields like instructions or task prefixes in TaskFlow MCP's task management system without affecting other configuration settings.
Instructions
Update specific parts of the prompts configuration without replacing the entire object.
Use this to modify individual fields (instructions, taskPrefix, or taskSuffix) while keeping other settings unchanged.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instructions | No | ||
| taskPrefix | No | ||
| taskSuffix | No |
Implementation Reference
- src/tools/TaskFlowTools.ts:654-657 (handler)The tool handler function for 'update_prompts' which extracts the partial prompts from arguments and calls the TaskFlowService.updatePrompts method.async update_prompts(args: any) { const { instructions, taskPrefix, taskSuffix } = args ?? {}; return service.updatePrompts({ instructions, taskPrefix, taskSuffix }); },
- src/tools/TaskFlowTools.ts:455-468 (schema)Tool schema definition for 'update_prompts' including name, description, and input schema allowing optional updates to instructions, taskPrefix, or taskSuffix.export const UPDATE_PROMPTS_TOOL: Tool = { name: "update_prompts", description: "Update specific parts of the prompts configuration without replacing the entire object.\n\n" + "Use this to modify individual fields (instructions, taskPrefix, or taskSuffix) while keeping other settings unchanged.", inputSchema: { type: "object", properties: { instructions: { type: "string" }, taskPrefix: { type: "string" }, taskSuffix: { type: "string" }, }, }, };
- src/server/TaskFlowServer.ts:63-90 (registration)Registration of the 'update_prompts' tool (UPDATE_PROMPTS_TOOL) in the MCP server's list of available tools.this.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ PLAN_TASK_TOOL, GET_NEXT_TASK_TOOL, MARK_TASK_DONE_TOOL, OPEN_TASK_DETAILS_TOOL, LIST_REQUESTS_TOOL, ADD_TASKS_TO_REQUEST_TOOL, UPDATE_TASK_TOOL, DELETE_TASK_TOOL, ADD_SUBTASKS_TOOL, MARK_SUBTASK_DONE_TOOL, UPDATE_SUBTASK_TOOL, DELETE_SUBTASK_TOOL, EXPORT_TASK_STATUS_TOOL, ADD_NOTE_TOOL, UPDATE_NOTE_TOOL, DELETE_NOTE_TOOL, ADD_DEPENDENCY_TOOL, GET_PROMPTS_TOOL, SET_PROMPTS_TOOL, UPDATE_PROMPTS_TOOL, REMOVE_PROMPTS_TOOL, ARCHIVE_COMPLETED_REQUESTS_TOOL, LIST_ARCHIVED_REQUESTS_TOOL, RESTORE_ARCHIVED_REQUEST_TOOL, ], }));
- Core implementation of prompts update logic in TaskFlowService, which updates only the provided prompt fields in the data file and persists changes.public async updatePrompts(updates: Partial<Prompts>) { await this.loadTasks(); const now = new Date().toISOString(); if (!this.data.prompts) { this.data.prompts = { createdAt: now }; } // Update only provided fields if (updates.instructions !== undefined) this.data.prompts.instructions = updates.instructions; if (updates.taskPrefix !== undefined) this.data.prompts.taskPrefix = updates.taskPrefix; if (updates.taskSuffix !== undefined) this.data.prompts.taskSuffix = updates.taskSuffix; this.data.prompts.updatedAt = now; await this.saveTasks(); return { status: "prompts_updated", prompts: this.data.prompts, message: "Prompts configuration has been updated." }; }