Kawa Code

v10.6.0
ai.kawacode/mcp Checked 1 hour ago Published 16 days ago

Team-aware memory: intent, decisions, real-time conflicts for AI coding assistants.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_relevant_context

Find past intents and decisions relevant to the current user request. When to use: - After you have done a quick initial exploration of the user's request and know which files are involved. Calling earlier with only a vague prompt gives weak results. - To pull task-specific context instead of dumping all recent activity — preferred for large projects. Inputs of note: - `prompt`: the user request, in their words or your paraphrase. - `activeFiles` (recommended): files you have identified as relevant to the request. Significantly improves relevance. - `maxIntents`, `maxDecisions`, `minReleva…

ParameterTypeDescription
prompt *stringThe user request to find relevant context for
repoPath *stringLocal path to the repository root
activeFilesarrayFiles currently being discussed or recently opened
maxDecisionsnumberMaximum number of decisions to return
maxIntentsnumberMaximum number of intents to return
minRelevancenumberMinimum relevance score (0-1)
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

check_active_intent

REQUIRED before writing any code. Returns this session's current intent; if there is none, confirm the details with the user and call create_and_activate_intent. Intents are active PER SESSION — many can be active on one repo at once. hasActiveIntent reflects only YOUR session, while activeIntents lists every session's current intent (yours and teammates') and may be non-empty when you have none. A stale intent stays "active"; terminal states are committed / pushed / done / abandoned / superseded.

ParameterTypeDescription
repoPath *stringLocal path to the repository root
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

create_and_activate_intent

Create a new intent from the user's request and mark it as active for THIS session. Call this when check_active_intent returns no active intent for your session. Before calling: 1. Summarize what the user is asking for 2. Ask the user to confirm the intent details (title, description, type) 3. Then call this tool with the confirmed details This ensures all AI-generated code gets properly tracked and attributed. Multi-active model: many intents can be active on a repo at once (one per session/teammate). Creating + activating one only sets YOUR session's current focus — it never blocks or d…

ParameterTypeDescription
description *stringWhat this intent accomplishes
repoPath *stringLocal path to the repository root
title *stringShort, descriptive title for the intent
constraintsarrayRequirements or constraints for this work
pendingIdstringOnly after a pending_approval response: the pendingId it returned. Asks whether the user has decided. Pass the same title, description and repoPath as before.
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
templateTypestringType of work

activate_intent

Activate an existing intent by ID — sets it as THIS session's current focus. Use this to: - Switch your current focus to a different intent found via list_team_intents or get_relevant_context - Re-activate an intent that was deactivated (e.g., to complete it) - Resume work on a previously created intent - Resume an "abandoned" intent (see below) Accepts both cloud IDs (from get_relevant_context / API) and local UUIDs (from list_team_intents). Multi-active model: activating an intent only moves YOUR session's current pointer. Many intents can be active on a repo at once (one current per se…

ParameterTypeDescription
intentId *stringThe cloud ID (preferred) or local UUID of the existing intent to activate.
repoPath *stringLocal path to the repository root
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

resume_intent

Resume an existing intent by ID in one call — activate it AND load its recorded decisions. Use this to pick up a handoff. When a prompt says "follow up on intent <id>" (or you otherwise want to continue a specific existing intent), call resume_intent(<id>) instead of creating a new one. It: - activates the intent as THIS session's current focus (multi-active — never displaces a teammate's active intent), and - returns the intent's title/description/status plus its recorded decisions (summary-only; call get_decision_detail(id) for full rationale on any one). This is the fast path for cros…

ParameterTypeDescription
intentId *stringThe cloud ID (preferred) or local UUID of the intent to resume — e.g. the id from a "follow up on intent <id>" handoff.
repoPath *stringLocal path to the repository root
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

get_intents_for_file

Intents with code blocks in a file, so you can see in-progress work and team conflicts before editing. Pass startLine + endLine to narrow to a range; the result then reports the exact overlap and warns when it hits a teammate's active intent.

ParameterTypeDescription
filePath *stringPath to the file (relative to repo root)
repoPath *stringLocal path to the repository root
endLinenumberEnd line (1-based, inclusive). Provide with startLine to narrow to a range.
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
startLinenumberStart line (1-based). Provide with endLine to narrow to a range.

list_team_intents

List intents from team members for this repository. Use this to: - See what your team is working on - Check for potential overlapping work before starting a new task - Review the status of various features/refactors in progress Filtering (status, author, date range) and pagination are applied server-side across the full result set (default: 50 per page; use limit/offset to page). `count` is the total number of matching intents, not just the returned page.

ParameterTypeDescription
repoPath *stringLocal path to the repository root
authorstringFilter by author name or ID
limitnumberMaximum number of intents to return (default: 50)
offsetnumberNumber of intents to skip for pagination (default: 0)
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
sincestringFilter intents updated after this ISO8601 date (e.g. "2026-04-01")
statusstringFilter by intent status.
untilstringFilter intents updated before this ISO8601 date

complete_intent

Mark the active intent completed and clear it. Call after a successful commit, passing commitSha so code blocks are captured. status: committed (default, local commit) | pushed | done | abandoned. You MUST inspect the response: - success === true — done. If committedDecisionCount > 0, say N decisions were recorded; do NOT list them. If apiSyncDeferred, say the sync was deferred and will replay. If collisions is non-empty, relay it as an advisory coordination heads-up (collisions[].label + files) — the completion still succeeded. If deferredConflicts is non-empty, the completion ALSO suc…

ParameterTypeDescription
repoPath *stringLocal path to the repository root
commitShastringThe commit SHA (git) or revision id (svn) to associate with this intent (if already committed)
humanApprovedbooleanSet to true ONLY when the human has explicitly confirmed closing an intent created by ANOTHER team member. Required for that cross-author case; ignored for your own intents. NEVER set this on your own…
intentIdstringTarget intent to complete/abandon. When omitted, completes THIS session's current intent. When provided, targets that specific intent directly — this is how you force-close an intent that is not you…
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
statusstringThe new status for the intent. Use "committed" after a commit, "done" when work is complete, "abandoned" to discard, "superseded" when another intent replaces this one.
supersededBystringIntent ID that supersedes this one. Required when status is "superseded".

update_intent

Update an active intent's title, description, scope, or constraints. Use this to reformulate an intent as understanding evolves during work. Intents are living documents — they should be updated to reflect what the work actually became, not left as the initial guess. Common triggers for reformulation: - The real problem turned out to be different from the initial hypothesis - Scope expanded or narrowed during investigation - The approach changed after discovering constraints If no intentId is provided, the currently active intent is updated.

ParameterTypeDescription
repoPath *stringLocal path to the repository root
constraintsarrayUpdated constraints for this work
descriptionstringUpdated description for the intent
intentIdstringID of the intent to update. If omitted, updates the currently active intent.
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
scopeobjectUpdated scope for the intent
titlestringUpdated title for the intent

log_work

DEPRECATED — trivial changes (typos, one-line fixes, obvious bugs, doc updates, config changes) should skip the intent workflow entirely: just make the change and commit, no intent needed. Do not call this tool. Kept available for backwards compatibility only and will be removed in a future release.

ParameterTypeDescription
repoPath *stringLocal path to repository root
title *stringShort description of the work done
filesarrayFile paths modified (relative to repo root)
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

record_decision

Silently record a decision point during development. Call this tool when you: - Choose between multiple alternatives (type: fork) - Try an approach that fails or is rejected (type: abandoned) - Find unexpected behavior or limitations (type: discovery) - Identify a hard constraint that must be respected (type: constraint) - Make an explicit trade-off between competing concerns (type: tradeoff) - Select an external library or dependency (type: dependency) Decisions can be **intent-scoped** (tied to a specific work unit) or **repo-scoped** (general knowledge like discoveries and constraints). O…

ParameterTypeDescription
rationale *stringWhy this decision was made
repoPath *stringLocal path to the repository root (enables offline sync)
summary *stringBrief summary of the decision (< 100 chars recommended)
type *stringType of decision: fork (chose between alternatives), abandoned (tried and rejected), discovery (found unexpected behavior), constraint (identified hard requirement), tradeoff (made explicit trade-off)…
alternativesarrayOther options that were considered
appliesWhenstringTrigger condition / "How to apply" — populate ONLY when the decision is plainly conditional (e.g. "language is Go", "when running in production", "when working in module X", "when the error is ECONN…
confidencestringSelf-rated confidence in the decision. Meaningful only for extractor and infer_history sources — leave null for deliberate recordings.
consequencesstringDownstream implications of this decision
constraintViolationsarrayAlternatives that were rejected due to constraint violations
constraintsCheckedarrayWhich architectural constraints were verified before this decision
contextstringWhat we were trying to accomplish when this decision was made
intentIdstringThe intent ID this decision belongs to. Omit for repo-scoped decisions (discoveries, constraints) not tied to a specific work unit
relatedFilesarrayFile paths affected by this decision
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
resolvedCollisionobjectLayer C audit — set ONLY when this decision records how you resolved a completion-time code collision (i.e. after complete_intent returned resolution_required). Links the decision to the live peer y…
sourcestringProvenance: user (human-recorded), agent (AI deliberately recorded via this tool — the default), extractor (from thought-chain extraction), infer_history (from commit-history extraction). Most calle…
sourceThoughtIdsarrayThought-chain entry IDs this record was extracted from. Only set by the extractor path.
supersedesarrayDecision IDs that this one replaces. When a later decision supersedes an earlier one, pass the earlier decisionId(s) here so the evolve pipeline can track the lineage. Pass FULL decision IDs (36-char…
surfacearrayWhich ceremony(ies) this decision should be surfaced at, controlling when it interrupts future work. Values: "pre-edit" (per-edit block via pre_edit_decision_check — for correctness/security constra…
symptomstringObservable symptom that indicates this decision is relevant (e.g., error messages, runtime panics, unexpected behavior). Useful for discovery and constraint decisions.

get_session_decisions

Get all decisions recorded in the current session for an intent. Use this before committing to review what decisions were captured during development. Decisions are presented for user review and can be edited or removed before being persisted. Returns: - intentId: The intent these decisions belong to - decisions: Array of decision points (summary-only — call get_decision_detail(decisionId) for full rationale/context/consequences/alternatives) - count: Number of decisions recorded

ParameterTypeDescription
intentId *stringThe intent ID to get decisions for
repoPath *stringLocal path to the repository root
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

get_project_decisions

ONE PAGE of the project's decisions across all intents, newest first — architectural choices, trade-offs, and the constraints they respected. Max 100 rows. If `hasMore`, you are holding a prefix, not the history: walk it with `offset`, or better, use get_relevant_context for the decisions that bear on your task. For the whole corpus (export, audit), use Kawa Code, not this tool. Returns: decisions (this page, with intent context), count / totalCount / hasMore. Each decision is summary-only — call get_decision_detail(decisionId) for rationale/context/consequences/alternatives: - intentId…

ParameterTypeDescription
repoPath *stringLocal path to the repository root
limitnumberRows per page, 1-100 (default 100).
offsetnumberRows to skip (default 0).
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

get_decision_detail

Expand one decision to its full detail. Recall surfaces (get_relevant_context, get_project_decisions, get_session_decisions) return decisions summary-only to keep context lean. Use this to pull the full reasoning for a single decision you want to open — pay for detail only where you ask for it. Inputs: - `decisionId`: the decision to expand (the `id` / `decisionId` from a recall result). Returns the decision's `rationale`, `context`, `consequences`, `alternatives`, `symptom`, `appliesWhen`, `surface`, and related metadata. `found: false` when the id is unknown in this repo. References co…

ParameterTypeDescription
decisionId *stringThe decision ID to expand (from a recall result, e.g. get_relevant_context)
repoPath *stringLocal path to the repository root
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

edit_session_decision

Edit or delete a decision in the current session. Use this when reviewing decisions before commit: - action: "update" - Modify the decision fields - action: "delete" - Remove the decision entirely Only ephemeral (in-flight) session decisions are editable. Once a decision is synced to Kawa Code, it is immutable — refine it instead by recording a new decision with `supersedes: [<id>]`. This allows users to curate their decision history before it's persisted.

ParameterTypeDescription
action *stringAction to perform: update modifies the decision, delete removes it
decisionId *stringThe decision ID to edit or delete
intentId *stringThe intent ID the decision belongs to
repoPath *stringLocal path to the repository root
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.
updatesobjectPartial fields to update (only for action=update)

detect_intent_conflicts

Find intents from other team members that potentially conflict with the active intent. When to use: - Before committing, to surface overlapping team work so the user can coordinate before merging. Inputs of note: - `intentId`: the active intent to check against. - `minScore` (optional): minimum match score to include in results. Returns scored conflict candidates with: - `score`: how strongly the candidate matches (higher = more likely conflict). - `overlappingFiles`: files affected by both intents. - `decisions`: decisions attached to the conflicting intent. - `authorId`: opaque owner id â…

ParameterTypeDescription
intentId *stringThe active intent ID
repoPath *stringLocal path to the repository root
minScorenumberMinimum similarity score threshold (default: 0.5)
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

infer_history

One-time-ish bootstrap: mine a repo's commit history (git or svn) into intents and decisions. Rare — use it to seed a repo that has no recorded history yet, or to extend coverage after many new commits. NOT part of the per-turn workflow. Costs real money and time, so it is a two-step call: run with estimateOnly (the default) to preview tokens/cost, show the user, then re-call with estimateOnly: false only if they agree. The run is asynchronous and reports progress in the Kawa Code app; it resumes automatically if interrupted. Re-run guard — do not defeat this casually. If the repo alread…

ParameterTypeDescription
repoPath *stringLocal path to the repository root
allowCommitSplittingbooleanAllow splitting a single commit into multiple stories when it contains unrelated changes (recommended for repos with messy commit history)
commitRangestringOptional range to process instead of the N most recent commits: a git revspec ("sha1..sha2", "branch1..branch2", "sha1^!" for one commit) or, for svn, "r100:r200" ("r150" for one revision). Useful for…
commitsnumberNumber of recent commits to analyze. If omitted, the server resumes from the last commit infer_history processed for this repo (or falls back to 50 on first run). Mutually exclusive with `commitRange`…
contextIssuesbooleanInclude context issues from commit date range (requires gh/glab CLI)
estimateOnlybooleanIf true (default), only estimate token cost without running the pipeline. Set to false to run the full pipeline.
forcebooleanOverride the re-run guard. When the repo already has intents and infer_history cannot cleanly resume (missing/unreachable cursor), or when HEAD is not on the default branch, the run is stopped and a c…
maxStoriesnumberMaximum number of stories to analyze in this run (0 = unlimited).
modelstringModel slug used for the token/cost estimate only. It does NOT select the model the run uses — that is configured in the Kawa Code app.

get_resolution_context

Resolve a live code collision with a peer BEFORE you write (Layer C resolution handoff). Call this when the Stop hook's collision report (or complete_intent's resolution_required gate) surfaced a live peer (a teammate or AI agent editing the same lines). Pass that collision's uid as peerUid and its overlapping ranges. You get back: - peerSnippet — the peer's actual (decrypted) code at the overlapping lines, so you can see what they wrote. - decisions — recorded reasoning attached to this file (region context). - guardrail — the policy you must follow when resolving: • Never overwrit…

ParameterTypeDescription
filePath *stringPath to the file being edited (relative to repoPath)
peerUid *stringThe peer HAI whose live edits overlap — the `uid` of a collision from the Stop hook collision report.
ranges *arrayOverlapping [start, end] line ranges (from the collision) to fetch the peer code for.
repoPath *stringLocal path to the repository root
intentIdstringActive intent ID (advisory). Auto-detected by Kawa Code when omitted.
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

arbiter_resolve

Get Kawa Code's AI verdict for live code overlaps with peers — SUGGEST-ONLY, never writes. For each overlap ({peerUid, filePath, ranges} from the Stop collision report), Kawa decrypts the peer's version locally (zero-knowledge) and judges it compatible / auto_resolvable / conflict, with confidence, a perf/security risk read, and a tier (0 no-op · 1 trivially auto-appliable · 2 draft-and-confirm · 3 conflict). Use it to understand a forming conflict before acting. For a surfaced tier-2/3 overlap, call get_resolution_context to read the peer's actual code. To actually apply the safe tier, u…

ParameterTypeDescription
overlaps *arrayThe overlaps to judge — each { peerUid, filePath, ranges } from the Stop collision report.
repoPath *stringLocal path to the repository root
intentIdstringActive intent ID (advisory). Auto-detected by Kawa Code when omitted.
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.

arbiter_apply

Resolve live code overlaps and AUTO-APPLY the safe tier. Kawa judges → adversarially verifies → and, for the trivial tier only (high-confidence single-range merge that passes verify), writes the merge to your worktree, records a decision, and republishes. Writes happen ONLY in an agent-owned worktree (a linked git worktree); on a human checkout — or when a peer holds the file-set lock — it behaves like arbiter_resolve (suggest-only, no writes). Returns per-overlap outcomes { tier, applied, announcement, verifyIssue?, verdict }. Call it when you are ready to incorporate the result, then…

ParameterTypeDescription
overlaps *arrayThe overlaps to resolve — each { peerUid, filePath, ranges } from the Stop collision report.
repoPath *stringLocal path to the repository root
intentIdstringActive intent ID (advisory; the auto-resolution decision is recorded under it).
repoOriginstringRepository origin. Auto-detected from repoPath if not provided.