Skip to main content
Glama
mako10k

MCP-Confirm

by mako10k

confirm_action

Request user confirmation before executing potentially impactful operations, ensuring explicit approval for actions with significant consequences.

Instructions

Ask user to confirm an action before proceeding with potentially impactful operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesDescription of the action to be confirmed
impactNoPotential impact or consequences of this action
detailsNoAdditional details about what will happen

Implementation Reference

  • The primary handler function for the 'confirm_action' tool. It constructs a confirmation message based on action, impact, and details, sends an elicitation request to the user, and returns the user's confirmation response.
    private async handleConfirmAction(args: Record<string, unknown>) {
      const action =
        typeof args.action === "string" ? args.action : "Unknown action";
      const impact = typeof args.impact === "string" ? args.impact : undefined;
      const details = typeof args.details === "string" ? args.details : undefined;
    
      let message = `Please confirm this action:\n\n**Action**: ${action}`;
      if (impact) {
        message += `\n\n**Impact**: ${impact}`;
      }
      if (details) {
        message += `\n\n**Details**: ${details}`;
      }
      message += `\n\nDo you want to proceed?`;
    
      const elicitationParams: ElicitationParams = {
        message,
        requestedSchema: {
          type: "object",
          properties: {
            confirmed: {
              type: "boolean",
              title: "Confirm Action",
              description: "Do you want to proceed with this action?",
            },
            note: {
              type: "string",
              title: "Additional Note",
              description: "Any additional instructions or concerns?",
            },
          },
          required: ["confirmed"],
        },
        timeoutMs: this.determineTimeoutForAction(impact),
      };
    
      try {
        const response = await this.sendElicitationRequest(elicitationParams);
    
        if (response.action === "accept" && response.content) {
          const confirmed = response.content.confirmed as boolean;
          const note = response.content.note as string | undefined;
          return {
            content: [
              {
                type: "text",
                text: `User ${confirmed ? "confirmed" : "declined"} the action.${note ? `\nNote: ${note}` : ""}`,
              },
            ],
          };
        } else {
          return {
            content: [
              {
                type: "text",
                text: `User ${response.action}ed the confirmation request.`,
              },
            ],
          };
        }
      } catch (error) {
        return this.createErrorResponse(
          `Confirmation request failed: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • Defines the Tool object for 'confirm_action' including name, description, and inputSchema specifying required 'action' and optional 'impact' and 'details' parameters.
    private createConfirmActionTool(): Tool {
      return {
        name: "confirm_action",
        description:
          "Ask user to confirm an action before proceeding with potentially impactful operations",
        inputSchema: {
          type: "object",
          properties: {
            action: {
              type: "string",
              description: "Description of the action to be confirmed",
            },
            impact: {
              type: "string",
              description: "Potential impact or consequences of this action",
            },
            details: {
              type: "string",
              description: "Additional details about what will happen",
            },
          },
          required: ["action"],
        },
      };
    }
  • src/index.ts:231-241 (registration)
    Registers the 'confirm_action' tool by including createConfirmActionTool() in the list of available tools returned by listTools handler.
    private getToolDefinitions(): Tool[] {
      return [
        this.createAskYesNoTool(),
        this.createConfirmActionTool(),
        this.createClarifyIntentTool(),
        this.createVerifyUnderstandingTool(),
        this.createCollectRatingTool(),
        this.createElicitCustomTool(),
        this.createSearchLogsTool(),
        this.createAnalyzeLogsTool(),
      ];
  • src/index.ts:516-537 (registration)
    Dispatches tool calls to the appropriate handler; routes 'confirm_action' to handleConfirmAction.
    private async executeToolCall(name: string, args: Record<string, unknown>) {
      switch (name) {
        case "ask_yes_no":
          return await this.handleAskYesNo(args);
        case "confirm_action":
          return await this.handleConfirmAction(args);
        case "clarify_intent":
          return await this.handleClarifyIntent(args);
        case "verify_understanding":
          return await this.handleVerifyUnderstanding(args);
        case "collect_rating":
          return await this.handleCollectRating(args);
        case "elicit_custom":
          return await this.handleElicitCustom(args);
        case "search_logs":
          return await this.handleSearchLogs(args);
        case "analyze_logs":
          return await this.handleAnalyzeLogs(args);
        default:
          throw new Error(`Unknown tool: ${name}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool is for confirmation of 'potentially impactful operations,' hinting at safety or caution, but lacks details on how the confirmation is handled (e.g., user interaction flow, response format, or any side effects). For a tool with no annotations, this leaves significant gaps in understanding its behavior beyond the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that efficiently conveys the tool's purpose and context. It is front-loaded with the core function and includes necessary qualifiers without redundancy. Every word earns its place, making it highly concise and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a confirmation tool with 3 parameters) and the absence of annotations and output schema, the description provides a basic but incomplete picture. It covers the purpose and hints at usage context but lacks details on behavioral aspects, return values, or interaction specifics. This is adequate for a simple tool but leaves room for improvement in fully guiding an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear descriptions for all three parameters ('action', 'impact', 'details'). The description doesn't add any additional meaning beyond what the schema provides, such as examples or usage tips. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema adequately documents the parameters without extra value from the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Ask user to confirm an action before proceeding with potentially impactful operations.' It specifies the verb ('ask to confirm') and the resource/context ('action'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'ask_yes_no' or 'verify_understanding', which might serve similar confirmation purposes, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('before proceeding with potentially impactful operations'), suggesting when to use this tool. However, it doesn't provide explicit guidance on when to choose this over alternatives like 'ask_yes_no' or 'verify_understanding', nor does it specify exclusions or prerequisites. The guidance is present but limited to a general implication.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mako10k/mcp-confirm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server