Skip to main content
Glama

migrate_session

Solve context capacity issues by migrating conversation sessions from a source model to a target model. Returns a decision, migrated messages, and token before/after comparison.

Instructions

把一个会话从源模型迁移到目标模型。

messages_json: JSON 数组字符串,形如 [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]

返回:决策(action / reason / 容量对比)+ 迁移后的消息数组 + token 前后对比。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNomigrated
source_modelYes
target_modelYes
messages_jsonYes
force_compressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral burden. It does disclose the return contract: a decision with action/reason/capacity comparison, a migrated message array, and token comparison. However, it does not state whether the original session is mutated, whether the operation is safe to re-run, or what side effects it has, which is important for a tool named 'migrate'.

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 compact, front-loads the core purpose, and efficiently contains the message format example plus the return summary. There is no filler, repetition, or unnecessary dependency on structured fields.

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

Completeness2/5

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

With 5 parameters, 0% schema coverage, no annotations, and no output schema, the tool description is not complete enough for reliable invocation. It omits force_compress semantics, model identifier constraints, session_id purpose, and any error or edge-case behavior. The return description helps but does not fill these gaps.

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

Parameters2/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 compensate. It documents messages_json with a concrete format example, but it does not explain source_model, target_model, session_id, or force_compress. In particular, force_compress is a boolean that could significantly change behavior, and the agent is given no clue about its effect.

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 opening phrase '把一个会话从源模型迁移到目标模型' clearly names the verb (migrate), the resource (session/conversation), and the source-to-target relationship. It is obviously distinct from siblings model_context_window and list_known_models, so an agent can identify the tool without inspecting the schema.

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 intended use is implied by the purpose: use it when a session needs to be migrated to another model. However, there is no explicit when-to-use/when-not-to-use guidance, no prerequisites or constraints (e.g., target model compatibility), and no discussion of how it relates to the sibling tools.

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