Skip to main content
Glama

swap_server

Replace the model running on a given port with a different one, performing a five-phase swap with automatic rollback on failure. Handles no-ops if the model is already running.

Instructions

Replace the model on this port with a different one. Primary use: an agent replacing its own brain on the harness's expected port. Performs the 5-phase swap (pre-flight, marker, stop, start, readiness) with rollback to the previous model on failure. Calling with the model already running on the port is a successful no-op (action='already_running'). Fails with action='rejected_empty' if the port is empty — use start_server for that case.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portYesPort number to swap the model on
model_nameYesName of the new model to start
Behavior4/5

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

With no annotations, the description carries full burden for behavioral disclosure. It details the 5-phase swap process and rollback on failure, and documents the no-op and rejection scenarios. However, it does not mention potential side effects or permissions required, but still provides substantial transparency.

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 concise (3 sentences) and front-loaded with the primary purpose. Every sentence adds value: purpose, process overview, edge cases. No redundant or vague statements.

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?

For a tool with 2 required parameters, no output schema, and no annotations, the description covers the primary use, the swap process, rollback behavior, and all documented edge cases (no-op, rejected_empty). It is fully adequate for the agent to correctly select and invoke the tool.

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 coverage is 100%, so baseline is high. The description adds meaning by explaining the context around the parameters (e.g., 'harness's expected port') and special values like 'already_running'. This goes beyond the schema descriptions.

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 begins with a clear verb and resource: 'Replace the model on this port with a different one.' It distinguishes the tool from siblings like start_server by explicitly contrasting the failure case 'rejected_empty' and directing to use start_server for that scenario.

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 specifies the primary use case ('an agent replacing its own brain on the harness's expected port'), provides explicit when-not-to-use via the rejected_empty case, and names the alternative tool (start_server). It also describes behavior when the model is already running (successful no-op).

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/shanevcantwell/llauncher'

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