{"jsonrpc":"2.0","id":2,"result":{"tools":[{"description":"One-call situational awareness for a repository: HEAD/branch/upstream with ahead-behind, any in-progress operation (merge/rebase/cherry-pick/revert/bisect), working-tree summary, stash count, aggregated recursive submodule drift, recent commits and detected commit conventions, plus `hints` with the recommended next step. Call this first in a session; it replaces 6-10 raw git calls and its output is compact by design to preserve agent context.","inputSchema":{"additionalProperties":false,"properties":{"recentCommits":{"default":10,"description":"How many recent commits to include as one-line entries.","maximum":20,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"repo.brief"},{"description":"Monorepo scoping: everything an agent needs about ONE subtree (e.g. packages/api) in a single read-only call — working-tree changes under the path, recent commits touching it, churn (commits and distinct authors over a window), and code owners from CODEOWNERS when present. Use it to work on a scoped task without paying for whole-repo context; pair with repo.brief for the repository-level picture.","inputSchema":{"additionalProperties":false,"properties":{"churnDays":{"default":90,"description":"Window in days for the churn summary.","maximum":365,"minimum":1,"type":"integer"},"path":{"description":"Repository-relative subtree to scope to, e.g. 'packages/api'. Must not be absolute or contain '..'.","maxLength":32768,"minLength":1,"type":"string"},"recentCommits":{"default":10,"description":"How many recent commits touching the scope to include.","maximum":20,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath","path"],"type":"object"},"name":"repo.scope"},{"description":"List Safety Timeline events synthesized from FluxGit restore points and reflog movement — the repository's recoverability narrative. Use it for 'what happened and can we get it back?' questions; recovery itself always runs inside FluxGit with user approval. Returns ordered events with source (restore_point|reflog) and safe UI actions. Requires the FluxGit app.","inputSchema":{"additionalProperties":false,"properties":{"includeReflog":{"default":true,"type":"boolean"},"includeRestorePoints":{"default":true,"type":"boolean"},"limit":{"maximum":200,"minimum":1,"type":"integer"},"reflogLimit":{"maximum":100,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"runDir":{"maxLength":32768,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"safety.timeline"},{"description":"Read one Safety Timeline event in detail (or the latest when eventId is omitted) plus its safe UI actions, without performing any recovery or mutation. Use it to drill into an event surfaced by safety.timeline before explaining recovery options to the user. Requires the FluxGit app.","inputSchema":{"additionalProperties":false,"properties":{"eventId":{"description":"Safety event id returned by safety.timeline. If omitted, the latest event is returned.","maxLength":4096,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"runDir":{"maxLength":32768,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"safety.eventDetails"},{"description":"Summarize many local repositories into one read-only attention stack — dirty state, divergence and predictive conflict signals per repo — without fetching or mutating disk state. Use it for 'which repo needs me first?' across a fleet; it replaces opening each repo one by one. Returns prioritized entries plus an attentionStack of one-line summaries.","inputSchema":{"additionalProperties":false,"anyOf":[{"required":["repoPaths"]},{"required":["repositories"]}],"properties":{"maxRepos":{"default":200,"description":"Maximum repositories to inspect in this read-only call.","maximum":500,"minimum":1,"type":"integer"},"repoPaths":{"description":"Absolute local repository paths to scan. No fetch is performed.","items":{"maxLength":32768,"minLength":1,"type":"string"},"maxItems":500,"minItems":1,"type":"array"},"repositories":{"description":"Repository objects with optional FluxGit ids and display labels.","items":{"additionalProperties":false,"properties":{"label":{"maxLength":512,"minLength":1,"type":"string"},"repoId":{"maxLength":256,"minLength":1,"type":"string"},"repoPath":{"maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"maxItems":500,"minItems":1,"type":"array"}},"type":"object"},"name":"fleet.radar"},{"description":"Summarize working-tree cleanliness and branch divergence: current branch, ahead/behind upstream and changed-file count in one compact snapshot. Use it as the cheap freshness check before recommending any operation (repo.brief gives the fuller session-start picture). Returns { branch, ahead, behind, clean, changedFiles }.","inputSchema":{"additionalProperties":false,"properties":{"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"repo.status"},{"description":"List local and remote branches, tags, stashes and where HEAD points. Use it to resolve exact ref names before proposing merges or rebases instead of guessing; it replaces git branch -a + git tag + git stash list. Returns grouped ref-name arrays.","inputSchema":{"additionalProperties":false,"properties":{"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"repo.refs"},{"description":"Explain the current branch relationship to upstream, base candidates and related local branches without creating virtual branches.","inputSchema":{"additionalProperties":false,"properties":{"baseCandidates":{"description":"Optional base branch names to try before default main/master/develop/dev/trunk.","items":{"maxLength":4096,"minLength":1,"type":"string"},"maxItems":256,"type":"array"},"maxRelated":{"default":8,"maximum":50,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"repo.branchStack"},{"description":"Predict whether merging a target ref into the current ref will conflict, without mutating HEAD, index or working tree.","inputSchema":{"additionalProperties":false,"properties":{"currentRef":{"default":"HEAD","description":"Current ref or commit to simulate from. Defaults to HEAD.","maxLength":4096,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"targetRef":{"description":"Target ref or commit to merge into currentRef for the read-only preflight.","maxLength":4096,"minLength":1,"type":"string"}},"required":["repoPath","targetRef"],"type":"object"},"name":"repo.conflictPreflight"},{"description":"Read an ACTIVE merge/rebase/cherry-pick conflict as structured data instead of raw <<<<<<< markers: the in-progress operation, the two producing commits (ours/theirs with sha and subject), and per conflicted file its stage classification (both-modified, deleted-by-them, ...), the base/ours/theirs blob contents (size-capped with explicit truncated flags; binary blobs are flagged, never dumped) and the marker region line ranges from the working tree. Call it when repo.brief reports an in-progress operation or git output shows conflict markers — it replaces hand-parsing marker soup. Returns { inConflict: false } when nothing is in progress (use repo.conflictPreflight to PREDICT conflicts instead). Propose resolutions via operation.preview.patch for user approval in FluxGit — never write conflicted files directly.","inputSchema":{"additionalProperties":false,"properties":{"maxBytesPerSide":{"default":16384,"description":"Byte cap per base/ours/theirs content. Truncation is flagged explicitly with the full byte size.","maximum":1048576,"minimum":1,"type":"integer"},"maxFiles":{"default":20,"description":"Maximum conflicted files to include with full detail. The total count is always reported.","maximum":200,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"conflict.read"},{"description":"Read the local reflog movement timeline for HEAD or another ref — every commit the ref recently pointed at, with per-entry old/new commits. Use it for lost-commit and 'what did that operation actually do?' questions; recovery actions themselves go through FluxGit approval flows, never MCP. Returns up to 100 entries (limit clamps at 100).","inputSchema":{"additionalProperties":false,"properties":{"limit":{"maximum":100,"minimum":1,"type":"integer"},"refName":{"default":"HEAD","maxLength":4096,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"repo.reflog"},{"description":"Return paged commit history (newest first) with hash, author and subject per commit. Use it to walk history incrementally instead of dumping the whole log; limit clamps at 200 and the returned nextCursor continues where the page ended.","inputSchema":{"additionalProperties":false,"properties":{"cursor":{"maxLength":4096,"type":"string"},"limit":{"default":50,"description":"Commits per page. Values above 200 are clamped to 200.","maximum":200,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"repo.history"},{"description":"Inspect one commit: full metadata (author, timestamp, parents, message) plus its changed files with status letters. Use it after repo.history when you need what a specific commit touched; it replaces git show --stat. Requires the commit hash or ref.","inputSchema":{"additionalProperties":false,"properties":{"commit":{"maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath","commit"],"type":"object"},"name":"commit.details"},{"description":"Summarize the working tree as staged, unstaged and untracked path lists with two-letter status codes. Use it to see exactly what would be committed or lost before proposing commits, patches or discards; it replaces parsing git status --porcelain by hand.","inputSchema":{"additionalProperties":false,"properties":{"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"worktree.changes"},{"description":"List all git worktrees of a repository (main + linked), one entry per worktree with path, branch or detached HEAD, head SHA and locked/prunable flags. Use this to coordinate parallel agent worktrees: find an existing worktree for a task, or detect leftovers to clean up. Pair with repo.brief({repoPath: <worktree path>}) to inspect one worktree's state.","inputSchema":{"additionalProperties":false,"properties":{"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"worktree.list"},{"description":"List submodules recursively with their pinned commit and drift state. Use it before recommending operations in repos that vendor submodules — drifted or uninitialized submodules are a common source of surprise diffs. Returns one entry per submodule with state flag, commit and path.","inputSchema":{"additionalProperties":false,"properties":{"path":{"maxLength":32768,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"submodule.status"},{"description":"Return the standard unified text diff between two refs (or against the working tree), optionally scoped to one path. Output is byte-capped (default 64 KiB, truncation on a line boundary reported via truncated:true plus totalBytes/totalLines) so a huge diff cannot flood the agent context; raise maxBytes (max 1 MiB) or set maxLines only when needed.","inputSchema":{"additionalProperties":false,"properties":{"base":{"maxLength":4096,"type":"string"},"head":{"maxLength":4096,"type":"string"},"maxBytes":{"default":65536,"description":"Byte cap on the returned diff text. Truncation happens on a line boundary and is reported honestly via truncated:true plus totalBytes/totalLines — the diff is never silently cut.","maximum":1048576,"minimum":1,"type":"integer"},"maxLines":{"description":"Optional line cap applied before the byte cap. Useful for a quick skim of a large diff.","minimum":1,"type":"integer"},"path":{"maxLength":32768,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"diff.text"},{"description":"Request a semantic (syntax-aware) diff under a strict honesty contract: trust the payload only when data.supported is exactly true. With the FluxGit app running (FLUXGIT_MCP_HANDSHAKE_ADDR or FLUXGIT_GATEWAY_ADDR set) and the repository registered in FluxGit, it returns supported:true with per-file semantic hunks from the FluxGit diff engine — line-level change types (added/deleted/modified) plus the exact tokens that changed — and an honest per-file fallbackToText flag (with ready-to-use textDiffArguments) for files the engine could not parse. Without that connection it returns supported:false plus ready-to-use textDiffArguments for a diff.text fallback — never present a text diff as semantic.","inputSchema":{"additionalProperties":false,"properties":{"base":{"maxLength":4096,"type":"string"},"head":{"maxLength":4096,"type":"string"},"path":{"maxLength":32768,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"diff.semantic"},{"description":"List which paths fell back from semantic to text diff and why. With the FluxGit gateway connected it reports the diff engine's real per-file fallbacks for the same base/head selection; without it, it reports the single documented not-connected fallback record. Use it after diff.semantic when reporting to the user which files got a real semantic explanation and which only got the text fallback. Returns one fallback record per affected path.","inputSchema":{"additionalProperties":false,"properties":{"base":{"maxLength":4096,"type":"string"},"head":{"maxLength":4096,"type":"string"},"path":{"maxLength":32768,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"diff.semanticFallbacks"},{"description":"Read the newest FluxGit restore point (before/after commits, canUndo/canRedo eligibility) for a repository. Use it to tell the user whether the last risky operation is reversible; undo/redo itself requires explicit approval inside FluxGit and is never exposed through MCP. Requires the FluxGit app.","inputSchema":{"additionalProperties":false,"properties":{"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"runDir":{"maxLength":32768,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"flux.latestRestorePoint"},{"description":"List FluxGit restore point metadata for a repository without performing any recovery. Use it to explain what recovery options exist before recommending the user act inside FluxGit; limit clamps at 200. Requires the FluxGit app.","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":50,"description":"Restore points to return. Values above 200 are clamped to 200.","maximum":200,"minimum":1,"type":"integer"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"runDir":{"maxLength":32768,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"flux.restorePoints"},{"description":"Read one FluxGit restore point in detail: before/after commits, branch ref, undo/redo eligibility and checkpoint metadata. Use it when the user asks exactly what a restore would do; the restore itself requires approval inside FluxGit. Requires the FluxGit app.","inputSchema":{"additionalProperties":false,"properties":{"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"restorePointId":{"description":"Optional restore point selector. Current beta stores one active Flux checkpoint per repo.","maxLength":4096,"type":"string"},"runDir":{"maxLength":32768,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"flux.restorePointDetails"},{"description":"Check the authoritative status of a previously proposed operation by previewId: pending, approved/executing, completed (with the execution result), failed, rejected, expired or cancelled. Preview calls return promptly while human review continues, so poll this tool before claiming the Git operation completed. Read-only; requires the FluxGit desktop app connection.","inputSchema":{"additionalProperties":false,"properties":{"previewId":{"description":"The previewId returned by an accepted operation.preview.* call.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"required":["previewId"],"type":"object"},"name":"operation.status"},{"description":"Propose a merge for human review inside FluxGit. The sidecar never merges. The call returns a previewId promptly; poll operation.status until completed, failed, rejected, expired or cancelled before reporting an outcome. FluxGit executes only after explicit approval through its safety pipeline. Always include a clear `reason`.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"reason":{"description":"Free-text justification the agent provides for the proposed merge. Shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"sourceRef":{"description":"Ref to merge from (e.g. 'feature/login' or commit SHA).","maxLength":4096,"minLength":1,"type":"string"},"strategy":{"default":"merge","description":"Executable merge strategy. Use operation.preview.rebase for rebase semantics.","enum":["merge","squash"],"maxLength":4096,"type":"string"},"targetRef":{"description":"Ref to merge into (e.g. 'main').","maxLength":4096,"minLength":1,"type":"string"}},"required":["repoPath","sourceRef","targetRef","reason"],"type":"object"},"name":"operation.preview.merge"},{"description":"Propose a rebase for human review inside FluxGit. The sidecar never rebases. The call returns a previewId promptly; poll operation.status for the terminal result. FluxGit shows risk, requires explicit approval, executes through its safety pipeline and captures recovery state. Always include a clear `reason`.","inputSchema":{"additionalProperties":false,"properties":{"currentRef":{"default":"HEAD","description":"Branch or commit to rebase. Defaults to HEAD.","maxLength":4096,"type":"string"},"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"interactive":{"const":false,"default":false,"description":"Must be false. Interactive rebase requires the user to author step actions in FluxGit and is not executable through the approval handshake.","type":"boolean"},"ontoRef":{"description":"Ref to rebase onto (e.g. 'origin/main').","maxLength":4096,"minLength":1,"type":"string"},"reason":{"description":"Free-text justification shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath","ontoRef","reason"],"type":"object"},"name":"operation.preview.rebase"},{"description":"Propose discarding working-tree changes for selected paths. The call returns a previewId promptly; poll operation.status for the terminal result. FluxGit shows exactly what would be lost, captures recovery state and requires explicit approval before touching files. Always include a clear `reason`.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"paths":{"description":"Paths whose working-tree changes the agent proposes to discard. FluxGit shows exactly what would be lost.","items":{"maxLength":32768,"minLength":1,"type":"string"},"maxItems":10000,"minItems":1,"type":"array"},"reason":{"description":"Why these changes should be discarded. Shown to the user.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath","paths","reason"],"type":"object"},"name":"operation.preview.discard"},{"description":"Propose a soft, mixed or hard reset for human review. The call returns a previewId promptly; poll operation.status for the terminal result. FluxGit shows commits at risk, captures a restore point and requires explicit approval; hard reset receives strong confirmation. Always include a clear `reason`.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"mode":{"default":"mixed","description":"Reset mode. Hard reset always requires strong confirmation in the FluxGit UI.","enum":["soft","mixed","hard"],"maxLength":4096,"type":"string"},"reason":{"description":"Why the reset is proposed. Shown to the user.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"targetRef":{"description":"Commit or ref to reset HEAD to.","maxLength":4096,"minLength":1,"type":"string"}},"required":["repoPath","targetRef","reason"],"type":"object"},"name":"operation.preview.reset"},{"description":"Propose applying an agent-generated patch. The call returns a previewId promptly; poll operation.status for the terminal result. FluxGit shows the resulting diff, runs conflict checks and requires explicit approval before touching the working tree. Always include a clear `reason`.","inputSchema":{"additionalProperties":false,"properties":{"applyToIndex":{"default":false,"description":"If true, FluxGit will stage the patched files after approval. The user can override this in the UI.","type":"boolean"},"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"patchContent":{"description":"The patch text in unified diff format that the agent proposes to apply.","maxLength":4194304,"minLength":1,"type":"string"},"reason":{"description":"Why this patch should be applied. Shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath","patchContent","reason"],"type":"object"},"name":"operation.preview.patch"},{"description":"Propose a sequence of 1-10 merge/rebase/discard/reset/patch steps as one reviewable plan. The call returns a previewId promptly; poll operation.status for per-step terminal results. FluxGit shows every step, requires one explicit approval, executes in order through its safety pipeline and stops at the first failure. Always include a clear `reason`.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"reason":{"description":"Why this plan should run as one unit. Shown to the user in the approval dialog above the step list.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"steps":{"description":"Ordered steps of the plan. Each step uses the same fields as the corresponding operation.preview.* tool. Executed in order after one approval; execution stops at the first failure.","items":{"additionalProperties":false,"oneOf":[{"properties":{"operationType":{"const":"merge"}},"required":["sourceRef","targetRef"]},{"properties":{"operationType":{"const":"rebase"}},"required":["ontoRef"]},{"properties":{"operationType":{"const":"discard"}},"required":["paths"]},{"properties":{"operationType":{"const":"reset"}},"required":["targetRef"]},{"properties":{"operationType":{"const":"patch"}},"required":["patchContent"]}],"properties":{"applyToIndex":{"type":"boolean"},"currentRef":{"maxLength":4096,"minLength":1,"type":"string"},"interactive":{"const":false,"default":false,"description":"Must be false; interactive rebase steps are not executable through a batch approval.","type":"boolean"},"mode":{"enum":["soft","mixed","hard"],"type":"string"},"ontoRef":{"maxLength":4096,"minLength":1,"type":"string"},"operationType":{"description":"Which operation this step performs. A step cannot itself be a plan.","enum":["merge","rebase","discard","reset","patch"],"type":"string"},"patchContent":{"maxLength":4194304,"minLength":1,"type":"string"},"paths":{"items":{"maxLength":32768,"minLength":1,"type":"string"},"maxItems":10000,"minItems":1,"type":"array"},"sourceRef":{"maxLength":4096,"minLength":1,"type":"string"},"strategy":{"default":"merge","enum":["merge","squash"],"type":"string"},"targetRef":{"maxLength":4096,"minLength":1,"type":"string"}},"required":["operationType"],"type":"object"},"maxItems":10,"minItems":1,"type":"array"}},"required":["repoPath","steps","reason"],"type":"object"},"name":"operation.preview.plan"},{"description":"Propose creating an isolated Git worktree before editing for a parallel task. Provide `branch`, optional `path`, and a clear `reason`. The call returns a previewId promptly; poll operation.status for the created path. FluxGit requires explicit approval and adds a checkout without rewriting history or deleting files.","inputSchema":{"additionalProperties":false,"properties":{"branch":{"description":"Branch to check out in the new worktree. May be a new branch name (FluxGit creates it) or an existing branch. Each branch can be checked out in only one worktree at a time.","maxLength":4096,"minLength":1,"type":"string"},"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"path":{"description":"Optional absolute path for the worktree directory. Omit it and FluxGit picks a sane default next to the repository.","maxLength":32768,"type":"string"},"reason":{"description":"Why this worktree should be created. Shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"}},"required":["repoPath","branch","reason"],"type":"object"},"name":"operation.preview.worktree"},{"description":"Propose a commit for human review. Provide `message`, a clear `reason`, and optionally `paths` or `stageAll`; omit both staging options to commit exactly what is staged. Amend is intentionally unsupported. The call returns a previewId promptly; poll operation.status for the commit SHA. FluxGit requires approval and uses its hooks, signing and commit policy.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"message":{"description":"Commit message. The first line is the subject; an optional body follows after a blank line.","maxLength":65536,"minLength":1,"type":"string"},"paths":{"description":"Optional paths FluxGit stages before committing. Omit (or pass an empty array) to commit exactly what is already staged.","items":{"maxLength":32768,"minLength":1,"type":"string"},"maxItems":10000,"type":"array"},"reason":{"description":"Why this commit should be created. Shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"stageAll":{"default":false,"description":"If true, FluxGit stages every unstaged working-tree change before committing. Ignored when `paths` is provided.","type":"boolean"}},"required":["repoPath","message","reason"],"type":"object"},"name":"operation.preview.commit"},{"description":"Propose pushing a branch for human review. `remote` defaults to origin, `branch` to the current branch; `setUpstream` publishes tracking and `forceWithLease` explicitly requests a high-risk lease-protected rewrite. The call returns a previewId promptly; poll operation.status for the terminal result. FluxGit requires approval and uses its guarded credential/push pipeline.","inputSchema":{"additionalProperties":false,"properties":{"branch":{"description":"Branch to push. Defaults to the currently checked-out branch.","maxLength":4096,"type":"string"},"forceWithLease":{"default":false,"description":"If true, FluxGit pushes with --force-with-lease. The approval card shows a HIGH risk force warning; use only when intentionally rewriting the remote branch.","type":"boolean"},"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"reason":{"description":"Why this push should happen. Shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"remote":{"default":"origin","description":"Remote to push to. Defaults to 'origin'.","maxLength":4096,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"setUpstream":{"default":false,"description":"If true, FluxGit pushes with --set-upstream so the branch tracks the remote branch afterwards.","type":"boolean"}},"required":["repoPath","reason"],"type":"object"},"name":"operation.preview.push"},{"description":"Propose creating a local branch for human review. Provide `name` and `reason`; `startPoint` defaults to HEAD and `checkout` defaults true. The call returns a previewId promptly; poll operation.status for the terminal result. FluxGit requires approval and validates the ref before adding or checking out the branch.","inputSchema":{"additionalProperties":false,"properties":{"checkout":{"default":true,"description":"If true (the default), FluxGit checks the new branch out after creating it.","type":"boolean"},"idempotencyKey":{"description":"Optional caller-generated key for retrying this same logical proposal without opening a duplicate approval card. Reuse only for retries of one intent; omit it for a new intent even when the other arguments match.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"name":{"description":"Name of the branch to create.","maxLength":4096,"minLength":1,"type":"string"},"reason":{"description":"Why this branch should be created. Shown to the user in the approval modal.","maxLength":4096,"minLength":1,"type":"string"},"repoId":{"description":"Optional FluxGit workspace id. Do not use it as a substitute for repoPath in local sidecar calls.","maxLength":4096,"type":"string"},"repoPath":{"description":"Absolute local repository path. Required for the current read-only local sidecar contract.","maxLength":32768,"minLength":1,"type":"string"},"startPoint":{"default":"HEAD","description":"Commit or ref the new branch starts from. Defaults to HEAD.","maxLength":4096,"type":"string"}},"required":["repoPath","name","reason"],"type":"object"},"name":"operation.preview.branch"},{"description":"Withdraw one of YOUR OWN still-pending operation proposals by previewId before the user decides. Use it when your plan changed and the approval card is now stale, so the user cannot approve an operation you no longer want. It only cancels proposals created by this agent, only while pending, and never touches the repository. Requires the FluxGit desktop app connection (FLUXGIT_MCP_HANDSHAKE_ADDR).","inputSchema":{"additionalProperties":false,"properties":{"previewId":{"description":"The previewId of a still-pending proposal created by this agent. Only the proposing agent can cancel it.","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"required":["previewId"],"type":"object"},"name":"operation.cancel"}]}}