Skip to main content
Glama

type

Enter text into a web page field by ID or CSS selector, with an optional Enter key press for form submission.

Instructions

Type into a field by id (from inspect) or CSS selector. Set submit=true to press Enter after.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
idNo
selectorNo
submitNo

Implementation Reference

  • The main handler function for the 'type' tool. It types text into a field identified by id (from inspect) or CSS selector. Optionally presses Enter after if submit=true.
    async function type(args: { text: string; id?: number; selector?: string; submit?: boolean }) {
      const p = requirePage();
      let loc;
      if (args.id !== undefined) {
        const tagged = await p.evaluate(() => document.querySelector('[data-helm-id]') !== null);
        if (!tagged) await tagInteractive(p);
        loc = p.locator(`[data-helm-id="${args.id}"]`).first();
        if ((await loc.count()) === 0) {
          throw new Error(`No element with helm id=${args.id}. Run inspect() first.`);
        }
      } else if (args.selector) {
        loc = p.locator(args.selector).first();
      } else {
        throw new Error('Provide {id} or {selector}.');
      }
      await loc.fill(args.text);
      if (args.submit) await loc.press('Enter');
      return { ok: true };
  • The input schema definition for the 'type' tool. Defines properties: text (required), id (optional number), selector (optional string), submit (optional boolean).
    {
      name: 'type',
      description: 'Type into a field by id (from inspect) or CSS selector. Set submit=true to press Enter after.',
      inputSchema: {
        type: 'object',
        properties: {
          text: { type: 'string' },
          id: { type: 'number' },
          selector: { type: 'string' },
          submit: { type: 'boolean' },
        },
        required: ['text'],
      },
  • src/index.ts:467-467 (registration)
    Registration of the 'type' tool in the CallToolRequestSchema switch statement, mapping 'type' tool name to the type() handler function.
    case 'type':         result = await type(args as { text: string; id?: number; selector?: string; submit?: boolean }); break;
  • The INTERACTIVE_SELECTOR includes 'input:not([type="hidden"])' which is part of the element discovery mechanism used by inspect() that feeds ids to type().
    'input:not([type="hidden"])',
Behavior2/5

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

With no annotations, the description carries full burden. It only discloses the submit parameter behavior (pressing Enter) but does not address error handling, field clearing, waiting, or other side effects.

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 extremely concise at two sentences (18 words) with no extraneous information. Every word serves a purpose.

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

Completeness2/5

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

For a tool with no output schema and no annotations, the description lacks details about return values, error scenarios, and other behavioral nuances. It is minimal and leaves gaps for an agent to infer.

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 description adds meaning to id and selectors (by inspect or CSS) and explains the submit parameter. However, it does not clarify precedence between id and selector, and the term 'from inspect' is ambiguous. With 0% schema coverage, the description partially compensates.

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 action ('Type into a field') and identifies the target via id from inspect or CSS selector. It distinguishes from sibling tools like click or attach, but could be more precise about the typing mechanism.

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

Usage Guidelines2/5

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

The description gives no explicit guidance on when to use this tool versus alternatives. It implies usage for text input into fields but does not mention prerequisites or fallback behaviors.

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/flying-pisces/mcp-helm'

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