Skip to main content
Glama

merge_sessions

Merge multiple developer sessions into one target session, resolving conflicts with strategies like latest, oldest, all, or manual, and track attribution.

Instructions

Merge multiple sessions into a single target session (v0.5.0).

Enables teams to combine session insights from multiple developers, resolving conflicts and tracking attribution.

Args: session_ids: List of session IDs to merge (e.g., ["dev1-session", "dev2-session"]) target_session_id: ID for the merged session (e.g., "team-session") conflict_strategy: How to resolve conflicts: - "latest" (default): Use most recent timestamp - "oldest": Use oldest timestamp - "all": Keep all variants (creates numbered versions) - "manual": Return conflicts for manual resolution project_root: Optional project root for local sessions

Returns: Formatted merge result with statistics and conflicts

Examples: # Merge two developer sessions merge_sessions( session_ids=["alice-frontend", "bob-backend"], target_session_id="sprint-23", conflict_strategy="latest" )

# Merge with manual conflict resolution
merge_sessions(
    session_ids=["team-a", "team-b"],
    target_session_id="combined",
    conflict_strategy="manual"
)

# Keep all decision variants
merge_sessions(
    session_ids=["experiment-1", "experiment-2"],
    target_session_id="final",
    conflict_strategy="all"
)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idsYes
project_rootNo
conflict_strategyNolatest
target_session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses conflict resolution strategies, return statistics, and attribution tracking, but does not specify whether source sessions are modified or what happens if the target session already exists. This missing side-effect information is important for a merge operation.

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

Conciseness4/5

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

The description is well-structured with Args, Returns, and Examples, and it front-loads the core purpose. It is slightly longer than necessary due to the version tag and multiple examples, but every section adds practical 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?

The description is complete for a tool with four parameters and an output schema: it explains behavior, parameter options, return value, and provides three usage examples. The output schema is already present, so the Returns line sufficiently summarizes output.

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 0%, but the description fully explains all four parameters, including the meaning of each conflict_strategy option and optional project_root. Examples further clarify parameter usage, making the description the primary source of semantic information.

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 merges multiple sessions into a single target session, with a specific verb and resource. This distinguishes it from siblings like compare_sessions and export_session_summary by focusing on the merging action.

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

Usage Guidelines4/5

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

The description provides clear context: teams combining session insights from multiple developers and resolving conflicts. It does not explicitly list alternatives or when not to use it, but the intended use case is evident from the examples and conflict strategy explanation.

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/amarodeabreu/sensei-mcp'

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