list_destinations
Shows where a Claude Code item can be moved within the scope hierarchy to organize your development environment.
Instructions
List valid destination scopes for a specific item. Shows where this item can be moved to.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | Category of item | |
| name | Yes | Name of the item | |
| scopeId | Yes | Current scope ID of the item |
Implementation Reference
- src/ui/app.js:1178-1219 (handler)The application fetches available move destinations by querying the /api/destinations endpoint. While the tool name "list_destinations" was requested, this code interacts with the `/api/destinations` endpoint, which is the functional equivalent.
async function openMoveModal(item) { const res = await fetchJson(`/api/destinations?path=${encodeURIComponent(item.path)}&category=${encodeURIComponent(item.category)}&name=${encodeURIComponent(item.name)}`); if (!res.ok) { toast(res.error, true); return; } const listEl = document.getElementById("moveDestList"); const ordered = buildOrderedScopeEntries(res.destinations, res.currentScopeId); let selectedDest = null; listEl.innerHTML = ordered.map(renderDestinationRow).join(""); listEl.querySelectorAll(".dest").forEach((entry) => { if (entry.classList.contains("cur")) return; entry.addEventListener("click", () => { listEl.querySelectorAll(".dest").forEach((node) => node.classList.remove("sel")); entry.classList.add("sel"); selectedDest = entry.dataset.scopeId; document.getElementById("moveConfirm").disabled = false; }); }); document.getElementById("moveConfirm").disabled = true; document.getElementById("moveConfirm").onclick = async () => { if (!selectedDest) return; closeMoveModal(); if (item.locked) { // Locked item — generate CC prompt instead of API call const destScope = getScopeById(selectedDest); const destName = destScope?.name || selectedDest; const prompt = `I want to move this Claude Code ${item.category} to a different scope.\n\nItem: "${item.name}"\nCurrent path: ${item.path}\nMove to scope: ${destName}\n\nBefore moving:\n1. Read the file and understand what it does\n2. Determine the correct destination path for the "${destName}" scope\n3. Check if a ${item.category} with the same name already exists at the destination\n4. Explain what will change — which projects will gain or lose access to this ${item.category}\n5. Warn me about any potential conflicts or breaking changes\n6. Only move the file after I confirm`; navigator.clipboard.writeText(prompt).then(() => { toast("Move prompt copied! Paste to Claude Code in your terminal."); }); } else { await doMove(item, selectedDest); } }; document.getElementById("moveModal").classList.remove("hidden"); }