request_action_confirmation
Request user confirmation before implementing research-based architectural changes to ensure alignment with project goals and risk assessment.
Instructions
Request confirmation before applying research-based changes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Description of the action to be performed | |
| details | Yes | Detailed information about the action | |
| impact | No | Impact level of the action | medium |
Implementation Reference
- Primary handler for 'request_action_confirmation' MCP tool. Generates formatted confirmation request with impact assessment, decision guidelines, and response format for user approval of critical actions.export async function requestActionConfirmation(args: { action: string; details: string; impact?: 'low' | 'medium' | 'high' | 'critical'; }): Promise<any> { const { action, details, impact = 'medium' } = args; try { const { promptForActionConfirmation } = await import('../utils/research-integration.js'); const result = promptForActionConfirmation(action, details, impact); return { content: [ { type: 'text', text: `# Action Confirmation Request ${result.instructions} ## Confirmation Prompt ${result.confirmationPrompt} ## Response Required Please provide your decision on this action: ### Response Format \`\`\` DECISION: [APPROVED|REJECTED|MODIFIED|DEFERRED] REASONING: [Your reasoning for the decision] MODIFICATIONS: [If MODIFIED, specify required changes] TIMELINE: [If DEFERRED, specify when to reconsider] ADDITIONAL_REQUIREMENTS: [Any additional requirements or conditions] \`\`\` ### Decision Guidelines - **APPROVED**: Action can proceed as proposed - **REJECTED**: Action should not be implemented (provide reasoning) - **MODIFIED**: Action needs changes before approval (specify modifications) - **DEFERRED**: Action should be postponed (specify timeline) ## Impact Assessment **Impact Level**: ${impact.toUpperCase()} ${ impact === 'critical' ? '⚠️ **CRITICAL IMPACT**: This action requires careful review and may affect multiple systems or stakeholders.' : impact === 'high' ? '🔶 **HIGH IMPACT**: This action should be reviewed by senior stakeholders and may require coordination.' : impact === 'medium' ? '🔷 **MEDIUM IMPACT**: This action requires standard review and approval processes.' : '🔹 **LOW IMPACT**: This action has minimal risk but still requires confirmation.' } ## Next Steps After receiving confirmation: 1. **Document the decision** and reasoning 2. **Proceed with approved actions** following implementation guidelines 3. **Apply any required modifications** before implementation 4. **Schedule deferred actions** for future consideration 5. **Communicate decisions** to relevant stakeholders `, }, ], }; } catch (error) { throw new McpAdrError( `Failed to request action confirmation: ${error instanceof Error ? error.message : String(error)}`, 'CONFIRMATION_ERROR' ); } }
- Helper function used by the handler to generate the confirmation prompt template and accompanying instructions based on the action details and impact level.export function promptForActionConfirmation( action: string, details: string, impact: 'low' | 'medium' | 'high' | 'critical' ): { confirmationPrompt: string; instructions: string } { const confirmationPrompt = ` # Action Confirmation Required **Action**: ${action} **Impact Level**: ${impact.toUpperCase()} ## Details ${details} ## Confirmation Required Before proceeding with this action, please confirm: 1. **Understanding**: Do you understand the proposed action and its implications? 2. **Authorization**: Are you authorized to approve this type of change? 3. **Impact Assessment**: Have you reviewed the potential impact on existing systems? 4. **Timing**: Is this an appropriate time to implement this change? 5. **Resources**: Are the necessary resources available for implementation? ## Risk Assessment ${ impact === 'critical' ? '🔴 **CRITICAL**: This action may have significant system-wide impact' : impact === 'high' ? '🟠 **HIGH**: This action may affect multiple components or stakeholders' : impact === 'medium' ? '🟡 **MEDIUM**: This action has moderate impact and should be reviewed' : '🟢 **LOW**: This action has minimal impact but still requires confirmation' } Please respond with: - **APPROVED**: To proceed with the action - **REJECTED**: To cancel the action - **MODIFIED**: To request modifications to the proposed action - **DEFERRED**: To postpone the action to a later time Include any additional comments or requirements for the action. `; const instructions = ` # Action Confirmation Instructions This confirmation step ensures that significant changes are properly reviewed before implementation. ## Confirmation Process 1. **Review the proposed action** and its details carefully 2. **Assess the impact level** and potential consequences 3. **Consider timing and resources** required for implementation 4. **Provide clear approval or rejection** with reasoning 5. **Specify any modifications** needed if not approving as-is ## Response Options - **APPROVED**: Action can proceed as proposed - **REJECTED**: Action should not be implemented - **MODIFIED**: Action needs changes before approval - **DEFERRED**: Action should be postponed ## Best Practices - Always review high and critical impact actions carefully - Consider stakeholder impact and communication needs - Ensure proper backup and rollback plans are in place - Document the approval decision and reasoning `; return { confirmationPrompt, instructions, }; }
- Input schema defined by TypeScript function parameters for the tool: required action and details strings, optional impact level.export async function requestActionConfirmation(args: { action: string; details: string; impact?: 'low' | 'medium' | 'high' | 'critical'; }): Promise<any> {