Skip to main content
Glama

act

Control virtual Ubuntu desktops to automate web browsing, run code, and execute bash commands through mouse/keyboard actions for data extraction and task automation.

Instructions

Take action on a Scrapybara instance through an agent. The agent can control the instance with mouse/keyboard and bash commands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesThe ID of the instance to act on.
promptYesThe prompt to act on. <EXAMPLES> - Go to https://ycombinator.com/companies, set batch filter to W25, and extract all company names. - Find the best way to contact Scrapybara. - Order a Big Mac from McDonald's on Doordash. </EXAMPLES>
schemaNoOptional schema if you want to extract structured output.

Implementation Reference

  • Handler for the 'act' tool: parses input with ActSchema, retrieves the Scrapybara instance, sets up tools (computer, bash, edit), calls client.act with model, system prompt, prompt, and schema, then returns the response.
    case "act": {
      const args = ActSchema.parse(request.params.arguments);
      const instance = await client.get(args.instance_id, {
        abortSignal: currentController.signal,
      });
    
      const tools: Scrapybara.Tool[] = [computerTool(instance)];
    
      if (instance instanceof UbuntuInstance) {
        tools.push(bashTool(instance));
        tools.push(editTool(instance));
      }
    
      const actResponse = await client.act({
        model: actModel,
        tools,
        system: actSystem,
        prompt: args.prompt,
        schema: args.schema,
        requestOptions: {
          abortSignal: currentController.signal,
        },
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              { text: actResponse.text, output: actResponse.output },
              null,
              2
            ),
          } as TextContent,
        ],
      };
    }
  • Zod schema for 'act' tool inputs: instance_id (string), prompt (string with examples), schema (optional any).
    export const ActSchema = z.object({
      instance_id: z.string().describe("The ID of the instance to act on."),
      prompt: z.string().describe(`The prompt to act on.
    <EXAMPLES>
    - Go to https://ycombinator.com/companies, set batch filter to W25, and extract all company names.
    - Find the best way to contact Scrapybara.
    - Order a Big Mac from McDonald's on Doordash.
    </EXAMPLES>
    `),
      schema: z
        .any()
        .optional()
        .describe("Optional schema if you want to extract structured output."),
    });
  • src/index.ts:93-98 (registration)
    Tool registration for 'act' in the ListToolsRequestHandler response, including name, description, and inputSchema from ActSchema.
    {
      name: "act",
      description:
        "Take action on a Scrapybara instance through an agent. The agent can control the instance with mouse/keyboard and bash commands.",
      inputSchema: zodToJsonSchema(ActSchema),
    },
  • Helper variables configuring the model and system prompt for the 'act' tool based on ACT_MODEL environment variable.
    let actModel =
      process.env.ACT_MODEL === "anthropic"
        ? anthropic()
        : process.env.ACT_MODEL === "openai"
        ? openai()
        : anthropic(); // Default to Anthropic
    
    let actSystem =
      process.env.ACT_MODEL === "anthropic"
        ? ANTHROPIC_UBUNTU_SYSTEM_PROMPT
        : process.env.ACT_MODEL === "openai"
        ? OPENAI_UBUNTU_SYSTEM_PROMPT
        : ANTHROPIC_UBUNTU_SYSTEM_PROMPT; // Default to Anthropic's prompt
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the agent can control the instance with mouse/keyboard and bash commands, which hints at behavioral traits like interactivity and command execution. However, it doesn't disclose critical details such as whether this is a read/write operation, potential side effects (e.g., data changes), authentication needs, rate limits, or error handling. For a tool with no annotations, this leaves significant gaps in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences that efficiently state the tool's purpose and capabilities. It's front-loaded with the main action and avoids unnecessary details. However, it could be slightly more structured by explicitly separating the agent's roles or adding brief context, but overall it's well-sized and wastes no words.

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?

Given the complexity of controlling an instance with an agent (implying interactive or automated tasks), no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., success status, extracted data), potential errors, or behavioral nuances. For a tool with 3 parameters and significant implied functionality, more context is needed to make it fully usable by an AI agent.

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 the schema already documents all parameters (instance_id, prompt, schema). The description adds minimal semantic value beyond the schema: it implies 'prompt' is for action instructions and 'instance_id' targets a specific instance, but doesn't elaborate on format or constraints. With high schema coverage, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

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 tool's purpose: 'Take action on a Scrapybara instance through an agent' with specific verbs like 'control' and actions like 'mouse/keyboard and bash commands'. It distinguishes from siblings like 'bash' (which might be standalone) and 'get_instances' (which is read-only), though it doesn't explicitly name alternatives. The purpose is specific but could be more precise about the agent's role.

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

Usage Guidelines3/5

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

The description implies usage by mentioning controlling an instance with an agent, suggesting it's for interactive or automated tasks on Scrapybara. However, it lacks explicit guidance on when to use this vs. siblings like 'bash' (e.g., for direct commands) or 'start_instance' (for setup). No exclusions or prerequisites are stated, leaving usage context inferred rather than clearly defined.

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/Scrapybara/scrapybara-mcp'

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