Skip to main content
Glama
mako10k

MCP-Confirm

by mako10k

elicit_custom

Create custom confirmation dialogs with specific data collection schemas when standard confirmation tools are insufficient for your needs.

Instructions

Create a custom confirmation dialog with specific schema when standard tools don't fit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesMessage to display to the user
schemaYesJSON schema defining the structure of information to collect

Implementation Reference

  • The primary handler function that implements the logic for the 'elicit_custom' tool. It processes the input arguments to create an elicitation request with a custom message and schema, sends it via sendElicitationRequest, and formats the response as MCP tool output.
    private async handleElicitCustom(args: Record<string, unknown>) {
      const message =
        typeof args.message === "string" ? args.message : "Please provide input";
      const schema =
        typeof args.schema === "object" && args.schema !== null
          ? (args.schema as ElicitationSchema)
          : {
              type: "object" as const,
              properties: {},
            };
    
      const elicitationParams: ElicitationParams = {
        message,
        requestedSchema: schema,
      };
    
      try {
        const response = await this.sendElicitationRequest(elicitationParams);
    
        if (response.action === "accept") {
          return {
            content: [
              {
                type: "text",
                text: `Custom elicitation completed:\n${JSON.stringify(response.content, null, 2)}`,
              },
            ],
          };
        } else {
          return {
            content: [
              {
                type: "text",
                text: `User ${response.action}ed the custom elicitation.`,
              },
            ],
          };
        }
      } catch (error) {
        return this.createErrorResponse(
          `Custom elicitation failed: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • Defines the Tool object for 'elicit_custom', including its name, description, and inputSchema which specifies the expected input structure (message and schema).
    private createElicitCustomTool(): Tool {
      return {
        name: "elicit_custom",
        description:
          "Create a custom confirmation dialog with specific schema when standard tools don't fit",
        inputSchema: {
          type: "object",
          properties: {
            message: {
              type: "string",
              description: "Message to display to the user",
            },
            schema: {
              type: "object",
              description:
                "JSON schema defining the structure of information to collect",
            },
          },
          required: ["message", "schema"],
        },
      };
    }
  • src/index.ts:231-242 (registration)
    Registers the 'elicit_custom' tool by including this.createElicitCustomTool() in the array of available tools returned by getToolDefinitions(), which is used by the 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)
    The tool execution dispatcher (switch statement in executeToolCall) registers and routes calls to the 'elicit_custom' handler via its specific case statement.
    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 states the tool creates a dialog but doesn't describe what happens after creation (e.g., how user responses are handled, whether it's blocking, or any permissions/rate limits). This leaves significant gaps for a tool that interacts with users.

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 with zero waste. It's front-loaded with the core purpose and includes necessary context without redundancy, making it appropriately sized for the tool's complexity.

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 (user interaction with custom schema) and lack of annotations or output schema, the description is adequate but incomplete. It covers the basic purpose and usage context but misses behavioral details like response handling, which are crucial for effective use by an AI 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?

Schema description coverage is 100%, so the schema already documents both parameters ('message' and 'schema'). The description adds minimal value by implying these parameters define the dialog's content and structure, but doesn't provide additional syntax, format details, or examples beyond what the schema offers.

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 verb ('Create') and resource ('custom confirmation dialog with specific schema'), making the purpose understandable. It distinguishes from standard tools but doesn't explicitly differentiate from sibling tools like 'ask_yes_no' or 'confirm_action' which might also handle confirmations.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('when standard tools don't fit'), which helps guide selection. However, it doesn't specify when NOT to use it or name explicit alternatives among the sibling tools, such as 'ask_yes_no' for simpler confirmations.

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