Skip to main content
Glama
JustasMonkev

MCP Accessibility Scanner

browser_type

Destructive

Simulate typing text into web elements to test accessibility and functionality. Submit text or type slowly to trigger key handlers, ensuring accurate interaction validation.

Instructions

Type text into editable element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementYesHuman-readable element description used to obtain permission to interact with the element
refYesExact target element reference from the page snapshot
slowlyNoWhether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
submitNoWhether to submit entered text (press Enter after)
textYesText to type into the element

Implementation Reference

  • Handler function that executes the 'browser_type' tool: locates the element, fills or presses sequentially the text (if slowly), and optionally presses Enter if submit is true. Generates code snippets and waits for completion.
    handle: async (tab, params, response) => {
      const locator = await tab.refLocator(params);
    
      await tab.waitForCompletion(async () => {
        if (params.slowly) {
          response.setIncludeSnapshot();
          response.addCode(`await page.${await generateLocator(locator)}.pressSequentially(${javascript.quote(params.text)});`);
          await locator.pressSequentially(params.text);
        } else {
          response.addCode(`await page.${await generateLocator(locator)}.fill(${javascript.quote(params.text)});`);
          await locator.fill(params.text);
        }
    
        if (params.submit) {
          response.setIncludeSnapshot();
          response.addCode(`await page.${await generateLocator(locator)}.press('Enter');`);
          await locator.press('Enter');
        }
      });
    },
  • Schema definition for 'browser_type' tool: defines input schema with element selector (from elementSchema), text, optional submit and slowly flags using Zod validation.
    const typeSchema = elementSchema.extend({
      text: z.string().describe('Text to type into the element'),
      submit: z.boolean().optional().describe('Whether to submit entered text (press Enter after)'),
      slowly: z.boolean().optional().describe('Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.'),
    });
    
    const type = defineTabTool({
      capability: 'core',
      schema: {
        name: 'browser_type',
        title: 'Type text',
        description: 'Type text into editable element',
        inputSchema: typeSchema,
        type: 'destructive',
      },
  • src/tools.ts:38-56 (registration)
    Registration of the 'browser_type' tool (included in keyboard export) by spreading all individual tool modules into the central allTools array.
    export const allTools: Tool<any>[] = [
      ...common,
      ...console,
      ...dialogs,
      ...evaluate,
      ...files,
      ...form,
      ...install,
      ...keyboard,
      ...navigate,
      ...network,
      ...mouse,
      ...pdf,
      ...screenshot,
      ...snapshot,
      ...tabs,
      ...wait,
      ...verify,
    ];
Behavior3/5

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

Annotations indicate destructiveHint=true and readOnlyHint=false, which the description aligns with by implying mutation ('type text'). It adds minimal context about typing behavior but doesn't detail side effects like page changes or error handling, relying heavily on annotations for safety profile.

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, clear sentence with zero waste, front-loading the core action. It's appropriately sized for the tool's complexity, making it easy to parse without unnecessary elaboration.

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 moderate complexity, annotations cover safety, and schema fully documents parameters, but no output schema exists. The description lacks details on return values or error cases, leaving gaps in completeness despite structured data support.

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 parameters are fully documented in the schema. The description adds no extra meaning beyond the schema, such as explaining interactions between parameters like 'slowly' and 'submit'. Baseline score of 3 applies as the schema handles documentation.

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 text') and target ('into editable element'), which is specific and actionable. However, it doesn't differentiate from sibling tools like browser_press_key or browser_file_upload that also involve text input, missing explicit distinction.

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?

No guidance is provided on when to use this tool versus alternatives such as browser_press_key for keyboard input or browser_file_upload for file inputs. The description lacks context about prerequisites or typical scenarios, offering no usage instructions.

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

Related 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/JustasMonkev/mcp-accessibility-scanner'

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