Skip to main content
Glama
OtotaO

Unsloth MCP Server

by OtotaO

list_supported_models

Discover available models for fine-tuning and deployment with Unsloth's optimization framework.

Instructions

List all models supported by Unsloth

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:78-85 (registration)
    Registration of the 'list_supported_models' tool, including its name, description, and input schema (empty object).
    {
      name: 'list_supported_models',
      description: 'List all models supported by Unsloth',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The handler function for the 'list_supported_models' tool. It executes a Python script using executeUnslothScript that imports unsloth and returns a hardcoded list of supported models as JSON.
              case 'list_supported_models': {
                const script = `
    import json
    try:
        from unsloth import FastLanguageModel
        # Define a list of supported models
        models = [
            "unsloth/Llama-3.3-70B-Instruct-bnb-4bit",
            "unsloth/Llama-3.2-1B-bnb-4bit",
            "unsloth/Llama-3.2-1B-Instruct-bnb-4bit",
            "unsloth/Llama-3.2-3B-bnb-4bit",
            "unsloth/Llama-3.2-3B-Instruct-bnb-4bit",
            "unsloth/Llama-3.1-8B-bnb-4bit",
            "unsloth/Mistral-7B-Instruct-v0.3-bnb-4bit",
            "unsloth/Mistral-Small-Instruct-2409",
            "unsloth/Phi-3.5-mini-instruct",
            "unsloth/Phi-3-medium-4k-instruct",
            "unsloth/gemma-2-9b-bnb-4bit",
            "unsloth/gemma-2-27b-bnb-4bit",
            "unsloth/Qwen-2.5-7B"
        ]
        print(json.dumps(models))
    except Exception as e:
        print(json.dumps({"error": str(e)}))
    `;
                const result = await this.executeUnslothScript(script);
                
                try {
                  const models = JSON.parse(result);
                  if (models.error) {
                    throw new Error(models.error);
                  }
                  
                  return {
                    content: [
                      {
                        type: 'text',
                        text: JSON.stringify(models, null, 2),
                      },
                    ],
                  };
                } catch (error: any) {
                  throw new Error(`Error parsing model list: ${error.message}`);
                }
              }

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/OtotaO/unsloth-mcp-server'

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