Skip to main content
Glama

get_branch_context

Retrieve the active Git branch's full context, including saved summaries, divergence from default, and recent commits, to maintain coherent AI agent state across sessions.

Instructions

Returns the combined context for the active Git branch: manually saved summary, divergence from the default branch (if applicable), and recent commits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It clearly indicates a read-only retrieval operation and lists what will be returned, including the 'if applicable' qualifier for divergence. It does not address edge cases like an unborn branch or absent saved summary, but those are minor for this simple read tool.

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?

A single, front-loaded sentence contains no filler and packs the full scope and output contents into a compact, readable definition. Every clause adds information.

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

Completeness4/5

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

For a parameterless tool with no output schema, the description adequately explains what the tool returns and when divergence may be absent. It could mention empty/edge states or commit limits, but nothing essential is missing for an agent to decide to call it.

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?

The tool has zero parameters, so no parameter documentation is needed. The description correctly focuses on the return value rather than input semantics, matching the baseline for parameterless tools.

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?

States a specific verb ('Returns'), a clear resource ('combined context for the active Git branch'), and enumerates the exact contents: saved summary, divergence, and recent commits. It is also readily distinguishable from the sibling save_branch_context, which implies writing rather than reading.

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 makes the retrieval purpose clear: call this when you need the active branch's combined context. It does not explicitly mention when to prefer save_branch_context, but the read-vs-write contrast is strongly implied by the wording.

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

Deploy Server

Other Tools