Skip to main content
Glama

reset_session_branch

Reset the active session branch to control which branch your writes target. Clear cached branch for a fresh one or switch to a specific branch.

Instructions

Reset or switch the active session branch for the current MCP session.

Use this to recover or take control of which branch your writes target:

  • No branch — clears the cached session branch; the next write auto-creates a fresh one. Useful after you have merged your work and want to start a new change set.

  • With branch — points this session at the named branch. If it does not exist and the name matches the configured branch pattern, it is created and reported. The instance default branch and merged/read-only branches are rejected.

Note: a merged or deleted session branch is recovered automatically on the next write — this tool is the explicit override on top of that.

Affects only the calling session; other sessions are unaffected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
branchNoTarget branch. Omit to drop the cached session branch so the next write creates a fresh one. Provide a name to switch this session to that branch (created if it does not exist and the name matches the configured pattern).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Discloses behavioral traits beyond annotations: creates branches if pattern matches, rejects certain branches, affects only calling session. Annotations indicate non-read-only and non-destructive, which aligns. No contradiction.

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?

Well-structured with bullet points and clear sections. Every sentence adds value; no fluff. Appropriate length (~150 words) for the complexity.

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 (branch management with two modes), the description covers behavior, constraints, and automatic recovery. Output schema exists so return values are not needed.

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?

Schema already describes the parameter well (100% coverage), but description adds behavioral context like two modes and rejection rules, enhancing understanding beyond the schema.

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 resets or switches the active session branch with explicit modes (with/without branch). It distinguishes from sibling tools like get_session_info or mutate_graphql by focusing on branch management.

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?

Provides clear guidance on when to use each mode (after merging work or to switch to a named branch) and mentions constraints (rejected branch types, automatic recovery). Does not explicitly compare to siblings but gives sufficient context.

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/opsmill/infrahub-mcp'

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