Skip to main content
Glama

merge_models

Merge two stable diffusion checkpoints into a new model by selecting a method (linear, slerp, additive, subtract) and adjusting alpha blend strength.

Instructions

Merge two model checkpoints. Submits the job and waits for completion.

Args:
    model_type: Model architecture — "sd15" or "sdxl"
    base_model: Base model checkpoint filename
    target_model: Target model checkpoint filename
    output_name: Output checkpoint filename for the merged model
    method: Merge method — "linear", "slerp", "additive", or "subtract"
    alpha: Merge strength (0.0-1.0)
    preserve_metadata: Whether to preserve model metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
alphaNo
methodNolinear
base_modelYes
model_typeYes
output_nameYes
target_modelYes
preserve_metadataNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description takes on the full burden of behavioral disclosure. It explicitly states the operation is synchronous ('waits for completion'), which is crucial for an agent deciding whether to call it. It also enumerates all parameters with constraints (e.g., model type enums, alpha range), going beyond the schema. Missing only are details on error handling and side effects, but the core behavior is well-transparent.

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

Conciseness5/5

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

The description is efficient: a single sentence states the action, another notes the blocking behavior, and the Args list is scannable and consistent. No redundant information exists, and every line adds value.

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

Completeness5/5

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

Given the tool's complexity (7 params) and the absence of schema descriptions, the description covers all necessary aspects: what it does, its parameters, and its blocking behavior. Since an output schema exists, return values are not needed. The only minor gap is the lack of interaction guidance with sibling merge tools, but that's already addressed in usage guidelines.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must explain all parameters. It does so comprehensively: each of the 7 parameters is listed with its type and allowed values (e.g., method: 'linear', 'slerp', etc.; alpha: 0.0-1.0). This fully compensates for the schema's lack of descriptions, providing the agent exactly what it needs to invoke the tool correctly.

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 'Merge two model checkpoints' with a specific verb and resource. It also adds the blocking behavior 'Submits the job and waits for completion', which immediately distinguishes it from asynchronous siblings. The purpose is unambiguous and not confused with other tools.

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

Usage Guidelines3/5

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

The description implies usage through its scope (merging exactly two checkpoints) but does not explicitly mention when not to use it or contrast with siblings like batch_merge_models or recipe_merge. An agent could infer appropriate usage, but the guidance is implicit rather than explicit.

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/mcaimi/sd-api-mcp'

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