Skip to main content
Glama

hop_to

Switch to an existing Git worktree by ticket ID, branch name, or path; returns the worktree path and requires running the suggested cd command next.

Instructions

Hop to an existing git worktree by ticket ID, branch name, or path. Use this to switch context to a different ticket. Returns the worktree path. IMPORTANT: After calling this tool, you MUST immediately run the cd command from suggestedCommands to change the working directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugNoCombined with ticket to find a specific worktree when multiple exist for one ticket.
branchNoBranch name to find the worktree for.
ticketNoTicket ID to find the worktree for (matches against branch names).
repoPathNoAny path inside the git repository.
worktreePathNoDirect path to the worktree directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose two non-obvious traits: it returns the worktree path, and the caller MUST run the suggestedCommands cd afterward because the working directory is not changed automatically. It does not cover failure modes (no matching worktree) or how ambiguity between multiple matches resolves.

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?

Front-loaded with the action, then return value, then the critical post-call requirement in caps. Slight redundancy between 'hop to an existing worktree' and 'use this to switch context,' but nothing is wasted.

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?

Covers purpose, lookup keys, return, and the mandatory follow-up cd step for a 5-parameter tool with no output schema. Missing only edge-case behavior: what happens on no match or when multiple worktrees match and slug is omitted.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five selectors are already documented in the schema. The description reinforces that lookup can be by ticket ID, branch name, or path, but adds no syntax, precedence, or fallback detail beyond that; baseline 3 applies.

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 ('hop to'), the resource (an existing git worktree), and the three lookup keys (ticket ID, branch name, path). This is clearly distinguished from siblings like hop_start/git_worktree_create, which create rather than target an existing worktree.

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?

'Use this to switch context to a different ticket' gives clear when-to-use context. It doesn't explicitly name alternatives (hop_list, hop_open) or state exclusions, but the 'existing worktree' framing implicitly separates it from creation/listing siblings.

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