UNPKG

xc-mcp

Version:

MCP server that wraps Xcode command-line tools for iOS/macOS development workflows

70 lines 5.5 kB
interface IdbUiInputArgs { udid?: string; operation: 'text' | 'key' | 'key-sequence'; text?: string; key?: 'home' | 'lock' | 'siri' | 'delete' | 'return' | 'space' | 'escape' | 'tab' | 'up' | 'down' | 'left' | 'right'; keySequence?: string[]; actionName?: string; fieldContext?: string; expectedOutcome?: string; isSensitive?: boolean; } /** * Input text and keyboard commands - automated text entry and special key presses for form automation * * **What it does:** * Sends text input and keyboard commands to focused elements on iOS targets. Types text strings into * active text fields, presses special keys (home, return, delete, arrows), and executes key sequences * for complex input workflows. Automatically redacts sensitive data (passwords) in responses and provides * semantic field context tracking for test documentation. * * **Why you'd use it:** * - Automate form filling without manual keyboard interaction - login flows, search, data entry * - Execute keyboard shortcuts and navigation (tab, return, arrows) for multi-field workflows * - Safely handle sensitive data with automatic redaction in tool responses and logs * - Track input operations with semantic metadata (actionName, fieldContext, expectedOutcome) * * **Parameters:** * - operation (required): "text" | "key" | "key-sequence" * - text (required for text operation): String to type into focused field * - key (required for key operation): Special key name (home, return, delete, tab, arrows, etc.) * - keySequence (required for key-sequence operation): Array of key names to press in order * - udid (optional): Target identifier - auto-detects if omitted * - actionName, fieldContext, expectedOutcome (optional): Semantic tracking for test documentation * - isSensitive (optional): Mark as sensitive to redact from output * * **Returns:** * Input execution status with operation details (redacted if sensitive), duration, input context * metadata for test tracking, error details if failed, and troubleshooting guidance specific to * text vs. key operations. * * **Example:** * ```typescript * // Type email into focused field * const result = await idbUiInputTool({ * operation: 'text', * text: 'user@example.com', * actionName: 'Enter Email', * fieldContext: 'Email TextField' * }); * * // Press return to submit * await idbUiInputTool({ operation: 'key', key: 'return' }); * ``` * * **Full documentation:** See idb/ui-input.md for detailed parameters and available keys * * @param args Tool arguments with operation type and input data * @returns Tool result with input status and semantic context */ export declare function idbUiInputTool(args: IdbUiInputArgs): Promise<{ content: { type: "text"; text: string; }[]; isError: boolean; }>; export declare const IDB_UI_INPUT_DOCS = "\n# idb-ui-input\n\n\u2328\uFE0F **Input text and keyboard commands** - automated text entry and special key presses for form automation\n\n## What it does\n\nSends text input and keyboard commands to focused elements on iOS targets. Types text strings into active text fields, presses special keys (home, return, delete, arrows), and executes key sequences for complex input workflows. Automatically redacts sensitive data (passwords) in responses and provides semantic field context tracking for test documentation.\n\n## Why you'd use it\n\n- Automate form filling without manual keyboard interaction - login flows, search, data entry\n- Execute keyboard shortcuts and navigation (tab, return, arrows) for multi-field workflows\n- Safely handle sensitive data with automatic redaction in tool responses and logs\n- Track input operations with semantic metadata (actionName, fieldContext, expectedOutcome)\n\n## Parameters\n\n### Required\n- **operation** (string): \"text\" | \"key\" | \"key-sequence\"\n\n### Operation-specific parameters\n- **text** (string, required for text operation): String to type into focused field\n- **key** (string, required for key operation): Special key name (home, return, delete, tab, arrows, etc.)\n- **keySequence** (string[], required for key-sequence operation): Array of key names to press in order\n\n### Optional\n- **udid** (string): Target identifier - auto-detects if omitted\n- **actionName** (string): Semantic action name (e.g., \"Enter Email\")\n- **fieldContext** (string): Field name for context (e.g., \"Email TextField\")\n- **expectedOutcome** (string): Expected result (e.g., \"Email field populated\")\n- **isSensitive** (boolean): Mark as sensitive to redact from output\n\n## Returns\n\nInput execution status with operation details (redacted if sensitive), duration, input context metadata for test tracking, error details if failed, and troubleshooting guidance specific to text vs. key operations.\n\n## Examples\n\n### Type email into focused field\n```typescript\nconst result = await idbUiInputTool({\n operation: 'text',\n text: 'user@example.com',\n actionName: 'Enter Email',\n fieldContext: 'Email TextField'\n});\n```\n\n### Press return to submit\n```typescript\nawait idbUiInputTool({ operation: 'key', key: 'return' });\n```\n\n## Related Tools\n\n- idb-ui-tap: Tap to focus text fields before typing\n- idb-ui-describe: Find text field coordinates\n"; export declare const IDB_UI_INPUT_DOCS_MINI = "Input text and keyboard commands. Use rtfm({ toolName: \"idb-ui-input\" }) for docs."; export {}; //# sourceMappingURL=ui-input.d.ts.map