check_installation
Verify Unsloth installation status to ensure proper setup for faster training and reduced memory usage in large language model workflows.
Instructions
Check if Unsloth is properly installed
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:235-258 (handler)Handler for the 'check_installation' tool: calls checkUnslothInstallation() and returns success or error message based on installation status.case 'check_installation': { const isInstalled = await this.checkUnslothInstallation(); if (!isInstalled) { return { content: [ { type: 'text', text: 'Unsloth is not installed. Please install it with: pip install unsloth', }, ], isError: true, }; } return { content: [ { type: 'text', text: 'Unsloth is properly installed.', }, ], }; }
- src/index.ts:70-77 (registration)Registration of the 'check_installation' tool in the ListTools response, including name, description, and empty input schema.{ name: 'check_installation', description: 'Check if Unsloth is properly installed', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:46-53 (helper)Helper function that checks Unsloth installation by attempting to import it via Python exec command.private async checkUnslothInstallation(): Promise<boolean> { try { await execPromise('python -c "import unsloth"'); return true; } catch (error) { return false; } }