Skip to main content
Glama

add_commands

Insert browser automation commands into existing tests at specified positions to modify test sequences for Selenium-based workflows.

Instructions

Add one or more commands to a test at a specific index. Commands use camelCase names (e.g., "click", "type", "open", "executeScript").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_idYesThe test ID to add commands to
indexYesThe 0-based index at which to insert commands
commandsYesArray of commands to add

Implementation Reference

  • The handler dispatches the tool call (including 'add_commands') to the BridgeClient.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params
    
      try {
        const result = (await bridge.call(name, (args as Record<string, unknown>) || {})) as Record<string, unknown>
  • src/tools.ts:169-198 (registration)
    Tool registration and schema definition for 'add_commands'.
    {
      name: 'add_commands',
      description:
        'Add one or more commands to a test at a specific index. Commands use camelCase names (e.g., "click", "type", "open", "executeScript").',
      inputSchema: {
        type: 'object' as const,
        properties: {
          test_id: {
            type: 'string',
            description: 'The test ID to add commands to',
          },
          index: {
            type: 'number',
            description: 'The 0-based index at which to insert commands',
          },
          commands: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                command: { type: 'string' },
                target: { type: 'string' },
                value: { type: 'string' },
              },
              required: ['command'],
            },
            description: 'Array of commands to add',
          },
        },
        required: ['test_id', 'index', 'commands'],

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/markmircea/Selenix-MCP-Server'

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