Skip to main content
Glama
mako10k

MCP-Confirm

by mako10k

clarify_intent

Clarify ambiguous user requests by identifying unclear elements and presenting specific interpretation options for user selection.

Instructions

Ask user to clarify their intent when the request is ambiguous or could be interpreted multiple ways

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_summaryYesSummary of what the AI understood from the user's request
ambiguityYesDescription of what is unclear or ambiguous
optionsNoPossible interpretations or options for the user to choose from

Implementation Reference

  • The primary handler function that implements the execution logic for the 'clarify_intent' tool. It parses input arguments, builds a user-facing message and dynamic elicitation schema (including options if provided), sends an elicitation request to the user, and returns the response or error.
    private async handleClarifyIntent(args: Record<string, unknown>) {
      const request_summary =
        typeof args.request_summary === "string"
          ? args.request_summary
          : "Unknown request";
      const ambiguity =
        typeof args.ambiguity === "string" ? args.ambiguity : "Unknown ambiguity";
      const options = Array.isArray(args.options) ? args.options : undefined;
    
      let message = `I need to clarify your intent:\n\n**My understanding**: ${request_summary}\n\n**What's unclear**: ${ambiguity}`;
    
      const schema: ElicitationSchema = {
        type: "object",
        properties: {},
        required: ["clarification"],
      };
    
      // Add selected_option FIRST if options exist (for better UX - selection before free text)
      if (options && options.length > 0) {
        message += `\n\n**Options**:\n${options.map((opt: unknown, i: number) => `${i + 1}. ${String(opt)}`).join("\n")}`;
        schema.properties.selected_option = {
          type: "string",
          title: "Select Option",
          description: "Which option best matches your intent?",
          enum: options.map((opt) => String(opt)),
        };
      }
    
      // Add clarification field AFTER options (better UX - free text input comes after selection)
      schema.properties.clarification = {
        type: "string",
        title: "Additional clarification",
        description: "Please provide any additional details or explanation",
      };
    
      const elicitationParams: ElicitationParams = {
        message,
        requestedSchema: schema,
      };
    
      try {
        const response = await this.sendElicitationRequest(elicitationParams);
    
        if (response.action === "accept") {
          return {
            content: [
              {
                type: "text",
                text: `User clarification:\n${JSON.stringify(response.content, null, 2)}`,
              },
            ],
          };
        } else {
          return {
            content: [
              {
                type: "text",
                text: `User ${response.action}ed the clarification request.`,
              },
            ],
          };
        }
      } catch (error) {
        return this.createErrorResponse(
          `Clarification request failed: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • src/index.ts:288-317 (registration)
    The factory function that creates and returns the Tool object for 'clarify_intent', including its name, description, and inputSchema definition.
    private createClarifyIntentTool(): Tool {
      return {
        name: "clarify_intent",
        description:
          "Ask user to clarify their intent when the request is ambiguous or could be interpreted multiple ways",
        inputSchema: {
          type: "object",
          properties: {
            request_summary: {
              type: "string",
              description:
                "Summary of what the AI understood from the user's request",
            },
            ambiguity: {
              type: "string",
              description: "Description of what is unclear or ambiguous",
            },
            options: {
              type: "array",
              items: {
                type: "string",
              },
              description:
                "Possible interpretations or options for the user to choose from",
            },
          },
          required: ["request_summary", "ambiguity"],
        },
      };
    }
  • The input schema defining the expected parameters for the clarify_intent tool: required request_summary and ambiguity, optional options array.
    inputSchema: {
      type: "object",
      properties: {
        request_summary: {
          type: "string",
          description:
            "Summary of what the AI understood from the user's request",
        },
        ambiguity: {
          type: "string",
          description: "Description of what is unclear or ambiguous",
        },
        options: {
          type: "array",
          items: {
            type: "string",
          },
          description:
            "Possible interpretations or options for the user to choose from",
        },
      },
      required: ["request_summary", "ambiguity"],
    },
  • src/index.ts:522-523 (registration)
    The dispatch switch case in executeToolCall that routes calls to the 'clarify_intent' tool to its handler function.
    case "clarify_intent":
      return await this.handleClarifyIntent(args);
  • src/index.ts:231-242 (registration)
    The getToolDefinitions method that registers clarify_intent by calling createClarifyIntentTool() and including it in the list of available tools.
    private getToolDefinitions(): Tool[] {
      return [
        this.createAskYesNoTool(),
        this.createConfirmActionTool(),
        this.createClarifyIntentTool(),
        this.createVerifyUnderstandingTool(),
        this.createCollectRatingTool(),
        this.createElicitCustomTool(),
        this.createSearchLogsTool(),
        this.createAnalyzeLogsTool(),
      ];
    }
Behavior3/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. It describes the tool's purpose (asking for clarification) but lacks details on behavioral traits such as how it interacts with the user (e.g., via UI prompts), whether it's idempotent, or any rate limits. The description is adequate but minimal for a tool with no annotation coverage.

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, efficient sentence that front-loads the key information (action and condition) with zero wasted words. It is appropriately sized for the tool's complexity and earns its place by clearly defining purpose and usage.

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

Completeness4/5

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

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is mostly complete. It covers purpose and usage well but lacks details on behavioral aspects like interaction flow or error handling. With no output schema, it doesn't need to explain return values, but could benefit from more context on how the tool operates.

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?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description does not add any parameter-specific information beyond what the schema provides (e.g., it doesn't explain how 'options' should be formatted or typical use cases for 'ambiguity'). Baseline 3 is appropriate when the schema handles parameter documentation.

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

Purpose5/5

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

The description clearly states the specific action ('Ask user to clarify their intent') and the condition ('when the request is ambiguous or could be interpreted multiple ways'). It distinguishes this tool from siblings like 'ask_yes_no' or 'confirm_action' by focusing on intent clarification rather than binary confirmation or verification.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool: 'when the request is ambiguous or could be interpreted multiple ways.' This provides clear context for usage versus alternatives like 'verify_understanding' (which might confirm rather than clarify) or 'elicit_custom' (which is more open-ended).

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