Skip to main content
Glama

bash

Execute bash commands on specified instances within the Scrapybara MCP server to manage and control virtual Ubuntu desktops efficiently.

Instructions

Run a bash command in a Scrapybara instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe command to run in the instance shell.
instance_idYesThe ID of the instance to run the command on.

Implementation Reference

  • Handler for the 'bash' MCP tool: parses arguments using BashSchema, retrieves the Scrapybara instance, executes the bash command via instance.bash(), and returns the response.
    case "bash": { const args = BashSchema.parse(request.params.arguments); const instance = await client.get(args.instance_id, { abortSignal: currentController.signal, }); if ("bash" in instance) { const response = await instance.bash( { command: args.command }, { abortSignal: currentController.signal } ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2), } as TextContent, ], }; } else { throw new Error("Instance does not support bash commands"); } }
  • Zod schema for 'bash' tool input: requires instance_id and command.
    export const BashSchema = z.object({ instance_id: z .string() .describe("The ID of the instance to run the command on."), command: z.string().describe("The command to run in the instance shell."), });
  • src/index.ts:89-92 (registration)
    Registration of the 'bash' tool in the ListTools response, providing name, description, and input schema.
    name: "bash", description: "Run a bash command in a Scrapybara instance.", inputSchema: zodToJsonSchema(BashSchema), },

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

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