stop_instance
Stop a running instance on Scrapybara MCP by specifying the instance ID. This tool ensures controlled termination of virtual Ubuntu desktops for efficient resource management.
Instructions
Stop a running Scrapybara instance.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | The ID of the instance to stop. |
Implementation Reference
- src/index.ts:161-179 (handler)Handler logic for the 'stop_instance' tool: parses arguments, retrieves the 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, ], }; }
- src/schemas.ts:14-16 (schema)Zod schema for 'stop_instance' input: requires 'instance_id' string.export const StopInstanceSchema = z.object({ instance_id: z.string().describe("The ID of the instance to stop."), });
- src/index.ts:83-87 (registration)Tool registration in ListToolsRequestHandler, providing name, description, and input schema.{ name: "stop_instance", description: "Stop a running Scrapybara instance.", inputSchema: zodToJsonSchema(StopInstanceSchema), },