MCP Tools

GitKB exposes 134 MCP tools (110 core via git-kb mcp, 21 code intelligence via git-kb code mcp, and 3 semantic search via git-kb semantic mcp) for MCP clients such as Claude Code, Codex, Cursor and all major harnesses. The tables below were generated from the live tools/list responses of git-kb 1.0.0 on 2026-11-30. A client’s own tools/list response is authoritative for its installed version, including input schemas and defaults.

Each client runs its own stdio server; they share one per-KB daemon, started on demand.

Editing workflow

Use the checkout-edit-commit workflow for changes you want to review together:

json
{"name":"kb_checkout","arguments":{"slugs":["tasks/auth-flow"]}}
{"name":"kb_update","arguments":{"slug":"tasks/auth-flow","content":"## Acceptance criteria\n\n- [ ] Sign-in creates a session."}}
{"name":"kb_set","arguments":{"slug":"tasks/auth-flow","status":"active"}}
{"name":"kb_diff","arguments":{}}
{"name":"kb_commit","arguments":{"message":"Define authentication work","pathspecs":["tasks/auth-flow"]}}

kb_create stages a new document; provide slug for an explicit address or next for a numbered family. kb_update stages by default, with optional commit: true. kb_set leaves a pending workspace edit. Pass your changed slugs to kb_commit; multiple changed documents require a scope or explicit all.

kb_mv renames in the workspace and rewrites links to the old slug in other checkouts; commit the renamed document and the listed references with kb_commit. kb_delete with slug records a tombstone commit at once; with pathspecs it stages deletions for the next commit unless you pass message. Use kb_reset to discard edits and kb_clear to remove checked-out files; empty pathspecs can apply to the whole workspace.

Catalog

The tables list every tool and its input names. Bold inputs are schema-required; other inputs are optional. Additional semantic requirements are noted below the tables. The server supplies types, defaults, and constraints in tools/list.

Documents

ToolPurposeInputs
kb_listList documents, filtered by type, status, tag, priority, path or container, with sorting and pagination.assigned_to, container, count, full, limit, offset, path, priority, recursive, save, since, sort, sort_direction, status, tag, tags, type, unassigned, unblocked, until, where
kb_showShow documents, versions (<slug>@<version>) or commits.no_body, raw_content, related, slug, slugs, source
kb_createStart a new document in the workspace; with next, reserve a numbered family’s next slug at the remote.author, blocked_by, blocks, component, content, next, parent, path, priority, refs, remote, require_remote_reservation, slug, status, tags, template, title, ttl, type
kb_updateUpdate a document’s content or metadata.commit, content, message, priority, slug, status, tags, title
kb_setQuick metadata update (status, priority, tags, assignee) without editing content.add_tags, assignee, dry_run, fields, priority, slug, status, tags
kb_mvRename a document in the workspace and rewrite links to it; kb_commit records it.dest, force, next, remote, source, ttl
kb_deleteDelete documents; hard purges them from history and disk.commit, dry_run, force, hard, message, pathspecs, recursive, slug
kb_assignAssign a document to an agent with compare-and-swap.agent_id, force, slug
kb_unassignClear a document’s assignment.slug
kb_external_refsExternal references declared in frontmatter, by document or by external id.id, slug, system
kb_templates_listList built-in and custom document templates.None
kb_templates_showShow a template’s content.name
kb_templates_createCreate a custom template in .kb/templates/.content, name
kb_templates_editReplace a custom template, or override a built-in one.content, name
kb_templates_deleteDelete a custom template.name
kb_schemaList or generate the JSON schemas for documents.format, name

Workspaces and history

ToolPurposeInputs
kb_checkoutCheckout documents to the workspace for editing, by slug or filter; side takes one side of a conflict.force, side, slugs, status, tag, type
kb_statusShow the state of every workspace file (clean, dirty, draft, stale).pathspecs
kb_diffShow unified diffs of workspace changes against their checkout baselines.commit, pathspecs
kb_commitCommit workspace changes; pass the changed documents as pathspecs.all, author, close, message, pathspecs
kb_logCommit history, optionally for one document, with patches.activity, author, before, filter, full_content, limit, offset, patch, pathspecs, since, slug, until
kb_blameAttribute each line of a document to the commit that introduced it.slug
kb_reflogEvery document tip movement, newest first; finds replaced commits.count, pathspecs
kb_reflog_expireDrop old reflog entries.dry_run, expire, expire_unreachable, pathspecs
kb_revertMake a new commit that undoes a commit; safe on published history.commits
kb_stashStash workspace changes: push, pop, apply, list, drop, show, clear.action, force, id, message, pathspecs
kb_resetDiscard workspace edits, or move document tips to a commit.dry_run, force, hard, mixed, pathspecs, soft, to
kb_clearRemove documents from the workspace.dry_run, force, path, pathspecs, priority, status, tag, tags, type
kb_workspace_resolveResolve the current workspace identity and paths.None
kb_workspace_listList the GitKB workspaces.None
kb_workspace_pathShow the workspace file path for a document.slug
kb_workspace_checkoutsList checked-out documents in the current workspace.None
kb_workspace_statusList checked-out and changed documents in the workspace.omit_empty, slugs
kb_workspace_sourcesList a document’s sources: the committed tip and every workspace that holds it.slug
kb_workspace_writeSave exact Markdown to the workspace after a generation check.content, create_if_missing, if_generation, origin_id, slug

Sync and conflicts

ToolPurposeInputs
kb_sync_statusThe sync plan for a remote: its exit, summary and rows, each with a tier and command.fetch, offline, pathspecs, rehash, remote, remote_scope, token
kb_sync_convergeRun the plan’s auto rows to a fixed point; returns what ran and what remains.max_rounds, pathspecs, remote
kb_sync_showInspect one plan row; a conflict row adds base, ours, theirs, both diffs and the merge.action_id, document, output, remote
kb_sync_resolveRecord one agent decision on a plan row, then converge.action_id, decision, document, max_rounds, remote, theirs
kb_sync_selectAdd, replace or list a remote’s selection patterns.all, list, local, pathspecs, reapply, remote, set
kb_pushPublish whole commit groups for the documents the pathspecs name.auto_rebase, dry_run, force, force_with_lease, pathspecs, remote, token
kb_pullFast-forward, replay unpublished commits onto the remote tip and merge workspace edits.autostash, dry_run, evidence_only, pathspecs, remote, token
kb_fetchDownload remote tips without moving a reference or changing a file.pathspecs, remote
kb_remote_diffCompare local and remote tips; optional three-way view.pathspecs, remote, three_way, token
kb_mergeMerge remote documents with a policy: preview, review, continue or abort.abort, accept_unit, action, continue, expect_result_digest, pathspecs, policy, preview, remote, resolve, result, review, source, status, token
kb_rebaseShow, continue or abort a stopped pull rebase, or rewrite unpublished commits by a todo.action, interactive, max_retries, pathspecs, replace_slug, root, todo, token, upstream
kb_conflict_showList the default remote’s conflicts, or one in detail.slug
kb_conflict_acceptDecide whole conflicted documents: strategy local, remote or auto, with theirs from the plan row.all, slug, strategy, theirs
kb_slug_nextPreview a numbered family’s next number at a remote; holds nothing.family, remote
kb_slug_releaseRelease a number this principal holds reserved.remote, slug
kb_slug_reservation_statusWhat the remote and this store record for a reserved slug.remote, slug
kb_slug_reservation_renewExtend a reservation this principal holds.remote, slug
kb_slug_reservation_releaseAbandon a reservation this principal holds.remote, slug
kb_limitsThe declared sync limits.None
kb_bundle_createWrite commits to a portable bundle file for offline transfer.author, commits, output, since, slugs
kb_bundle_applyApply a bundle file; dry_run returns the plan only.dry_run, force, input, no_verify

Accounts and organizations

ToolPurposeInputs
kb_loginSign in to a GitKB server with the OIDC device flow.client_id, credential_store, issuer, scope, server
kb_logoutClear stored credentials for a server, or all of them.all, credential_store, server
kb_auth_loginSign in to a remote with the OIDC device flow.client_id, credential_store, issuer, remote, scope
kb_auth_logoutClear stored credentials for a remote, or all of them.all, credential_store, remote
kb_auth_statusShow the cloud domain, issuer and stored-credential state; never includes a token.remote
kb_auth_useMake a remote’s domain the active cloud domain.remote
kb_auth_migrateMove stored credentials between the file and keychain backends.force, from, remote, to
kb_whoamiShow the signed-in user and their organization memberships.remote
kb_pingCheck that the GitKB API answers; reports version and latency.remote
kb_org_listList your organizations.remote
kb_org_showShow an organization’s members, invitations and knowledge bases.all, org, remote
kb_org_createCreate an organization.name, remote, slug
kb_org_deleteDelete an organization and its knowledge bases; needs force.force, remote, slug

Graph and views

ToolPurposeInputs
kb_graphDocument relationships for one or more documents, with critical path and scope.critical_path, depth, direction, plan, rel_type, scope, slug, slugs
kb_linkAdd container, code or source-commit links; edits the checkout.child, code, commit, container, position, repo
kb_unlinkRemove a document from a container; edits the checkout.child, container
kb_reorderReorder a document within a container; edits the checkout.child, container, position
kb_boardKanban board, grouped by status or any frontmatter property.all, assigned_to, columns, group_by, priority, save, sort_by, sort_direction, summary, tags, type, unassigned, unblocked, where
kb_viewRun a saved view definition.document, limit, no_body, offset, related, request, slug

Context and task selection

ToolPurposeInputs
kb_contextBootstrap context bundle for an agent session.commit_limit, include_code_refs, include_content, task
kb_context_documentGraph-aware context for one document, with neighbors and code refs.include_body, include_code_refs, include_neighbor_bodies, slug, token_budget
kb_smart_contextTask-aware code and document context within a token budget.call_depth, include_callees, include_callers, min_score, task, token_budget
kb_readyThe highest-scored unblocked, unassigned tasks or incidents.include_context, limit, token_budget
kb_resolveResolve which task an agent should work on (env, branch or auto).agent_id, branch, current_branch, fallback_recent, mode
kb_config_getRead one .kb/config.toml value by dot-separated key.key
kb_config_listList every .kb/config.toml key; literal tokens are redacted.None
kb_resource_locateLocate a KB resource: desktop URI, hosted URL and web link.resource, view

Code intelligence

ToolPurposeInputs
kb_indexIndex source code symbols, with branch and worktree context.branch, default_branch, dry_run, force, include_deps, language, paths, prune, worktree
kb_symbolsFind where a function, type or method is defined.body, branch, count, file_path, file_pattern, group_by, kind, language, limit, offset, parent, search
kb_callersCallers of a symbol from the call graph.branch, depth, limit, strict, symbol
kb_calleesFunctions a symbol calls.branch, depth, limit, strict, symbol
kb_impactTransitive blast radius of changing a file.branch, depth, file_path, limit
kb_dead_codeSymbols with no production callers.branch, exclude_tests, explain, file_path, group_by, include_entrypoints, include_public, include_tests, kind, limit, offset
kb_code_refsWhere a name is used: whole-word hits without comments, strings and definitions.all, target
kb_symbol_refsKB documents that reference a code symbol.include_maybe, strict, symbol, textual, wikilinks_only
kb_code_graphA symbol’s or file’s caller/callee subgraph.branch, depth, direction, file, include_docs, limit, strict, symbol
kb_code_showOne symbol’s record and source lines.max_lines, symbol_id
kb_code_shapeOne function’s control structure and complexity.symbol_id
kb_code_mapEvery indexed file, optionally with symbols, plus index health.branch, defer_health, detail, path_prefix
kb_code_statsCode index statistics.branch
kb_code_doctorCode index and call-resolution health.branch
kb_code_entrypointsInferred code entrypoints.branch, limit, refresh
kb_code_flowsEntrypoint-derived code flows.branch, depth, limit, refresh
kb_code_flowMembers of one code flow.flow_id
kb_code_queryTyped code graph query templates (hotspots, public-api, routes and more).branch, depth, include_docs, limit, refresh, target, template
kb_code_annotationsWikilinks written in source comments, with the symbols they attach to.branch, limit, link_type, offset, path, reach, reach_depth, symbol, target
kb_code_dump_astA file’s tree-sitter parse tree, for writing query files.language, lines, path
kb_code_qualityRun fixture-driven code-intelligence resolver checks.fixture, keep_temp, markdown
kb_repo_listRepositories this KB discovers, with aliases and default branches.refresh

Search, embeddings and events

ToolPurposeInputs
kb_searchRanked keyword search over documents.all_terms, doc_type, limit, offset, query, status
kb_semanticNatural-language search across documents using local embeddings (optional hybrid).doc_type, hybrid, limit, query, status, threshold
kb_embedEmbed new and changed committed documents into the semantic index.force
kb_semantic_statusShow semantic index counts against committed documents without loading a model.None
kb_eventsLong-poll for a batch of matching KB events.filter, max_events, path, timeout_secs

Projections

ToolPurposeInputs
kb_projectProject committed documents into repository files.adapter, dry_run, mode, name, pathspec, rebuild, require_match, to
kb_projections_listList saved and materialized projections.None
kb_projections_saveSave a projection recipe in .kb/projections.toml.adapter, mode, name, pathspec, to
kb_projections_applyApply a saved projection.dry_run, name
kb_projections_resolveResolve a saved projection without writing files.name
kb_projections_diffDiff a saved projection against its sources and targets.name
kb_projections_doctorDiagnose a saved projection.name
kb_projections_cleanRemove a projection’s stale outputs.dry_run, name
kb_projections_removeRemove a projection and its outputs.dry_run, name

Backup, export and maintenance

ToolPurposeInputs
kb_exportExport documents as Markdown, JSON or JSONL.format, output_dir, status, tag, type
kb_backupWrite a backup archive of the store and every workspace.no_workspace, path, verify
kb_restoreRestore a backup archive into this KB, or resume or abandon a restore.abandon, message, path, pathspecs, resume, source
kb_filterPurge documents from history and disk; force: true confirms.force, recursive, rm
kb_infoStore size and document, commit, link and embedding counts.None
kb_doctorDiagnose the KB and plan its repair; fix applies safe local repairs.check, fix, progress
kb_fsckCheck local KB integrity.ack_quarantine, full, prune_indexes, repair
kb_verifyVerify every object hash and document chain.full, no_cache, verbose
kb_repairRebuild the projection, or re-fetch damaged objects from a remote or backup.command, from, verbose
kb_reindexRebuild the document projection from the store.verbose
kb_repackFold loose objects into packs.None
kb_pruneDelete stored data nothing points to.dry_run, expire, now
kb_gcExpire old reflog entries, prune and repack.no_prune, prune

Apps and feedback

ToolPurposeInputs
kb_app_listList locally installed GitKB apps.apps_dir
kb_feedbackSend an anonymous report to the GitKB team; dry_run previews it.api_url, category, contact_email, dry_run, include_diagnostics, message

Input details

  • Document lookup: use slug or slugs with kb_show and kb_graph. kb_checkout accepts slugs or type/status/tag filters. Workspace files live under .kb/workspaces/<name>/; kb_workspace_path resolves the file for a slug.
  • Pathspecs: pathspecs, slugs (kb_checkout), rm (kb_filter) and path (kb_list, kb_events) read one grammar. A document id is that document; tasks/ is tasks and every document under it at any depth; tasks/* is the direct children (*, ? and […] stay within one folder level); tasks/** is every document under tasks; / and a bare ** are every document. Tools that act on documents read a bare tasks as the document at that slug when there is one, else the folder; kb_list.path and kb_events.path read it as the folder (kb_events.path takes slugs, not ids), and the kb_list recursive input is a no-op kept for compatibility. A pathspec that selects several documents needs recursive: true on kb_delete and kb_filter.
  • Unmatched pathspecs: kb_commit, kb_checkout, kb_delete, kb_reset, kb_clear and kb_filter refuse a pathspec that matches nothing with invalid_params (pathspec_no_match) and change nothing; kb_delete with force skips it instead. kb_push, kb_pull and kb_fetch refuse one the same way (kb_push judges only committed documents held here; kb_pull and kb_fetch refuse a document id found on neither side as an invalid argument). An online kb_sync_status refuses a pathspec that matches nothing in the remote’s selection as an invalid argument; kb_sync_converge runs what its other pathspecs match, then lists the misses under unmatched with exit: "unmatched". kb_list answers an unmatched path with an empty result and unmatched.
  • Purge: kb_delete with hard (which needs force) and kb_filter take only ids, exact slugs, folders written as tasks/, or globs. An unmatched bare name, or a folder written without its trailing /, is refused as an invalid pathspec even with force. kb_delete hard with force skips any other unmatched name; kb_filter, whose force only confirms, refuses the request.
  • Listing: kb_list uses type and singular tag; kb_search uses doc_type. Type, status, and priority list filters support a string or array with OR within the field. Different fields combine with AND.
  • Relationships: kb_graph.direction is out, in, or both. Container linking uses child and container; code linking uses child and code; source-commit linking uses child, repo, and commit. Positions are strings such as first, last, after:<slug>, or before:<slug>.
  • Task context: kb_ready uses include_context and token_budget. kb_smart_context takes a task slug and can traverse callers and callees within its budget.
  • Code queries: symbols use canonical paths and complete symbol IDs. kb_index takes paths as an array. kb_dead_code filters with file_path; zero callers is a candidate for review, not proof of unused code. kb_code_flow takes an ID returned by kb_code_flows.
  • Events: kb_events returns a batch, rather than an open NDJSON stream. It uses max_events and timeout_secs (maximum 60 seconds); call again to keep listening. path filters document events, while non-document events can still pass through.
  • Sync: start with kb_sync_status, which returns the plan’s rows in priority order, each with a tier (auto, agent, hold, info, human) and the command that runs it. kb_sync_converge runs the auto rows to a fixed point. Inspect a row with kb_sync_show and record an agent decision with kb_sync_resolve, passing document (and theirs on a conflict) exactly as the row’s command carries them. Report human rows instead of working around them.
  • Conflicts: when kb_pull stops at a conflict, edit the conflict blocks in the checked-out file and call kb_rebase with action: "continue" (kb_checkout with side: "ours" or "theirs" takes one side whole; action: "abort" discards the rebase). kb_conflict_accept decides a whole document with strategy: "local", "remote" or "auto", plus the theirs value from the plan row. Automatic resolution is latest-wins and can discard concurrent edits.
  • Backup: kb_backup writes an archive to path; kb_restore restores one from path. kb_export produces an interchange format, separate from a full backup.

Next steps