remove_prompts
Remove prompts configuration or specific fields from TaskFlow MCP to manage task structure and user approval workflows.
Instructions
Remove the entire prompts configuration or specific fields from it.
If 'fields' is provided, only those specific fields will be removed. If 'fields' is not provided, the entire prompts configuration will be removed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | No |
Implementation Reference
- src/tools/TaskFlowTools.ts:659-662 (handler)Handler function that executes the remove_prompts tool by calling the service method with extracted fields.async remove_prompts(args: any) { const { fields } = args ?? {}; return service.removePrompts(fields); },
- src/tools/TaskFlowTools.ts:470-488 (schema)Tool schema definition including name, description, and input schema for validating arguments.export const REMOVE_PROMPTS_TOOL: Tool = { name: "remove_prompts", description: "Remove the entire prompts configuration or specific fields from it.\n\n" + "If 'fields' is provided, only those specific fields will be removed.\n" + "If 'fields' is not provided, the entire prompts configuration will be removed.", inputSchema: { type: "object", properties: { fields: { type: "array", items: { type: "string", enum: ["instructions", "taskPrefix", "taskSuffix"] } }, }, }, };
- src/server/TaskFlowServer.ts:64-89 (registration)Registration of all tools including REMOVE_PROMPTS_TOOL in the MCP server's listTools handler.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 in TaskFlowService that removes prompts configuration entirely or specific fields, saves changes, and returns status.public async removePrompts(fields?: string[]) { await this.loadTasks(); if (!this.data.prompts) { return { status: "no_prompts", message: "No prompts configuration to remove." }; } if (fields && fields.length > 0) { // Remove specific fields for (const field of fields) { if (field === "instructions" || field === "taskPrefix" || field === "taskSuffix") { delete this.data.prompts[field]; } } this.data.prompts.updatedAt = new Date().toISOString(); // If no content fields remain, remove the entire prompts object const hasContent = this.data.prompts.instructions || this.data.prompts.taskPrefix || this.data.prompts.taskSuffix; if (!hasContent) { delete this.data.prompts; } await this.saveTasks(); return { status: "prompts_fields_removed", prompts: this.data.prompts || null, message: `Removed fields: ${fields.join(", ")}` }; } else { // Remove entire prompts configuration delete this.data.prompts; await this.saveTasks(); return { status: "prompts_removed", message: "Prompts configuration has been completely removed." }; } }