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
| Name | Required | Description | Default |
|---|---|---|---|
| instance_id | Yes | The ID of the instance to stop. |
Implementation Reference
- src/index.ts:161-179 (handler)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, ], }; }
- src/schemas.ts:14-16 (schema)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), },