Skip to main content
Glama
zeph-to

@zeph-to/mcp-server

by zeph-to

zeph_input

Request text input from users via push notification, blocking until they respond or timeout. Ideal for interactive input in AI workflows.

Instructions

Request text input from the user via push notification. The tool blocks until the user responds or the timeout is reached. Requires ZEPH_HOOK_ID environment variable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesInput request title
bodyNoInstructions or context
placeholderNoInput placeholder hint
inputTypeNoInput field typetext
timeoutNoSeconds to wait for response (default: 120)

Implementation Reference

  • Handler function for zeph_input tool: triggers a hook with hookType='input', polls for user response, and returns the text value or error.
      async ({ title, body, placeholder, inputType, timeout }, ctx): Promise<CallToolResult> => {
        if (!config.hookId) return hookNotConfiguredError();
    
        try {
          const trigger = await client.triggerHook(config.hookId, {
            title,
            body,
            timeout,
            hookType: 'input',
            metadata: { placeholder, inputType },
          });
    
          const event = await pollForResponse(
            client,
            config.hookId,
            trigger.data.eventId,
            timeout,
            ctx,
          );
    
          if (!event) return timeoutError(timeout, 'Try again with a longer timeout');
    
          return textResult({ value: event.data.response?.value ?? '', timedOut: false });
        } catch (err) {
          return formatToolError(err);
        }
      },
    );
  • Zod input schema for zeph_input tool: defines title (required), body, placeholder, inputType (enum: text/password/multiline, default text), and timeout (number 10-600, default 120).
      inputSchema: {
        title: z.string().describe('Input request title'),
        body: z.string().optional().describe('Instructions or context'),
        placeholder: z.string().optional().describe('Input placeholder hint'),
        inputType: z
          .enum(['text', 'password', 'multiline'])
          .default('text')
          .describe('Input field type'),
        timeout: z
          .number()
          .min(10)
          .max(600)
          .default(120)
          .describe('Seconds to wait for response (default: 120)'),
      },
    },
  • Registration function registerInputTool that calls server.registerTool with name 'zeph_input' at src/tools/input.ts.
    export const registerInputTool = (server: McpServer, client: ZephApiClient, config: McpServerConfig) => {
      server.registerTool(
        'zeph_input',
        {
          description:
            'Request text input from the user via push notification. The tool blocks until the user responds or the timeout is reached. Requires ZEPH_HOOK_ID environment variable.',
          annotations: {
            readOnlyHint: false,
            destructiveHint: false,
            openWorldHint: true,
          },
          inputSchema: {
            title: z.string().describe('Input request title'),
            body: z.string().optional().describe('Instructions or context'),
            placeholder: z.string().optional().describe('Input placeholder hint'),
            inputType: z
              .enum(['text', 'password', 'multiline'])
              .default('text')
              .describe('Input field type'),
            timeout: z
              .number()
              .min(10)
              .max(600)
              .default(120)
              .describe('Seconds to wait for response (default: 120)'),
          },
        },
        async ({ title, body, placeholder, inputType, timeout }, ctx): Promise<CallToolResult> => {
          if (!config.hookId) return hookNotConfiguredError();
    
          try {
            const trigger = await client.triggerHook(config.hookId, {
              title,
              body,
              timeout,
              hookType: 'input',
              metadata: { placeholder, inputType },
            });
    
            const event = await pollForResponse(
              client,
              config.hookId,
              trigger.data.eventId,
              timeout,
              ctx,
            );
    
            if (!event) return timeoutError(timeout, 'Try again with a longer timeout');
    
            return textResult({ value: event.data.response?.value ?? '', timedOut: false });
          } catch (err) {
            return formatToolError(err);
          }
        },
      );
  • src/index.ts:68-68 (registration)
    Call to registerInputTool from main index.ts entry point, wiring up the tool.
    registerInputTool(server, client, config);
  • Helper - ZephApiClient.triggerHook method used by zeph_input to trigger the input hook via API.
    async triggerHook(
      hookId: string,
      params: {
        title: string;
        body?: string;
        actions?: { id: string; label: string }[];
        timeout?: number;
        fallback?: string;
        metadata?: Record<string, unknown>;
        hookType?: 'one-way' | 'interactive' | 'input';
      },
    ): Promise<HookTriggerResponse> {
      return this.request<HookTriggerResponse>('POST', `/hooks/${hookId}/trigger`, params);
    }
    
    async getHookEvent(hookId: string, eventId: string): Promise<HookEventResponse> {
      return this.request<HookEventResponse>('GET', `/hooks/${hookId}/events/${eventId}`, undefined, POLL_TIMEOUT_MS);
    }
Behavior4/5

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

Beyond annotations, the description discloses blocking behavior, timeout reliance, and environment variable requirement. While annotations indicate openWorldHint=true, the description adds the key behavioral detail that the tool waits for user input, which is critical for agent decision-making. Missing details like timeout handling are minor given the schema covers timeout parameter.

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?

Two concise sentences cover purpose, blocking behavior, and prerequisite. No wasted words, front-loaded with the core function. Exemplary efficiency for a tool description.

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 simplicity, description covers purpose, behavior, and prerequisite. No output schema exists, but the description indicates the tool returns user input or times out, which is sufficient. Minor missing details (e.g., timeout behavior on error) do not significantly detract from completeness.

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 coverage is 100%, with each parameter having a description. The tool description does not add new meaning to the parameters beyond what the schema provides. Baseline 3 is appropriate as the schema already handles parameter documentation adequately.

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 tool's purpose: requesting text input from the user via push notification and blocking until response or timeout. This distinguishes it from siblings like zeph_notify (pure notification) and zeph_prompt (likely different prompt type), making the action unambiguous.

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: the tool is for synchronous input requests, blocking until user responds. It mentions the prerequisite ZEPH_HOOK_ID environment variable. However, it does not explicitly compare with alternatives or specify when not to use this tool, leaving some room for improvement.

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/zeph-to/mcp-server'

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