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:
{"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
| Tool | Purpose | Inputs |
|---|---|---|
kb_list | List 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_show | Show documents, versions (<slug>@<version>) or commits. | no_body, raw_content, related, slug, slugs, source |
kb_create | Start 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_update | Update a document’s content or metadata. | commit, content, message, priority, slug, status, tags, title |
kb_set | Quick metadata update (status, priority, tags, assignee) without editing content. | add_tags, assignee, dry_run, fields, priority, slug, status, tags |
kb_mv | Rename a document in the workspace and rewrite links to it; kb_commit records it. | dest, force, next, remote, source, ttl |
kb_delete | Delete documents; hard purges them from history and disk. | commit, dry_run, force, hard, message, pathspecs, recursive, slug |
kb_assign | Assign a document to an agent with compare-and-swap. | agent_id, force, slug |
kb_unassign | Clear a document’s assignment. | slug |
kb_external_refs | External references declared in frontmatter, by document or by external id. | id, slug, system |
kb_templates_list | List built-in and custom document templates. | None |
kb_templates_show | Show a template’s content. | name |
kb_templates_create | Create a custom template in .kb/templates/. | content, name |
kb_templates_edit | Replace a custom template, or override a built-in one. | content, name |
kb_templates_delete | Delete a custom template. | name |
kb_schema | List or generate the JSON schemas for documents. | format, name |
Workspaces and history
| Tool | Purpose | Inputs |
|---|---|---|
kb_checkout | Checkout documents to the workspace for editing, by slug or filter; side takes one side of a conflict. | force, side, slugs, status, tag, type |
kb_status | Show the state of every workspace file (clean, dirty, draft, stale). | pathspecs |
kb_diff | Show unified diffs of workspace changes against their checkout baselines. | commit, pathspecs |
kb_commit | Commit workspace changes; pass the changed documents as pathspecs. | all, author, close, message, pathspecs |
kb_log | Commit history, optionally for one document, with patches. | activity, author, before, filter, full_content, limit, offset, patch, pathspecs, since, slug, until |
kb_blame | Attribute each line of a document to the commit that introduced it. | slug |
kb_reflog | Every document tip movement, newest first; finds replaced commits. | count, pathspecs |
kb_reflog_expire | Drop old reflog entries. | dry_run, expire, expire_unreachable, pathspecs |
kb_revert | Make a new commit that undoes a commit; safe on published history. | commits |
kb_stash | Stash workspace changes: push, pop, apply, list, drop, show, clear. | action, force, id, message, pathspecs |
kb_reset | Discard workspace edits, or move document tips to a commit. | dry_run, force, hard, mixed, pathspecs, soft, to |
kb_clear | Remove documents from the workspace. | dry_run, force, path, pathspecs, priority, status, tag, tags, type |
kb_workspace_resolve | Resolve the current workspace identity and paths. | None |
kb_workspace_list | List the GitKB workspaces. | None |
kb_workspace_path | Show the workspace file path for a document. | slug |
kb_workspace_checkouts | List checked-out documents in the current workspace. | None |
kb_workspace_status | List checked-out and changed documents in the workspace. | omit_empty, slugs |
kb_workspace_sources | List a document’s sources: the committed tip and every workspace that holds it. | slug |
kb_workspace_write | Save exact Markdown to the workspace after a generation check. | content, create_if_missing, if_generation, origin_id, slug |
Sync and conflicts
| Tool | Purpose | Inputs |
|---|---|---|
kb_sync_status | The 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_converge | Run the plan’s auto rows to a fixed point; returns what ran and what remains. | max_rounds, pathspecs, remote |
kb_sync_show | Inspect one plan row; a conflict row adds base, ours, theirs, both diffs and the merge. | action_id, document, output, remote |
kb_sync_resolve | Record one agent decision on a plan row, then converge. | action_id, decision, document, max_rounds, remote, theirs |
kb_sync_select | Add, replace or list a remote’s selection patterns. | all, list, local, pathspecs, reapply, remote, set |
kb_push | Publish whole commit groups for the documents the pathspecs name. | auto_rebase, dry_run, force, force_with_lease, pathspecs, remote, token |
kb_pull | Fast-forward, replay unpublished commits onto the remote tip and merge workspace edits. | autostash, dry_run, evidence_only, pathspecs, remote, token |
kb_fetch | Download remote tips without moving a reference or changing a file. | pathspecs, remote |
kb_remote_diff | Compare local and remote tips; optional three-way view. | pathspecs, remote, three_way, token |
kb_merge | Merge 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_rebase | Show, 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_show | List the default remote’s conflicts, or one in detail. | slug |
kb_conflict_accept | Decide whole conflicted documents: strategy local, remote or auto, with theirs from the plan row. | all, slug, strategy, theirs |
kb_slug_next | Preview a numbered family’s next number at a remote; holds nothing. | family, remote |
kb_slug_release | Release a number this principal holds reserved. | remote, slug |
kb_slug_reservation_status | What the remote and this store record for a reserved slug. | remote, slug |
kb_slug_reservation_renew | Extend a reservation this principal holds. | remote, slug |
kb_slug_reservation_release | Abandon a reservation this principal holds. | remote, slug |
kb_limits | The declared sync limits. | None |
kb_bundle_create | Write commits to a portable bundle file for offline transfer. | author, commits, output, since, slugs |
kb_bundle_apply | Apply a bundle file; dry_run returns the plan only. | dry_run, force, input, no_verify |
Accounts and organizations
| Tool | Purpose | Inputs |
|---|---|---|
kb_login | Sign in to a GitKB server with the OIDC device flow. | client_id, credential_store, issuer, scope, server |
kb_logout | Clear stored credentials for a server, or all of them. | all, credential_store, server |
kb_auth_login | Sign in to a remote with the OIDC device flow. | client_id, credential_store, issuer, remote, scope |
kb_auth_logout | Clear stored credentials for a remote, or all of them. | all, credential_store, remote |
kb_auth_status | Show the cloud domain, issuer and stored-credential state; never includes a token. | remote |
kb_auth_use | Make a remote’s domain the active cloud domain. | remote |
kb_auth_migrate | Move stored credentials between the file and keychain backends. | force, from, remote, to |
kb_whoami | Show the signed-in user and their organization memberships. | remote |
kb_ping | Check that the GitKB API answers; reports version and latency. | remote |
kb_org_list | List your organizations. | remote |
kb_org_show | Show an organization’s members, invitations and knowledge bases. | all, org, remote |
kb_org_create | Create an organization. | name, remote, slug |
kb_org_delete | Delete an organization and its knowledge bases; needs force. | force, remote, slug |
Graph and views
| Tool | Purpose | Inputs |
|---|---|---|
kb_graph | Document relationships for one or more documents, with critical path and scope. | critical_path, depth, direction, plan, rel_type, scope, slug, slugs |
kb_link | Add container, code or source-commit links; edits the checkout. | child, code, commit, container, position, repo |
kb_unlink | Remove a document from a container; edits the checkout. | child, container |
kb_reorder | Reorder a document within a container; edits the checkout. | child, container, position |
kb_board | Kanban 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_view | Run a saved view definition. | document, limit, no_body, offset, related, request, slug |
Context and task selection
| Tool | Purpose | Inputs |
|---|---|---|
kb_context | Bootstrap context bundle for an agent session. | commit_limit, include_code_refs, include_content, task |
kb_context_document | Graph-aware context for one document, with neighbors and code refs. | include_body, include_code_refs, include_neighbor_bodies, slug, token_budget |
kb_smart_context | Task-aware code and document context within a token budget. | call_depth, include_callees, include_callers, min_score, task, token_budget |
kb_ready | The highest-scored unblocked, unassigned tasks or incidents. | include_context, limit, token_budget |
kb_resolve | Resolve which task an agent should work on (env, branch or auto). | agent_id, branch, current_branch, fallback_recent, mode |
kb_config_get | Read one .kb/config.toml value by dot-separated key. | key |
kb_config_list | List every .kb/config.toml key; literal tokens are redacted. | None |
kb_resource_locate | Locate a KB resource: desktop URI, hosted URL and web link. | resource, view |
Code intelligence
| Tool | Purpose | Inputs |
|---|---|---|
kb_index | Index source code symbols, with branch and worktree context. | branch, default_branch, dry_run, force, include_deps, language, paths, prune, worktree |
kb_symbols | Find where a function, type or method is defined. | body, branch, count, file_path, file_pattern, group_by, kind, language, limit, offset, parent, search |
kb_callers | Callers of a symbol from the call graph. | branch, depth, limit, strict, symbol |
kb_callees | Functions a symbol calls. | branch, depth, limit, strict, symbol |
kb_impact | Transitive blast radius of changing a file. | branch, depth, file_path, limit |
kb_dead_code | Symbols with no production callers. | branch, exclude_tests, explain, file_path, group_by, include_entrypoints, include_public, include_tests, kind, limit, offset |
kb_code_refs | Where a name is used: whole-word hits without comments, strings and definitions. | all, target |
kb_symbol_refs | KB documents that reference a code symbol. | include_maybe, strict, symbol, textual, wikilinks_only |
kb_code_graph | A symbol’s or file’s caller/callee subgraph. | branch, depth, direction, file, include_docs, limit, strict, symbol |
kb_code_show | One symbol’s record and source lines. | max_lines, symbol_id |
kb_code_shape | One function’s control structure and complexity. | symbol_id |
kb_code_map | Every indexed file, optionally with symbols, plus index health. | branch, defer_health, detail, path_prefix |
kb_code_stats | Code index statistics. | branch |
kb_code_doctor | Code index and call-resolution health. | branch |
kb_code_entrypoints | Inferred code entrypoints. | branch, limit, refresh |
kb_code_flows | Entrypoint-derived code flows. | branch, depth, limit, refresh |
kb_code_flow | Members of one code flow. | flow_id |
kb_code_query | Typed code graph query templates (hotspots, public-api, routes and more). | branch, depth, include_docs, limit, refresh, target, template |
kb_code_annotations | Wikilinks written in source comments, with the symbols they attach to. | branch, limit, link_type, offset, path, reach, reach_depth, symbol, target |
kb_code_dump_ast | A file’s tree-sitter parse tree, for writing query files. | language, lines, path |
kb_code_quality | Run fixture-driven code-intelligence resolver checks. | fixture, keep_temp, markdown |
kb_repo_list | Repositories this KB discovers, with aliases and default branches. | refresh |
Search, embeddings and events
| Tool | Purpose | Inputs |
|---|---|---|
kb_search | Ranked keyword search over documents. | all_terms, doc_type, limit, offset, query, status |
kb_semantic | Natural-language search across documents using local embeddings (optional hybrid). | doc_type, hybrid, limit, query, status, threshold |
kb_embed | Embed new and changed committed documents into the semantic index. | force |
kb_semantic_status | Show semantic index counts against committed documents without loading a model. | None |
kb_events | Long-poll for a batch of matching KB events. | filter, max_events, path, timeout_secs |
Projections
| Tool | Purpose | Inputs |
|---|---|---|
kb_project | Project committed documents into repository files. | adapter, dry_run, mode, name, pathspec, rebuild, require_match, to |
kb_projections_list | List saved and materialized projections. | None |
kb_projections_save | Save a projection recipe in .kb/projections.toml. | adapter, mode, name, pathspec, to |
kb_projections_apply | Apply a saved projection. | dry_run, name |
kb_projections_resolve | Resolve a saved projection without writing files. | name |
kb_projections_diff | Diff a saved projection against its sources and targets. | name |
kb_projections_doctor | Diagnose a saved projection. | name |
kb_projections_clean | Remove a projection’s stale outputs. | dry_run, name |
kb_projections_remove | Remove a projection and its outputs. | dry_run, name |
Backup, export and maintenance
| Tool | Purpose | Inputs |
|---|---|---|
kb_export | Export documents as Markdown, JSON or JSONL. | format, output_dir, status, tag, type |
kb_backup | Write a backup archive of the store and every workspace. | no_workspace, path, verify |
kb_restore | Restore a backup archive into this KB, or resume or abandon a restore. | abandon, message, path, pathspecs, resume, source |
kb_filter | Purge documents from history and disk; force: true confirms. | force, recursive, rm |
kb_info | Store size and document, commit, link and embedding counts. | None |
kb_doctor | Diagnose the KB and plan its repair; fix applies safe local repairs. | check, fix, progress |
kb_fsck | Check local KB integrity. | ack_quarantine, full, prune_indexes, repair |
kb_verify | Verify every object hash and document chain. | full, no_cache, verbose |
kb_repair | Rebuild the projection, or re-fetch damaged objects from a remote or backup. | command, from, verbose |
kb_reindex | Rebuild the document projection from the store. | verbose |
kb_repack | Fold loose objects into packs. | None |
kb_prune | Delete stored data nothing points to. | dry_run, expire, now |
kb_gc | Expire old reflog entries, prune and repack. | no_prune, prune |
Apps and feedback
| Tool | Purpose | Inputs |
|---|---|---|
kb_app_list | List locally installed GitKB apps. | apps_dir |
kb_feedback | Send 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
slugorslugswithkb_showandkb_graph.kb_checkoutacceptsslugsor type/status/tag filters. Workspace files live under.kb/workspaces/<name>/;kb_workspace_pathresolves the file for a slug. - Pathspecs:
pathspecs,slugs(kb_checkout),rm(kb_filter) andpath(kb_list,kb_events) read one grammar. A document id is that document;tasks/istasksand every document under it at any depth;tasks/*is the direct children (*,?and[…]stay within one folder level);tasks/**is every document undertasks;/and a bare**are every document. Tools that act on documents read a baretasksas the document at that slug when there is one, else the folder;kb_list.pathandkb_events.pathread it as the folder (kb_events.pathtakes slugs, not ids), and thekb_listrecursiveinput is a no-op kept for compatibility. A pathspec that selects several documents needsrecursive: trueonkb_deleteandkb_filter. - Unmatched pathspecs:
kb_commit,kb_checkout,kb_delete,kb_reset,kb_clearandkb_filterrefuse a pathspec that matches nothing withinvalid_params(pathspec_no_match) and change nothing;kb_deletewithforceskips it instead.kb_push,kb_pullandkb_fetchrefuse one the same way (kb_pushjudges only committed documents held here;kb_pullandkb_fetchrefuse a document id found on neither side as an invalid argument). An onlinekb_sync_statusrefuses a pathspec that matches nothing in the remote’s selection as an invalid argument;kb_sync_convergeruns what its other pathspecs match, then lists the misses underunmatchedwithexit: "unmatched".kb_listanswers an unmatchedpathwith an empty result andunmatched. - Purge:
kb_deletewithhard(which needsforce) andkb_filtertake only ids, exact slugs, folders written astasks/, or globs. An unmatched bare name, or a folder written without its trailing/, is refused as an invalid pathspec even withforce.kb_deletehardwithforceskips any other unmatched name;kb_filter, whoseforceonly confirms, refuses the request. - Listing:
kb_listusestypeand singulartag;kb_searchusesdoc_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.directionisout,in, orboth. Container linking useschildandcontainer; code linking useschildandcode; source-commit linking useschild,repo, andcommit. Positions are strings such asfirst,last,after:<slug>, orbefore:<slug>. - Task context:
kb_readyusesinclude_contextandtoken_budget.kb_smart_contexttakes a task slug and can traverse callers and callees within its budget. - Code queries: symbols use canonical paths and complete symbol IDs.
kb_indextakespathsas an array.kb_dead_codefilters withfile_path; zero callers is a candidate for review, not proof of unused code.kb_code_flowtakes an ID returned bykb_code_flows. - Events:
kb_eventsreturns a batch, rather than an open NDJSON stream. It usesmax_eventsandtimeout_secs(maximum 60 seconds); call again to keep listening.pathfilters 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_convergeruns the auto rows to a fixed point. Inspect a row withkb_sync_showand record an agent decision withkb_sync_resolve, passingdocument(andtheirson a conflict) exactly as the row’s command carries them. Report human rows instead of working around them. - Conflicts: when
kb_pullstops at a conflict, edit the conflict blocks in the checked-out file and callkb_rebasewithaction: "continue"(kb_checkoutwithside: "ours"or"theirs"takes one side whole;action: "abort"discards the rebase).kb_conflict_acceptdecides a whole document withstrategy: "local","remote"or"auto", plus thetheirsvalue from the plan row. Automatic resolution is latest-wins and can discard concurrent edits. - Backup:
kb_backupwrites an archive topath;kb_restorerestores one frompath.kb_exportproduces an interchange format, separate from a full backup.
Next steps
- MCP Setup — Register the server with your client
- Agent Workflows — Load context and make scoped changes
- CLI Reference — Commands for direct use and recovery