Skip to main content
Glama

create_job

Fine-tune an LLM on a GitHub repository to learn code patterns and conventions. Choose a training agent: Cody for code autocomplete or SIERA for bug-fix specialization.

Instructions

Fine-tune an LLM on a GitHub repository using Tuning Engines. This trains a custom model that learns from the code patterns, style, and conventions in the repo. Choose an agent to control the training approach:

AVAILABLE AGENTS:

  • agent='code_repo' (Cody) — LoRA-based code fine-tuning using QLoRA (4-bit quantized LoRA) via the Axolotl framework. Trains on your repo's code patterns, naming conventions, and project structure to produce a fast, lightweight adapter. Best for: code autocomplete, inline suggestions, tab-complete, code style matching.

  • agent='sera_code_repo' (SIERA) — Bug-fix specialist using the Open Coding Agents approach from AllenAI. Generates synthetic error-resolution training pairs from your repo, producing a model that understands your codebase's failure patterns and fix conventions. Best for: debugging, error resolution, patch generation, root cause analysis. Supports quality_tier='low' (faster) or quality_tier='high' (deeper analysis, more training data).

SUPPORTED BASE MODELS (by size):

  • 3B: Qwen/Qwen2.5-Coder-3B-Instruct

  • 7-8B: codellama/CodeLlama-7b-hf, deepseek-ai/deepseek-coder-7b-instruct-v1.5, Qwen/Qwen2.5-Coder-7B-Instruct, Qwen/Qwen3-8B

  • 13-15B: codellama/CodeLlama-13b-Instruct-hf, bigcode/starcoder2-15b, Qwen/Qwen2.5-Coder-14B-Instruct, Qwen/Qwen3-14B

  • 22-27B: mistralai/Codestral-22B-v0.1, google/gemma-2-27b

  • 30-34B: deepseek-ai/deepseek-coder-33b-instruct, codellama/CodeLlama-34b-Instruct-hf, Qwen/Qwen2.5-Coder-32B-Instruct, Qwen/Qwen3-Coder-30B-A3B, Qwen/Qwen3-32B

  • 70-72B: codellama/CodeLlama-70b-Instruct-hf, meta-llama/Llama-3.1-70B-Instruct, Qwen/Qwen2.5-72B-Instruct

TYPICAL WORKFLOW: estimate_job first to check cost, then create_job, then job_status to monitor progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
base_modelNoHuggingFace model ID to fine-tune (e.g. 'Qwen/Qwen2.5-Coder-7B-Instruct'). Required unless base_user_model_id is provided. Use list_supported_models to see all options.
base_user_model_idNoID of a previously trained model to fine-tune further (iterative training). The base model is resolved automatically. Use list_models to find IDs.
output_nameYesName for the resulting fine-tuned model (e.g. 'my-project-cody-7b')
repo_urlYesGitHub repository URL to train on (e.g. 'https://github.com/org/repo')
branchNoGit branch to use (default: main)
num_epochsNoNumber of training epochs (more = better quality but higher cost)
max_examplesNoMaximum training examples to extract from the repo (minimum: 2)
agentNoTraining agent to use. 'code_repo' (Cody) = QLoRA-based fine-tuning for code autocomplete and inline suggestions. 'sera_code_repo' (SIERA) = bug-fix specialist using AllenAI's Open Coding Agents approach. Default: 'code_repo'.
quality_tierNoQuality tier (SIERA agent only). 'low' = faster, fewer synthetic pairs. 'high' = deeper analysis, more training data, better results. Default: 'low'.
s3_output_bucketNoS3 bucket to export the trained model to. If omitted, model is stored in Tuning Engines cloud storage.
s3_access_key_idNoAWS access key ID for S3 export
s3_secret_access_keyNoAWS secret access key for S3 export
s3_regionNoAWS region for S3 export (e.g. us-east-1)

Implementation Reference

  • MCP tool handler for 'create_job' - validates inputs (requires base_model or base_user_model_id), then calls the client's createJob method with all optional parameters.
    case "create_job":
      if (!args?.base_model && !args?.base_user_model_id) {
        return {
          content: [{ type: "text", text: "Error: either base_model or base_user_model_id is required" }],
          isError: true,
        };
      }
      result = await getClient().createJob({
        base_model: args?.base_model as string | undefined,
        base_user_model_id: args?.base_user_model_id as string | undefined,
        output_name: args!.output_name as string,
        repo_url: args?.repo_url as string | undefined,
        branch: args?.branch as string | undefined,
        num_epochs: args?.num_epochs as number | undefined,
        max_examples: args?.max_examples as number | undefined,
        s3_output_bucket: args?.s3_output_bucket as string | undefined,
        s3_access_key_id: args?.s3_access_key_id as string | undefined,
        s3_secret_access_key: args?.s3_secret_access_key as string | undefined,
        s3_region: args?.s3_region as string | undefined,
        agent: args?.agent as string | undefined,
        quality_tier: args?.quality_tier as string | undefined,
      });
  • MCP tool registration schema for 'create_job' - defines name, description, input properties, and required fields (output_name, repo_url).
    name: "create_job",
    description:
      "Fine-tune an LLM on a GitHub repository using Tuning Engines. " +
      "This trains a custom model that learns from the code patterns, style, and conventions in the repo. " +
      "Choose an agent to control the training approach:\n\n" +
      "AVAILABLE AGENTS:\n" +
      "- agent='code_repo' (Cody) — LoRA-based code fine-tuning using QLoRA (4-bit quantized LoRA) via the Axolotl framework. " +
      "Trains on your repo's code patterns, naming conventions, and project structure to produce a fast, lightweight adapter. " +
      "Best for: code autocomplete, inline suggestions, tab-complete, code style matching.\n" +
      "- agent='sera_code_repo' (SIERA) — Bug-fix specialist using the Open Coding Agents approach from AllenAI. " +
      "Generates synthetic error-resolution training pairs from your repo, producing a model that understands your " +
      "codebase's failure patterns and fix conventions. Best for: debugging, error resolution, patch generation, root cause analysis. " +
      "Supports quality_tier='low' (faster) or quality_tier='high' (deeper analysis, more training data).\n\n" +
      "SUPPORTED BASE MODELS (by size):\n" +
      "- 3B: Qwen/Qwen2.5-Coder-3B-Instruct\n" +
      "- 7-8B: codellama/CodeLlama-7b-hf, deepseek-ai/deepseek-coder-7b-instruct-v1.5, Qwen/Qwen2.5-Coder-7B-Instruct, Qwen/Qwen3-8B\n" +
      "- 13-15B: codellama/CodeLlama-13b-Instruct-hf, bigcode/starcoder2-15b, Qwen/Qwen2.5-Coder-14B-Instruct, Qwen/Qwen3-14B\n" +
      "- 22-27B: mistralai/Codestral-22B-v0.1, google/gemma-2-27b\n" +
      "- 30-34B: deepseek-ai/deepseek-coder-33b-instruct, codellama/CodeLlama-34b-Instruct-hf, Qwen/Qwen2.5-Coder-32B-Instruct, Qwen/Qwen3-Coder-30B-A3B, Qwen/Qwen3-32B\n" +
      "- 70-72B: codellama/CodeLlama-70b-Instruct-hf, meta-llama/Llama-3.1-70B-Instruct, Qwen/Qwen2.5-72B-Instruct\n\n" +
      "TYPICAL WORKFLOW: estimate_job first to check cost, then create_job, then job_status to monitor progress.",
    inputSchema: {
      type: "object" as const,
      properties: {
        base_model: {
          type: "string",
          description:
            "HuggingFace model ID to fine-tune (e.g. 'Qwen/Qwen2.5-Coder-7B-Instruct'). Required unless base_user_model_id is provided. Use list_supported_models to see all options.",
        },
        base_user_model_id: {
          type: "string",
          description:
            "ID of a previously trained model to fine-tune further (iterative training). The base model is resolved automatically. Use list_models to find IDs.",
        },
        output_name: {
          type: "string",
          description:
            "Name for the resulting fine-tuned model (e.g. 'my-project-cody-7b')",
        },
        repo_url: {
          type: "string",
          description:
            "GitHub repository URL to train on (e.g. 'https://github.com/org/repo')",
        },
        branch: {
          type: "string",
          description: "Git branch to use (default: main)",
        },
        num_epochs: {
          type: "number",
          description: "Number of training epochs (more = better quality but higher cost)",
        },
        max_examples: {
          type: "number",
          description: "Maximum training examples to extract from the repo (minimum: 2)",
        },
        agent: {
          type: "string",
          enum: ["code_repo", "sera_code_repo"],
          description:
            "Training agent to use. 'code_repo' (Cody) = QLoRA-based fine-tuning for code autocomplete and inline suggestions. " +
            "'sera_code_repo' (SIERA) = bug-fix specialist using AllenAI's Open Coding Agents approach. " +
            "Default: 'code_repo'.",
        },
        quality_tier: {
          type: "string",
          enum: ["low", "high"],
          description:
            "Quality tier (SIERA agent only). 'low' = faster, fewer synthetic pairs. 'high' = deeper analysis, more training data, better results. Default: 'low'.",
        },
        s3_output_bucket: {
          type: "string",
          description:
            "S3 bucket to export the trained model to. If omitted, model is stored in Tuning Engines cloud storage.",
        },
        s3_access_key_id: {
          type: "string",
          description: "AWS access key ID for S3 export",
        },
        s3_secret_access_key: {
          type: "string",
          description: "AWS secret access key for S3 export",
        },
        s3_region: {
          type: "string",
          description: "AWS region for S3 export (e.g. us-east-1)",
        },
      },
      required: ["output_name", "repo_url"],
    },
  • src/mcp.ts:89-179 (registration)
    Tool registration entry in the MCP ListTools response - the 'create_job' tool is registered as one of the available tools in the server's tool list.
      name: "create_job",
      description:
        "Fine-tune an LLM on a GitHub repository using Tuning Engines. " +
        "This trains a custom model that learns from the code patterns, style, and conventions in the repo. " +
        "Choose an agent to control the training approach:\n\n" +
        "AVAILABLE AGENTS:\n" +
        "- agent='code_repo' (Cody) — LoRA-based code fine-tuning using QLoRA (4-bit quantized LoRA) via the Axolotl framework. " +
        "Trains on your repo's code patterns, naming conventions, and project structure to produce a fast, lightweight adapter. " +
        "Best for: code autocomplete, inline suggestions, tab-complete, code style matching.\n" +
        "- agent='sera_code_repo' (SIERA) — Bug-fix specialist using the Open Coding Agents approach from AllenAI. " +
        "Generates synthetic error-resolution training pairs from your repo, producing a model that understands your " +
        "codebase's failure patterns and fix conventions. Best for: debugging, error resolution, patch generation, root cause analysis. " +
        "Supports quality_tier='low' (faster) or quality_tier='high' (deeper analysis, more training data).\n\n" +
        "SUPPORTED BASE MODELS (by size):\n" +
        "- 3B: Qwen/Qwen2.5-Coder-3B-Instruct\n" +
        "- 7-8B: codellama/CodeLlama-7b-hf, deepseek-ai/deepseek-coder-7b-instruct-v1.5, Qwen/Qwen2.5-Coder-7B-Instruct, Qwen/Qwen3-8B\n" +
        "- 13-15B: codellama/CodeLlama-13b-Instruct-hf, bigcode/starcoder2-15b, Qwen/Qwen2.5-Coder-14B-Instruct, Qwen/Qwen3-14B\n" +
        "- 22-27B: mistralai/Codestral-22B-v0.1, google/gemma-2-27b\n" +
        "- 30-34B: deepseek-ai/deepseek-coder-33b-instruct, codellama/CodeLlama-34b-Instruct-hf, Qwen/Qwen2.5-Coder-32B-Instruct, Qwen/Qwen3-Coder-30B-A3B, Qwen/Qwen3-32B\n" +
        "- 70-72B: codellama/CodeLlama-70b-Instruct-hf, meta-llama/Llama-3.1-70B-Instruct, Qwen/Qwen2.5-72B-Instruct\n\n" +
        "TYPICAL WORKFLOW: estimate_job first to check cost, then create_job, then job_status to monitor progress.",
      inputSchema: {
        type: "object" as const,
        properties: {
          base_model: {
            type: "string",
            description:
              "HuggingFace model ID to fine-tune (e.g. 'Qwen/Qwen2.5-Coder-7B-Instruct'). Required unless base_user_model_id is provided. Use list_supported_models to see all options.",
          },
          base_user_model_id: {
            type: "string",
            description:
              "ID of a previously trained model to fine-tune further (iterative training). The base model is resolved automatically. Use list_models to find IDs.",
          },
          output_name: {
            type: "string",
            description:
              "Name for the resulting fine-tuned model (e.g. 'my-project-cody-7b')",
          },
          repo_url: {
            type: "string",
            description:
              "GitHub repository URL to train on (e.g. 'https://github.com/org/repo')",
          },
          branch: {
            type: "string",
            description: "Git branch to use (default: main)",
          },
          num_epochs: {
            type: "number",
            description: "Number of training epochs (more = better quality but higher cost)",
          },
          max_examples: {
            type: "number",
            description: "Maximum training examples to extract from the repo (minimum: 2)",
          },
          agent: {
            type: "string",
            enum: ["code_repo", "sera_code_repo"],
            description:
              "Training agent to use. 'code_repo' (Cody) = QLoRA-based fine-tuning for code autocomplete and inline suggestions. " +
              "'sera_code_repo' (SIERA) = bug-fix specialist using AllenAI's Open Coding Agents approach. " +
              "Default: 'code_repo'.",
          },
          quality_tier: {
            type: "string",
            enum: ["low", "high"],
            description:
              "Quality tier (SIERA agent only). 'low' = faster, fewer synthetic pairs. 'high' = deeper analysis, more training data, better results. Default: 'low'.",
          },
          s3_output_bucket: {
            type: "string",
            description:
              "S3 bucket to export the trained model to. If omitted, model is stored in Tuning Engines cloud storage.",
          },
          s3_access_key_id: {
            type: "string",
            description: "AWS access key ID for S3 export",
          },
          s3_secret_access_key: {
            type: "string",
            description: "AWS secret access key for S3 export",
          },
          s3_region: {
            type: "string",
            description: "AWS region for S3 export (e.g. us-east-1)",
          },
        },
        required: ["output_name", "repo_url"],
      },
    },
  • Client helper that makes the HTTP POST request to the backend API at /api/v1/jobs to create a fine-tuning job.
    async createJob(params: {
      base_model?: string;
      output_name: string;
      repo_url?: string;
      branch?: string;
      github_token?: string;
      num_epochs?: number;
      max_examples?: number;
      base_user_model_id?: string;
      s3_output_bucket?: string;
      s3_access_key_id?: string;
      s3_secret_access_key?: string;
      s3_region?: string;
      agent?: string;
      quality_tier?: string;
    }): Promise<any> {
      return this.request("POST", "/api/v1/jobs", params);
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains that training produces a custom model using QLoRA (code_repo) or synthetic error-resolution pairs (sera_code_repo), and mentions that the model can be stored in cloud storage or exported to S3. It does not detail potential side effects, rate limits, or the exact output format, but the description is fairly transparent about the training process and output destinations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for agents, base models, and workflow, but it is quite lengthy, particularly the exhaustive list of supported base models which could be omitted since users can use list_supported_models. While the structure is clear, conciseness is slightly compromised by the inclusion of redundant details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of fine-tuning an LLM, the description is fairly complete. It explains the tool's purpose, agents, supported base models, and workflow. It references sibling tools for cost estimation and monitoring. However, it does not describe the return value or response structure (e.g., job ID or status), which would be helpful. Since there is no output schema, a brief note on what the tool returns would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so the schema already documents all parameters. The description adds value by providing extra context for the agent and quality_tier parameters, including best-use recommendations ('Best for: code autocomplete, inline suggestions...') and agent-specific behavior. This goes beyond the schema's enum descriptions, justifying a score above the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Fine-tune an LLM on a GitHub repository using Tuning Engines.' It specifies the action (fine-tune), the resource (LLM), and the data source (GitHub repo). The description distinguishes the tool from siblings like estimate_job and job_status by outlining the typical workflow, and it further differentiates the two agents (code_repo and sera_code_repo) with explicit use cases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines, including a 'TYPICAL WORKFLOW' section that advises users to run estimate_job first for cost estimation, then create_job, and finally job_status to monitor progress. It also clarifies when to use each agent and the quality_tier parameter for the SIERA agent, offering clear decision criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/cerebrixos-org/tuning-engines-cli'

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