kontexta
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| KONTEXTA_DATA_DIR | Yes | Absolute path to the directory where your Knowledge Base and SQLite database are stored. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
👋 Kontexta welcome: 2026-11-19
This is the user's session context. Read and honor it for the rest of this session: especially "Session coding style" (comment style, git etiquette, review-before-push) and "Team members and roles" (who's who when writing updates or referencing people). 📋 PROFILE (knowledge/profile.md)
Profile
Name
Role
Vision
Roadmap
Preferences
Session coding style
Team members and roles
Notes
📅 UPCOMING (next 7 days, times in UTC) (no events)
💡 Reminder: keep your profile current so I can act on it. 8 section(s) still empty: Name, Role, Vision, Roadmap, Preferences, Session coding style, Team members and roles, Notes. Edit at knowledge/profile.md or via the dashboard's profile pane.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| admin_refresh_session_contextA | Re-read the session context (profile, upcoming events within 7d, conflicts, freshness nudge) as it stands NOW. Call this when the user just edited their profile or added/moved calendar events and you want the current picture instead of the snapshot taken at session start. Read-only; no side effects. Returns the same block Kontexta sent as MCP instructions at session start. |
| journal_writeA | Write one event to the current project's journal. |
| files_createA | Create one or more markdown, mermaid, or HTML files in the knowledge base or project (up to 200 per call). Pass a single-element |
| resources_add_reportA | Write an image or other binary resource into the shared reports/resources/ folder. Returns { filename, size, src, url }: embed the report's / tags with |
| resources_list_reportsA | List all files currently stored under reports/resources/. Returns filename, size in bytes, and served URL. |
| resources_delete_reportA | Delete a file from reports/resources/. No-op if it doesn't exist. |
| resources_export_reportA | Export an existing HTML report as PDF or PNG. Returns { url } for the web-served download (requires an authenticated dashboard request) by default. Set inline_bytes=true to render in-process and get { bytes_base64 } instead: only available when running via the full |
| files_readA | Read one or more files, in full or in part. Modes: single-by-id ( |
| files_describeA | Return everything ABOUT a file without pulling its content (no token cost from the body). Tags, size, est_tokens, history depth, related-file ids, backlinks, project, folder, last edited. Operates locally with no auth or rate limits. Use this when you'd otherwise chain files_read + tags_list + files_get_history + files_find_related just to decide whether to actually read the file. Parameters: 'id' must be a valid integer file ID. |
| files_regex_searchA | Match a JS regex against file bodies. Default mode scans every file in scope (project, KB, or all) and returns per-file hits with line numbers: slower than FTS |
| files_updateA | Rewrite a KB file (project-repo files are refused: kxta never writes into a repo). Default = full-body replacement: |
| files_deleteA | DESTRUCTIVE. Permanently delete one or more files by ID (up to 500 per call). Pass a single-element |
| files_listA | List file metadata with optional filters (project_id, tag, favorite, folder, untagged, kind) and pagination. Read-only; no side effects, auth, or rate limits. Each row is annotated with tags, est_tokens, size_bytes, and content_class; the response includes |
| files_searchA | Full-text (SQLite FTS5) keyword search across files. Default mode returns ranked matches with inline match_excerpt and title_highlight (no follow-up |
| tags_addA | Append tags to ONE file. Additive: existing tags are preserved; re-adding an existing tag is a no-op (idempotent per tag). New tag names auto-create rows in the global |
| tags_removeA | Detach one or more tag IDs from ONE file. Destructive on the link only: does NOT delete the file or the global tag definition (orphan tags survive in |
| tags_set_favoriteA | Set or clear the favorite flag on one file (idempotent: re-setting the same value is a no-op; not a toggle, you pass the desired state). Persists to local SQLite. No external auth or rate limits. Returns |
| tags_listA | List every tag in the global SQLite database with id, name, and applied count. Read-only; no side effects, auth, or rate limits. Returns the entire taxonomy (not paginated). Use to discover existing labels before tagging (so you reuse rather than fork) or to find tag IDs to feed into |
| projects_listA | List every registered project with id, name, absolute path, and a derived |
| projects_registerA | Register a new project and link it to the Kontexta knowledge system. SIDE EFFECTS: Writes project metadata to disk (persisted in the Kontexta data directory). Scans the project root recursively to discover and index all markdown files into the local database. Registers any kontexta.json-declared Hands tools found in the project root. This operation is idempotent, re-registering an existing project updates its metadata without data loss. AUTH / RATE LIMITS: None. Operates entirely on the local file system. PARAMETERS:
RETURNS: A JSON object containing:
ERROR CONDITIONS: Returns isError=true if path is missing or unresolvable. Scan failures are non-fatal and reported in warnings rather than as errors. |
| admin_onboard_agentA | Write or update the kontexta workflow rules block in a project's agent context file(s). Idempotent: uses fenced markers + version to skip no-op writes. MANDATORY: This tool modifies project configuration files. You MUST seek explicit user consent before calling this tool. Set 'confirm: true' only after the user has agreed. PARAMETERS:
RETURNS: { written: [{ path, action: created|updated|skipped, version }], skipped: [{ path, reason }], hooks_install?: { agent, mode, enabled, outcome?, docker_command?, note?, error? }, hooks?: { install_mode, alerts, prompt } } |
| admin_transfer_agent_contextA | COPY existing agent context files (CLAUDE.md, AGENTS.md, .cursor/rules/*.mdc, etc.) from a project's repo into Kontexta's per-project knowledge base so they're indexed by FTS5 and can be git-synced through Kontexta's own backup engine. This tool ONLY COPIES. It never deletes or modifies the originals in your repo. After a successful transfer, the response includes the list of source paths so the user can manually remove them if desired. No tool argument, no flag, and no code path in this tool ever calls a destructive filesystem operation against MANDATORY: This tool writes new files into Kontexta's data dir. You MUST seek explicit user consent before calling. Set 'confirm: true' only after the user has agreed. PARAMETERS:
RETURNS: { transferred: [{ source_path, kb_id, kb_path, est_tokens }], skipped: [{ source_path, reason }], next_action } Skip reasons: "missing" | "symlink" | "outside_project" | "already_transferred_same_content" | "read_error" | "write_error". IDEMPOTENT: re-running with the same files copies nothing if the content is unchanged, duplicate transfers are detected via SHA-256 hash comparison against existing project KB rows. |
| resources_clip_urlA | SIDE-EFFECTFUL: fetches an EXTERNAL URL and writes a NEW KB file. Downloads the page, extracts the main article via Readability, converts to markdown, and saves it under |
| files_get_historyA | Return the git commit history for one file (newest first), each entry with hash, message, date, and author. Reads the file's owning repo: the project's git repo for project files, the KB backup repo for KB files. Read-only; no side effects, auth, or rate limits. Returns |
| files_get_diffA | Return the unified diff of one file between two commit hashes (typically obtained from |
| files_restoreA | DESTRUCTIVE. Overwrite a file's current on-disk content with the version recorded at a specific git commit, then re-index FTS. The hash MUST come from |
| files_read_outlineA | Return a flat list of markdown headings for one file (level, text, line, byteStart, byteEnd). Read-only; no side effects, auth, or rate limits. Use as a cheap probe before |
| folders_listA | List folder paths under a project root (or the Knowledge Base when |
| folders_createA | Create a folder in the KB (a |
| folders_deleteA | DESTRUCTIVE: recursively delete a folder under the KB AND every file inside it (disk + FTS rows). REFUSES (returns isError) when |
| files_moveA | Move/rename a KB file (project-repo files are refused). Destination 'new_path' must be absolute and resolve INSIDE the file's owning project or global knowledge directory. Cross-project moves are rejected. Alternative: pass |
| files_find_relatedA | Find other files sharing tags with the given file, ranked by |
| tags_searchA | Bulk-tag: run an FTS |
| admin_overviewA | Vault-state snapshot. |
| tags_suggestA | Propose tags for a file by mining the existing tag corpus via FTS: picks distinctive terms from the file (≥4 chars, stopword-filtered) and returns tags applied to other files that score high on those terms. No LLM, no network. Already-applied tags are excluded so the suggestions are net-new. Read-only; no side effects, auth, or rate limits. Returns |
| files_diff_against_diskA | Diagnose drift between one file's disk content and its FTS index. Status is one of |
| projects_refresh_indexA | Reconcile the FTS index against disk. For a project ( |
| projects_mapA | Return a compact indented outline of folders, file titles, tags, and IDs in a single dense block: substantially fewer tokens than the equivalent |
| hands_listA | List every Hands command tool currently registered, with project scope, tool name, danger level, confirmation flag, and description. Hands tools come from per-project |
| hands_reloadA | Re-scan every registered project's |
| hands_confirmA | Approve and EXECUTE a previously-issued Hands invocation by its single-use approval token. The token is returned by any confirm-required Hands tool; tokens expire after 60 seconds and CANNOT be reused. Side effect equals whatever the underlying Hand does: this can be highly destructive (running arbitrary shell commands, modifying files, etc.), so only call when the user has authorised the pending action. The token IS the auth (no external auth, no rate limits). Invalid, expired, or already-consumed tokens return an inert text response, NOT an error. |
| admin_get_profileA | Return the user profile stored in the Knowledge Base. The profile helps AI agents understand the user's context, role, preferences, and goals. Read-only; no side effects, auth, or rate limits. Returns existence status, full content, list of missing required sections, and a hint for new users. Use at session start to understand who you're working with. |
| admin_set_machine_labelA | Set this machine's human-readable label (settings.machine_label). The label is how OTHER machines name conflict copies created from this one (' (from ).ext'), so pick something short and distinctive per machine (e.g. the machine's name or the user's workstation). Pass an empty string to clear it. Affects only conflict-copy naming; it does NOT change the stable machine_id that GIDs are keyed on. Returns the previous and new label. |
| admin_list_clientsA | List every machine that has ever connected to this vault (the sync group), most-recently-seen first. Each entry has machine_id, hostname, first_seen_at, last_seen_at, and is_local (true for the machine this MCP server runs on). Read-only; no side effects, auth, or rate limits. Use to see which machines are part of the sync group or to check that a new machine registered on startup. |
| conflicts_listA | List sync conflicts in the local conflict registry (Phase 5 Conflict Manager). A conflict is recorded when the storage server delivers an operation for a file that was modified locally since the last sync (base_version drift); the canonical file is preserved and the remote version is forked to a ' (from <machine_label>).' copy. Defaults to unresolved conflicts, newest first. Pass status='all' to include resolved, status='resolved' for the resolved history, and |
| conflicts_getA | Fetch one sync conflict by its global ID (gid), for the Conflict Manager. Returns the full ConflictRecord including both content snapshots (local_content, the canonical file as it is on THIS machine, and remote_content, the version that arrived from the other machine), the unified line diff, addition/deletion counts, and the conflict copy's on-disk path. If there is no unresolved conflict for the gid it returns the most recent resolved one; returns an error if no conflict exists at all. gid is '<local_id>@<machine_id>' as reported by conflicts_list. Read-only; no side effects, auth, or rate limits. After reviewing the diff, resolve with conflicts_resolve. |
| conflicts_resolveA | Resolve one sync conflict using one of 4 deterministic strategies (spec 1.7). |
| journal_distillA | Run the distillation pipeline: read raw events since the high-water mark, group by topic, write mechanical markdown entries, advance high-water. Idempotent. Auto-provisions a project row for orphan slugs (e.g. |
| journal_statusC | Report the journal backlog and high-water mark for a project. |
| journal_commit_upgradesA | After dispatching subagents to upgrade mechanical journal entries to LLM-narrative, call this with the affected task slugs. Updates journal_meta.status_latest to mark the entries as upgraded. |
| journal_housekeepB | Run journal retention/archival for a project. Idempotent. Prunes old raw .jsonl files and archives cold tasks per the configured retention policy. |
| calendar_entities_addA | SIDE-EFFECTFUL. Create a new tracked entity: any named thing you schedule events against (a server, a delivery van, a store location, a piece of equipment, a room, etc.). Not idempotent: a duplicate name (case-insensitive) throws. Returns |
| calendar_entities_updateA | SIDE-EFFECTFUL. Patch an existing entity's fields, including |
| calendar_entities_deleteA | DESTRUCTIVE. Permanently delete an entity AND cascade-delete every event and link attached to it. Not idempotent: deleting an unknown id throws. Returns |
| calendar_entities_listA | Read-only; no side effects, auth, or rate limits. List tracked entities, each annotated with its outgoing and incoming dependency links. Returns |
| calendar_entities_linkA | SIDE-EFFECTFUL. Create or update a directed dependency edge between two entities (e.g. "A feeds B"), or remove one with |
| calendar_events_addA | SIDE-EFFECTFUL. Add a one-off time window (downtime, maintenance, a delivery, a shift, an inspection, etc.) to an entity. NOT idempotent: calling this twice creates two events. |
| calendar_events_updateA | SIDE-EFFECTFUL. Patch an existing event (move it, retitle it, re-home it to a different entity, etc.). The merged result is re-validated: shrinking |
| calendar_events_deleteA | DESTRUCTIVE. Delete one event by id. Idempotent: deleting an already-absent id is a no-op. Returns |
| calendar_events_listA | Read-only; no side effects, auth, or rate limits. List events overlapping a window (half-open: an event ending exactly at |
| calendar_events_conflictsA | Read-only; no side effects, auth, or rate limits. Report scheduling conflicts in a window: overlaps on the same entity ( |
| calendar_export_icsA | Read-only; no side effects, auth, or rate limits. Export events in a window as an RFC 5545 ICS calendar (UTC times, no VTIMEZONE needed) for import into Outlook/Calendar apps. Returns |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| All Projects | List of all registered projects |
TDQS
Scored across 62 tools
The tools are organized into clear domain families (files, tags, projects, calendar, journal, resources, admin, hands, conflicts), and descriptions explicitly cross-reference alternatives. A few orienting/administrative tools overlap in intent (admin_overview vs projects_map vs files_list), but the boundaries are mostly well documented.
Every tool is domain-prefixed and mostly follows a predictable <domain>_<resource>_<action> or <domain>_<action> pattern. Minor deviations exist (admin_overview, calendar_export_ics, journal_status), but the convention remains readable and consistent overall.
62 tools across many subdomains is far beyond a typical well-scoped set; each domain is internally coherent, but the total surface is heavy and increases selection cost. It is not a single trivial domain, so it avoids the absolute worst score, but it is still too many tools.
Core CRUD/lifecycle coverage is strong for files, tags, folders, calendar entities/events, conflicts, resources, and hands. Minor gaps remain: no project metadata update/unregister, no global tag rename/delete, and no direct journal read beyond status.