Skip to main content
Glama

stop_instance

Stop a running Scrapybara instance by providing its instance ID. This tool halts virtual Ubuntu desktop operations when they are no longer needed.

Instructions

Stop a running Scrapybara instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesThe ID of the instance to stop.

Implementation Reference

  • Handler for the 'stop_instance' tool. Parses input arguments using StopInstanceSchema, retrieves the Scrapybara instance by ID, stops it, and returns the response as JSON.
    case "stop_instance": {
      const args = StopInstanceSchema.parse(request.params.arguments);
      const instance = await client.get(args.instance_id, {
        abortSignal: currentController.signal,
      });
    
      const response = await instance.stop({
        abortSignal: currentController.signal,
      });
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response, null, 2),
          } as TextContent,
        ],
      };
    }
  • Zod schema defining the input for stop_instance tool: requires 'instance_id' as a string.
    export const StopInstanceSchema = z.object({
      instance_id: z.string().describe("The ID of the instance to stop."),
    });
  • src/index.ts:83-87 (registration)
    Registration of the 'stop_instance' tool in the ListTools response, including name, description, and input schema.
    {
      name: "stop_instance",
      description: "Stop a running Scrapybara instance.",
      inputSchema: zodToJsonSchema(StopInstanceSchema),
    },

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