About cachly-dev/cachly-mcp
cachly-dev/cachly-mcp is an MCP server published by cachly-dev in the RAG category: free tier, no credit card. [Website](https://cachly.dev). Conduid read 124 tools from its source: auto_learn_session, autopilot, brain_briefing, brain_changelog, brain_collab_pairs, brain_confirm_ci and 118 more. No package is published for it, so it installs from a source checkout.
The repository has 2 stars and 1 forks, and its last commit was on 2 Dec 2026. Conduid has no tagged release on record for it. Its topics include ai-memory, causal-trace, devtools, github-copilot and persistent-memory.
Install
git clone https://github.com/cachly-dev/cachly-mcpTools (124)
auto_learn_sessionAuto-learn from a list of session observations WITHOUT explicit learn_from_attempts calls. Pass what happened (commands run, errors seen, solutions found) and the brain classifies and stores lessons automatically. Use at session_end to capture everything you did, even if you forgot to call learn_from_attempts. Returns a summary of what was auto-stored.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| observations * | array | List of observations from this session |
autopilotGenerate a CLAUDE.md / copilot-instructions.md that makes any AI self-managing forever. Writes a configuration file to disk — will overwrite an existing file at the target path. No auth required beyond a valid instance_id. The generated file instructs Claude, Cursor, Copilot, Windsurf, or Gemini to automatically call session_start at window open, learn_from_attempts after every fix, and session_end before closing — without being asked. Returns the generated file content as a string and the path where it was written. Use style="minimal" for just the three hooks; style="full" for the complete ruleset with examples. One command. Every AI. Always on. Use setup_ai_memory instead if you want an interactive one-shot setup that also creates an instance.| Parameter | Type | Description |
|---|---|---|
| editor | string | Target editor (default: claude) |
| instance_id | string | UUID of the cache instance. |
| project_name | string | Your project name (used in generated instructions) |
| style | string | minimal = just the hooks, full = full ruleset with examples (default: full) |
brain_briefingPush-based Brain warning: instead of waiting for you to ask, the Brain proactively checks whether the file you just opened, the PR you are about to raise, or the deploy you are about to run matches any known failure pattern — and surfaces warnings BEFORE something breaks. Call this on file_open (with the file path as context), pr_open (with the PR title/body), or deploy (with a short description of what is being deployed). Returns a risk_level (low/medium/high) plus up to 5 ranked warnings with confidence and a known fix.| Parameter | Type | Description |
|---|---|---|
| context * | string | The event context: file path for file_open, title+body for pr_open, short description for deploy/manual |
| event_type * | string | What triggered this briefing — determines how the context is interpreted |
| instance_id | string | Brain instance ID |
| threshold | number | Minimum confidence (0–1) for a warning to be surfaced. Default 0.6 — raise it to reduce noise. |
brain_changelogGenerate a human-readable Markdown changelog of lessons learned in the last N days. Groups lessons by topic category, annotates with author, recall count and confidence. Ideal for weekly standups, sprint retros, or async team updates — share the output directly in Slack or a doc. Example: brain_changelog(instance_id="...", days=7) → grouped Markdown changelog of the week's learning.| Parameter | Type | Description |
|---|---|---|
| days | number | How many days back to include (default: 7) |
| include_failures | boolean | Include failure-outcome lessons (default: true) |
| instance_id | string | UUID of the cache instance. |
| max_lessons | number | Maximum number of lessons to include (default: 30) |
brain_collab_pairsWho works with whom, with bus-factor alerts| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| min_weight | number | Minimum collaboration events to show a pair (default: 1) |
brain_confirm_ciClose the CI feedback loop: tell the Brain whether a CI job passed or failed and which topics it covered. The Brain adjusts lesson confidence automatically — confirmed failures get +15%, false positives (brain predicted failure but CI passed) get −10%. Called automatically by cachly-action at the end of every pipeline. Also use manually after a deploy to confirm or refute the brain's last prediction.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| job_status * | string | Outcome of the CI job |
| scan_topics | array | Topics the brain predicted would fail (from the scan response). Used to detect false positives. |
| source | string | Optional: "github_actions", "gitlab_ci", etc. |
| topics * | array | Topics touched by this CI run (e.g. ["auth:jwt", "deploy:k8s"]) |
brain_conflictsREAD-ONLY — list every unresolved belief_conflict (a previously confirmed fix now contradicted by a failure) plus the agents currently writing to this Brain (last 1h). This is the arbitration inbox for multi-agent teams: when several AI sessions share one Brain, contradictory writes surface here instead of silently overwriting each other. Resolve any listed conflict with brain_resolve_conflict.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
brain_contribute_signalContribute a privacy-safe signal to the global Brain commons. Only the topic category, outcome, and confidence bucket (high/medium/low) are shared — no lesson text, no org identity. When ≥ k independent orgs contribute the same pattern, a meta-lesson is derived in the commons. Use this instead of fedbrain_contribute when privacy is required (enterprise, GDPR).| Parameter | Type | Description |
|---|---|---|
| confidence | number | Confidence 0–1 (bucketed before sending; default 0.5) |
| instance_id | string | Brain instance ID |
| outcome * | string | Outcome of the pattern |
| topic_category * | string | Normalised topic, e.g. "auth:jwt" or "deploy:k8s" |
brain_coverageA 0–100 health score for the knowledge of your codebase| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| repo_path | string | Path to the git repository (default: current directory) |
brain_diffgit log for your AI Brain — see exactly what changed since a point in time. Returns a structured changelog: new lessons added, lessons updated (outcome changed), lessons recalled (hit count increased), and lessons that decayed. Perfect for weekly reviews: "What did my AI learn this week?" Example: brain_diff(instance_id="...", since="7d") → "12 new · 4 updated · 2 stale"| Parameter | Type | Description |
|---|---|---|
| format | string | Output format (default: summary) |
| instance_id | string | UUID of the cache instance. |
| since | string | Time window: "1d", "7d", "30d", or ISO-8601 date (default: "7d") |
brain_discoverSearch the Brain marketplace for ready-made knowledge bases| Parameter | Type | Description |
|---|---|---|
| limit | number | Max number of results to return (default 10, max 50). |
| query | string | Full-text search query across Brain titles and descriptions. |
| topic | string | Filter by topic prefix (e.g. "auth", "docker", "nextjs"). |
brain_doctorCheck the health of your AI Brain and get actionable recommendations. Reports: lesson count, context entries, last session age, open failures, quality score, effective IQ boost, stale index. Returns a prioritized list of issues with fix instructions.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| workspace_path | string | Absolute path to workspace root — enables package.json analysis for openclaw cross-promo (optional) |
brain_federateFedBrain Layer 6 — Private org knowledge transfer: copy CKG edges + lessons from a source brain into your brain for a specific domain (e.g. "billing", "auth", "deploy"). The new hire use case: one command gives you the senior engineer's 5 years of typed, confidence-weighted knowledge in your domain. Unlike syndicate_search (global, anonymous), brain_federate is org-private — both brains must be in the same Cachly org, or the source instance_id must be explicitly shared. Only team-wide lessons are copied; private and group-only ones stay in the source brain, with their nodes and every edge naming them. Example: brain_federate(source="prod-brain-id", domain="billing", min_confidence=0.6)| Parameter | Type | Description |
|---|---|---|
| domain * | string | Domain to transfer, e.g. "billing", "auth", "deploy", "infra". Use "*" for all domains. |
| dry_run | boolean | Preview what would be transferred without writing (default: false) |
| instance_id | string | Your brain instance ID (destination) |
| min_confidence | number | Minimum edge confidence to transfer (default: 0.6) |
| source * | string | Source brain instance ID to federate from |
brain_file_mapExperts and lessons per file, before you touch it| Parameter | Type | Description |
|---|---|---|
| file_paths * | array | File paths to look up (max 10) |
| instance_id | string | UUID of the cache instance. |
brain_from_ciBulk-ingest CI outcomes: red→green becomes a fix lesson with a causal `fixes` edge, green→red a `causes` edge| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| outcomes * | array | List of CI run outcomes to ingest |
brain_from_gitFill people, files and lessons from git history, incrementally| Parameter | Type | Description |
|---|---|---|
| branch | string | Git branch to parse (default: current branch / HEAD) |
| incremental | boolean | Only process commits since last run (default: true). Set false to reprocess all. |
| instance_id | string | Brain instance ID |
| limit | number | Max commits to process (default: 100, max: 500) |
| repo_path | string | Path to git repository (default: current directory) |
| since | string | Only commits after this date, e.g. "2024-01-01" (optional) |
brain_get_prefRead back one or all preferences stored for this Brain instance. Call with a `key` to get a single value, or omit `key` to list every preference that has been set. Returns a default note when a key has never been set. Complement to `brain_set_pref`.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the Brain instance. |
| key | string | Preference key to read. Omit to list all preferences. |
brain_graphExport the Causal Knowledge Graph as a 3D-render-ready node/link payload (schema cachly.brain_graph/v1) — the data layer behind the brain viz: the visual, explorable 3D map of every concept, person, file and service the brain knows, and how they causally relate. Node kinds (concept/person/file/service) carry stable color groups and a size (val) scaled by reference count; links carry edgeType (fixes/causes/co-occurs/authored/collaborates) and confidence (value). Consumed verbatim by react-force-graph-3d / three.js frontends. Example: brain_graph(instance_id="...") · brain_graph(instance_id="...", domain="auth", min_confidence=0.5, format="summary")| Parameter | Type | Description |
|---|---|---|
| domain | string | Only include nodes whose domain or id contains this string (e.g. "auth", "docker"). Omit for the whole graph. |
| format | string | "json" (default) emits the full renderable payload; "summary" emits a human-readable overview. |
| instance_id | string | UUID of the Brain instance to export. |
| max_nodes | number | Cap on nodes returned (default 400, max 2000). Edges to dropped nodes are pruned. |
| min_confidence | number | Drop edges below this confidence 0..1 (default 0 = keep all). |
brain_hygieneAutonomously sweep and maintain your Brain — flags stale lessons as provisional, archives long-dormant ones, and resolves contradictions where success clearly dominates failure. Safe to run on a schedule (weekly CI job) or on-demand before a big release. Lesson state lifecycle: active → provisional (confidence < threshold) → archived (stale + low-recall + old). Archiving is a label, not a removal: archived lessons still show up in recall. To take a wrong lesson out of recall for every AI, mark it as wrong in the dashboard. dry_run=true (default false) shows what would change without writing anything.| Parameter | Type | Description |
|---|---|---|
| archive_days | number | Days after which a provisional low-recall lesson is archived (default 30) |
| dry_run | boolean | Report changes without applying them (default false) |
| instance_id | string | UUID of the cache instance. |
| provisional_threshold | number | Confidence below which a lesson is flagged provisional (default 0.5) |
brain_importImport a shared Brain into yours: `topic_prefix`, `min_confidence`, `dry_run`| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview what would be imported without writing to the Brain. |
| instance_id | string | UUID of the Brain instance to import lessons into. |
| min_confidence | number | Skip lessons below this confidence threshold (0.0–1.0). Default: 0 (import all). |
| overwrite | boolean | Replace existing lessons with the same topic. Default false. |
| share_id * | string | Share ID (UUID) or full share URL from brain_share. |
| topic_prefix | string | Optional prefix to prepend to all imported topic names (e.g. "team" → "team:auth:jwt-expiry"). Prevents collisions with your own lessons. |
brain_import_metaImport k-anonymous meta-lessons from the global Brain commons into your local Brain. Meta-lessons are derived from ≥ k independent org signals — no individual org data is revealed. Imported lessons get state="meta" and never overwrite your own lessons. Filter by category to target relevant patterns.| Parameter | Type | Description |
|---|---|---|
| category | string | Optional filter, e.g. "auth" or "deploy" |
| instance_id | string | Brain instance ID |
| limit | number | Max meta-lessons to import (default 20, max 200) |
brain_installBrowse and install curated Domain Brains (Kubernetes, Auth, databases)| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview what would be installed without writing anything (default: false) |
| instance_id | string | UUID of the cache instance. |
| limit | number | Max lessons to install (default: 200, max: 500) |
| min_confirms | number | Only install lessons with at least this many community confirmations (default: 1) |
| slug * | string | Domain brain slug from brain_marketplace (e.g. "k8s", "auth", "db") |
brain_marketplaceBrowse and install curated Domain Brains (Kubernetes, Auth, databases)| Parameter | Type | Description |
|---|---|---|
| min_confirms | number | Only count lessons with at least this many community confirmations (default: 1) |
brain_metricsReport the three decisive Brain metrics: (1) time-to-first-recall (onboarding friction), (2) recall-lift vs. raw BM25 (the moat proof, from Cachly-Bench), and (3) team-knowledge-reuse — what % of proven recalls used a teammate's lesson. Use to track whether the Brain is delivering its core value. Pass author="handle" to smart_recall so cross-author reuse can be measured.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
brain_planREAD-ONLY — no side effects, no writes, no external network calls. Generative planning layer on top of the CKG: given a task you are ABOUT to do (e.g. "upgrade Postgres 14→16", "add Stripe webhooks"), returns an ordered action plan grounded in your own proven lessons — the failure modes most likely to bite (ranked by confidence), the concrete steps that fixed them before (with commands), and a pre-flight checklist. Where brain_predict answers "what might fail?", brain_plan answers "what should I do, in what order?". Requires a valid instance_id (your Redis brain). Call before starting non-trivial work.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| task * | string | The change you are about to make, e.g. "migrate auth from sessions to JWT" |
| top_k | number | Max items per section (default: 5) |
brain_portabilityConfig snippets for 7 MCP clients, so the same Brain serves any model| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
brain_predictREAD-ONLY — no side effects, no writes, no external network calls. Predictive Pre-fetch Engine (PPE): given your current context, reads the CKG in your Redis instance to predict likely failures and return the highest-confidence fixes. "Pre-load" means results are returned inline — nothing is cached or persisted. Requires a valid instance_id (your Redis brain). No rate limits. Call at session start when working on a specific feature or debugging area. Set scope="org" to widen prediction across your whole organisation — surfaces cross-team risks ("failed 3× across 2 other teams") from the Org Knowledge Graph, so an incident in one team becomes a vaccine for yours.| Parameter | Type | Description |
|---|---|---|
| context * | string | What you're working on, e.g. "upgrading Keycloak from 21 to 24" |
| instance_id | string | Brain instance ID |
| scope | string | Scope: "instance" (default) = this brain, "org" = warnings from failures in other teams of your organisation, "org+commons" = plus public lessons. Falls back to "instance" without an org. |
| top_k | number | Max predictions to return (default: 5) |
brain_predict_failuresPre-deploy failure prediction with probability percentages. Given a change context (e.g. "upgrading Keycloak 21→24" or "deploying Redis 7 to prod"), returns the top likely failure modes ranked by probability, with pre-loaded fixes. Uses CKG causal edges + lesson history. Call before any significant deploy, migration, or infrastructure change.| Parameter | Type | Description |
|---|---|---|
| context * | string | What you are about to do, e.g. "upgrading Keycloak 21 to 24" |
| format | string | Output format (default: detailed) |
| instance_id | string | Brain instance ID |
| top_k | number | Number of failure predictions to return (default: 5) |
brain_resolve_conflictArbitrate a contested topic by picking the winning side. winner="success" reaffirms the fix (the contradicting failure stops blocking recall); winner="failure" retires the fix (its CKG fixes-edges decay to ~0 and the losing lesson is archived). Human-in-the-loop resolution is the strongest possible confidence signal. List open conflicts first with brain_conflicts.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| resolved_by | string | Who resolved it (agent name or "human"); default "human" |
| topic * | string | The contested topic, e.g. "fix:jwks-rotation" |
| winner * | string | Which side wins the arbitration |
brain_searchBM25+ full-text search over ALL brain data: lessons, context entries, session history, CKG nodes, roadmap items. Unlike smart_recall (which focuses on lessons + context), brain_search casts a wider net. Use when smart_recall returns nothing or when you want to find anything the brain knows about a topic.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| limit | number | Max results (default: 15) |
| query * | string | What to search for |
brain_seed_starterSeed 16 universal lessons so your first `smart_recall` finds something; runs on a fresh repo| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview which starter lessons would be seeded without writing. |
| force | boolean | Re-seed even if already seeded; also overwrites same-topic lessons. Default false. |
| instance_id | string | UUID of the Brain instance to seed. |
| topic_filter | array | Only seed lessons whose topic or tags match one of these strings (e.g. ["docker", "auth"]). Omit to seed all. |
brain_service_mapMap everything the Brain knows about a running service or system: who operates it, which files run in it, every known failure, and every proven fix. Built from lessons tagged with `service="..."` in learn_from_attempts. Ideal for incident triage — when a service is misbehaving (e.g. a restarting pod), instantly surface who knows it and what has gone wrong with it before. Example: brain_service_map(service="prometheus") → operators, known OOM failures, and the fixes that worked.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| service * | string | Name of the service/system to map (e.g. "prometheus", "cachly-web", "auth-service"). Matches the `service` tag on stored lessons. |
brain_set_prefPersist a user preference for this Brain instance. Preferences are stored in Redis and survive restarts. Known keys: `auto_changelog` (set to "false" to disable the automatic changelog shown at session_start).| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance (Brain ID). |
| key * | string | Preference key (e.g. "auto_changelog"). |
| value * | string | Value to set (e.g. "false" to disable, "true" to re-enable). |
brain_sharePublish a Brain snapshot as a link (public or unlisted). For your own data, run `npx @cachly-dev/mcp-server export`| Parameter | Type | Description |
|---|---|---|
| description | string | Short description of what knowledge this Brain contains. |
| dry_run | boolean | If true, preview what would be shared without creating the public link. |
| instance_id | string | UUID of the Brain instance to export from. |
| max_lessons | number | Maximum number of lessons to include (default 100, max 500). |
| title | string | Human-readable title for the shared Brain snapshot. Default: "My Brain Snapshot". |
| topic_filter | array | Only export lessons whose topic contains one of these strings. Omit to export all lessons. |
| visibility | string | "public" = discoverable in the Brain marketplace. "unlisted" = only accessible by direct link. Default: unlisted. |
brain_share_listList your shares; revoke one so the link goes dead| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the Brain instance that created the shares. |
brain_unshareList your shares; revoke one so the link goes dead| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the Brain instance that owns the share. |
| share_id * | string | Share ID to revoke (from brain_share or brain_share_list). |
brain_watchInstall an ambient git post-commit hook that automatically learns from every commit — no manual brain_from_git needed. After installation every `git commit` sends the commit message, SHA, and changed files to the cachly Brain in the background. It is the same hook `init` installs; no key is written into the project (the hook reads $CACHLY_JWT or ~/.cachly/credentials.json when it runs). Removes an older brain_watch block. Idempotent: running brain_watch twice installs the hook only once. The hook always exits 0 and runs asynchronously — it never blocks a commit. Returns the hook path and installation status (written/upgraded/appended/unchanged/skipped-no-git).| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID to learn into |
| project_dir | string | Path to the git repository (default: current directory ".") |
brain_who_knowsFind your team's experts on a topic, ranked from authorship| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| limit | number | Max number of experts to return (default: 10) |
| topic * | string | Topic or question to find experts for |
cache_deletePermanently delete one or more keys from a running cache instance (uses Redis DEL). This operation is destructive and irreversible — deleted keys cannot be recovered. Deleting a non-existent key is safe and returns 0 for that key (no error). Returns the count of keys that were actually deleted (existing keys only). Use this to explicitly remove stale entries; prefer cache_set with a short TTL for auto-expiring data. Do NOT use this to clear an entire instance — use the dashboard or delete_instance for that.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance to delete keys from (get from list_instances) |
| keys * | array | One or more cache keys to delete. Accepts exact keys only (no glob patterns — use cache_keys to list first). |
cache_existsCheck whether one or more keys exist in a running cache instance (uses Redis EXISTS). Read-only — no side effects. Returns the count of keys that currently exist (integer 0 to N). If none of the keys exist, returns 0. If all exist, returns the total key count passed in. Duplicate keys in the input array are each counted separately (Redis behavior). Use this to check presence before a cache_get to avoid null handling, or to verify a cache warm-up completed. Use cache_get instead if you also need the value; use cache_ttl if you need expiry info.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance to check (get from list_instances) |
| keys * | array | Keys to check for existence. Accepts exact keys only (no glob patterns). |
cache_getCache and semantic operations. Pass `org_id` on `cache_get` / `cache_set` to share the cache org-wide| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the instance. |
| key * | string | Cache key to retrieve |
| org_id | string | Optional org ID — if the direct key misses, falls back to the shared org namespace org:{org_id}:sem:{key} |
cache_keysList keys in a cache instance matching an optional glob pattern (e.g. "user:*", "session:*"). Uses SCAN to avoid blocking the server. Returns at most `count` keys.| Parameter | Type | Description |
|---|---|---|
| count | number | Max keys to return (default: 50, max: 500) |
| instance_id | string | |
| pattern | string | Glob pattern (default: *) |
cache_lock_acquireAcquire a distributed lock using Redis SET NX PX (Redlock-lite). Returns a fencing token on success. The lock auto-expires after ttl_ms to prevent deadlocks. Use cache_lock_release to free the lock early.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| key * | string | Lock resource identifier |
| retries | number | Max acquire attempts (default: 3) |
| retry_delay_ms | number | Milliseconds between retries (default: 50) |
| ttl_ms * | number | Safety TTL in milliseconds (e.g. 5000) |
cache_lock_releaseRelease a previously acquired distributed lock. Uses a Lua script for atomic release – only deletes the key if the fencing token matches.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| key * | string | Lock resource identifier (same as in cache_lock_acquire) |
| token * | string | Fencing token returned by cache_lock_acquire |
cache_mgetRetrieve multiple keys in one round-trip using native Redis MGET. Returns values in the same order as the keys array; missing keys are null.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| keys * | array | List of keys to fetch |
cache_msetSet multiple key-value pairs in a single pipeline round-trip. Supports per-key TTL – unlike native MSET. Uses one TCP round-trip for N keys via Redis pipeline. Each item overwrites any existing value for that key. On partial failure the successfully pipelined keys are committed; a per-key error list is returned for any that failed. Returns a summary: { set: N, errors: [...] }. Use cache_set for a single key; use cache_stream_set for large streaming payloads.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| items * | array | Key-value pairs to set |
cache_org_statsHits and requests served from the cache, per instance or across your org| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| org_id * | string | Org ID to inspect (e.g. "acme", "my-company") |
cache_setCache and semantic operations. Pass `org_id` on `cache_get` / `cache_set` to share the cache org-wide| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance (from list_instances) |
| key * | string | Cache key |
| org_id | string | Optional org ID — also writes the key to the shared org namespace org:{org_id}:sem:{key} with the same TTL |
| ttl | number | Time-to-live in seconds (optional, omit for no expiry) |
| value * | string | Value to store (string or JSON) |
cache_statsHits and requests served from the cache, per instance or across your org| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance (from list_instances) |
cache_stream_getRetrieve a previously cached stream as an ordered list of string chunks. Returns null on cache miss (key absent or empty list). Stored under cachly:stream:{key}.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| key * | string | Cache key |
cache_stream_setCache a list of string chunks (e.g. LLM token stream) via Redis RPUSH. Each chunk is stored as a separate list element under cachly:stream:{key}. Replay with cache_stream_get.| Parameter | Type | Description |
|---|---|---|
| chunks * | array | Ordered list of string chunks |
| instance_id | string | UUID of the cache instance. |
| key * | string | Cache key |
| ttl | number | TTL in seconds for the stored list (optional) |
cache_ttlGet the remaining time-to-live (TTL) of a key in seconds. Returns -1 if the key exists but has no expiry, -2 if the key does not exist. Read-only — no side effects. Use cache_set with a ttl parameter to set or update the expiry.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance (from list_instances) |
| key * | string | Cache key to inspect |
cache_warmupPre-warm the semantic cache with a list of prompt/value pairs. For each entry: computes an embedding, checks if a similar entry already exists (similarity ≥ 0.98), and writes new entries to Valkey + pgvector index. Use this to seed FAQ responses, product descriptions, or known-good LLM answers before the first real user traffic. Requires OPENAI_API_KEY.| Parameter | Type | Description |
|---|---|---|
| auto_namespace | boolean | Auto-detect the namespace per prompt using text heuristics. Overrides `namespace` when no per-entry namespace is set. |
| entries * | array | List of prompt/value pairs to pre-warm into the cache |
| instance_id | string | UUID of the cache instance. |
| namespace | string | Default namespace for all entries (default: cachly:sem) |
| ttl | number | Time-to-live in seconds for warmed entries (omit for no expiry) |
causal_traceRoot-cause analysis through the causal knowledge graph| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| max_depth | number | Max causal chain depth to trace (default: 5) |
| problem * | string | Describe the problem or error you are seeing right now |
| tags | array | Optional: narrow search to these tags |
ckg_inspectInspect the causal graph around a concept| Parameter | Type | Description |
|---|---|---|
| concept * | string | Concept to inspect, e.g. "fix:clickhouse-ipv6" or "docker" |
| instance_id | string | Brain instance ID |
| max_hops | number | Traversal depth (default: 2) |
cls_ingestContinuous Learning Stream (CLS — Layer 5): Ingest learning signals WITHOUT explicit session_end calls. Sources: git_commit (commit message + files → CKG edges), ci_outcome (green/red build → confirms fix), ide_diagnostic (compiler error + fix pair → instant lesson). Install automatic ingestion with cls_install_hooks — brain learns from every commit and CI run.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| payload * | object | Event data. git_commit: {message, sha?, files?, diff?}. ci_outcome: {status, prev_status, job, context?}. ide_diagnostic: {error, fix, file?} |
| source * | string | Event source type |
cls_install_hooksREAD-ONLY — outputs text only, writes no files, makes no network calls, has no side effects. Generates ready-to-paste shell scripts: a git post-commit hook and/or a GitHub Actions step. You must manually copy and install the output. Once the generated scripts are installed, each git commit or CI run will make outbound HTTPS calls to api.cachly.dev to feed learning signals to your brain. No auth required to call this tool — only an instance_id. Run once per repository.| Parameter | Type | Description |
|---|---|---|
| hooks | array | Which hooks to output (default: ["git", "ci"]) |
| instance_id | string | Brain instance ID |
| repo_path | string | Path to repo root (default: current dir) |
compact_recoverRecover your context after you hit the context-window limit| Parameter | Type | Description |
|---|---|---|
| focus | string | What you were working on (helps filter relevant context) |
| instance_id | string | Brain instance ID |
create_instanceManage Brain instances| Parameter | Type | Description |
|---|---|---|
| name * | string | Unique name for the instance (min 3 chars) |
| tier * | string | Pricing tier. Start with "free" for testing. |
create_orgCreate a new Cachly organization for team collaboration; organizations are free. After creation, invite team members with invite_member. Up to 5 people share the Brain tier Team (€49/mo); up to 20 people with SSO use Business (€199/mo). Enterprise on request.| Parameter | Type | Description |
|---|---|---|
| name * | string | Organization display name (e.g. "Acme Engineering") |
| slug | string | URL-safe slug (e.g. "acme-eng"). Auto-generated from name if omitted. |
crystal_viewInspect the current Memory Crystal — the compressed wisdom distilled from all past sessions. Shows top patterns per category, lesson count, and when the crystal was last refreshed. Call after session_start when you want to quickly see accumulated wisdom across all past work.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| show_raw | boolean | Include raw JSON crystal data (default: false) |
delete_instanceManage Brain instances| Parameter | Type | Description |
|---|---|---|
| confirm * | boolean | Must be true to confirm deletion |
| instance_id | string | UUID of the instance to delete |
detect_namespaceClassify a prompt into one of 5 semantic namespaces using text heuristics. Overhead: <0.1 ms, no embedding required. Useful to understand which namespace cachly will use for a given prompt. Returns one of: cachly:sem:code, cachly:sem:translation, cachly:sem:summary, cachly:sem:qa, cachly:sem:creative.| Parameter | Type | Description |
|---|---|---|
| prompt * | string | The text prompt to classify into a semantic namespace |
fedbrain_confirmConfirm that a syndicated lesson from the global commons worked for you. Propagates confirmation back — increments confirm_count on the knowledge certificate. Also updates your local CKG confidence. At 10 independent confirmations → Gold Standard.| Parameter | Type | Description |
|---|---|---|
| id * | string | Syndicated lesson id to confirm (shown next to each fedbrain_search result) |
| instance_id | string | Brain instance ID |
| outcome * | string | Did the lesson work for you? |
| topic | string | Optional topic of the lesson — also updates your local CKG confidence for it |
fedbrain_contributeFedBrain (Layer 6): Contribute a lesson to the global Knowledge Commons with a cryptographic knowledge certificate. Certificate includes: domain fingerprint, confidence, outcome chain hash. Lessons with 10+ independent confirmations become Gold Standard. Context-weighted: other brains with similar tech stacks see your lesson ranked higher in fedbrain_search. Only team-wide lessons can be contributed; private and group-only lessons count as not found.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
| lesson_key * | string | Topic key to contribute, e.g. "fix:clickhouse-ipv6" |
| visibility | string | Visibility (default: public) |
fedbrain_searchContribute to, and search, the global Knowledge Commons| Parameter | Type | Description |
|---|---|---|
| context_hints | array | Your tech stack, e.g. ["go", "kubernetes", "postgres"] |
| instance_id | string | Brain instance ID |
| limit | number | Max results (default: 10) |
| query * | string | What to search for |
fedbrain_statusShow your FedBrain federation status: lessons contributed to global commons, recent confirmations, Gold Standard lessons, pending propagations. Use to track your brain's global knowledge contribution.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | Brain instance ID |
forget_contextDelete one or more cached context entries. Use when context is stale or you want to force a fresh analysis. Supports glob patterns: "file:*" deletes all file summaries.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| keys * | array | Keys to delete (supports glob) |
get_api_statusFull diagnostic for your cachly Brain — call this FIRST whenever anything is not working. Returns: API reachability, JWT validity + expiry, your user ID, all Brain instances with live status (🟢 running / 🟡 provisioning / 🔴 stopped), Redis ping on the active connection, and actionable fix steps for every issue found. Workflow: run get_api_status → read the issue it flags → fix it → retry your tool.get_connection_stringGet the Redis/Valkey connection string (redis:// URL) for a running instance. Use this to configure your application or set environment variables.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the instance. |
get_instanceGet full metadata for a specific cache instance: name, tier, status (provisioning / running / paused), region, RAM limit, Redis connection string, created_at, and expiry. Read-only. Returns an error if the instance_id is not found or belongs to another account. Call list_instances first to discover valid UUIDs. Use get_connection_string instead if you only need the redis:// URL for your app config.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the instance (from list_instances) |
get_org_planGet the current org plan, seat usage, and billing info for an organization. Shows: plan name, price, seats used/max, next billing date. To upgrade: use the billing portal URL returned by this tool.| Parameter | Type | Description |
|---|---|---|
| org_id * | string | UUID of the organization |
global_learnStore a lesson that applies across ALL your projects (cross-project knowledge). Idempotent: if a lesson with the same topic already exists, it is updated in place — no duplicates are created. Returns a confirmation with the stored lesson key. No rate limits. Global lessons are stored with the prefix cachly:global:lesson: and recalled from any instance via global_recall. Use for tool preferences, personal workflows, platform quirks, and universal gotchas. Example: global_learn(topic="bash:macos-arrays", lesson="Arrays work differently on macOS bash 3.2"). Use learn_from_attempts for project-specific session lessons; use team_learn to share lessons with your team.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance (used for connection) |
| lesson * | string | The lesson content |
| severity | string | Severity (default: minor) |
| tags | array | Optional tags |
| topic * | string | Topic key in format "category:keyword" |
global_recallRead-only retrieval of cross-project lessons stored via global_learn. No side effects. Returns a list of matching global lesson objects, each with topic, lesson text, severity, and tags. If no topic is provided, returns all global lessons (up to 50). If topic is provided, returns all lessons whose topic key contains that string (partial match). Use this for lessons that apply universally across all projects (tool quirks, shell gotchas, platform behavior). Use recall_best_solution instead for project-specific lessons; use team_recall for org-scoped lessons.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance (used for connection) |
| topic | string | Topic or keyword filter (optional) |
import_public_brainImport community lessons from the Cachly Public Brain for a framework. Non-destructive: existing lessons with the same topic key are not overwritten. Returns the count of lessons imported and their topic slugs. Available frameworks: nextjs, fastapi, go, docker, kubernetes, react, typescript, python, rust, laravel, rails, spring. Use this to bootstrap a new brain with battle-tested community knowledge before your first session_start. Use publish_lesson to contribute your own lessons to the Public Brain; use learn_from_attempts for storing lessons from your own sessions.| Parameter | Type | Description |
|---|---|---|
| framework * | string | Framework/platform to import lessons for |
| instance_id | string | UUID of the cache instance to import into |
| limit | number | Max lessons to import (default: 20) |
index_projectCache and semantic operations. Pass `org_id` on `cache_get` / `cache_set` to share the cache org-wide| Parameter | Type | Description |
|---|---|---|
| dir * | string | Absolute path to the directory to index (e.g. /Users/you/myproject/src) |
| extensions | array | File extensions to include (default: ["ts","js","go","py","java","rs","md","kt","swift"]) |
| instance_id | string | UUID of the cachly instance |
| max_files | number | Maximum number of files to index (default: 100) |
| namespace | string | Semantic namespace to store under (default: cachly:sem:code) |
| summary_chars | number | Characters to use as summary per file (default: 1200) |
| ttl | number | TTL in seconds for indexed entries (default: 86400 = 24 h) |
invite_memberMUTATION — sends an invite email immediately and cannot be undone via MCP. Invite a team member to a Cachly organization by email. Requires the caller to be an admin or owner of the organization. Valid roles: admin (manage members + instances), member (read + cache ops). Default role: member. Returns an error if the email is already a member or has a pending invite.| Parameter | Type | Description |
|---|---|---|
| email * | string | Email address to invite |
| org_id * | string | UUID of the organization |
| role | string | Role for the invited member (default: member) |
knowledge_decayConfidence scoring for every lesson in your Brain — because old knowledge rots. Computes a decay score (0–100%) per lesson based on age, recall frequency, and outcome. Lessons recalled recently score high. Lessons from 90 days ago never recalled score low. Returns a ranked list with visual confidence bars: "████░░░░ 40%". Use this before a big refactor to know which lessons to trust and which to re-validate.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| min_age_days | number | Only include lessons older than N days (default: 0 = all) |
| show_top | number | Number of entries to return, sorted by lowest confidence first (default: 20) |
learn_from_attemptsStore a structured lesson after any fix, deploy or discovery (with `author`, `visibility`)| Parameter | Type | Description |
|---|---|---|
| author | string | Who is storing this lesson, e.g. "alice". Enables cross-author reuse tracking. |
| commands | array | Commands that worked or failed (e.g. ["rsync -avz ...", "docker compose up -d"]) |
| context | string | The SYMPTOM in the words someone would search for, before they knew the fix ("deploy stuck, rollout not finishing"). Plus error messages and root cause. Optional but high-value: it is what closes the gap between the question and the answer. |
| depends_on | array | Prerequisites, e.g. ["node:>=20", "docker:running"]. A stale one flags dependent lessons for review. |
| ersetzt | string | Topic slug of an OLDER lesson this one refutes. The old one is suppressed in smart_recall and shows a "superseded" banner. |
| file_paths | array | Files involved in this lesson (e.g. ["infra/deploy.sh", ".env"]) |
| gilt_ab | string | ISO date since when the FACT is true (vs. when written). Omit if unknown. A replacement sets gilt_bis on the old lesson (then shown as history). About the fact, NOT an age decay. |
| gilt_fuer | array | Version scope of the FACT, package@range, all must hold: ["next@<15", "react@>=18 <19", "go@>=1.22", "python:fastapi@<0.110"]. Recall ranks a lesson that does not fit the project versions last, marked, never hidden; unknown = no change. Omit on update to keep, [] clears. |
| group | string | Optional sub-team scope, e.g. "backend". Only that group and admins see it. Independent of visibility. |
| grund | string | One line: WHY the previous version was wrong, like a commit message. REQUIRED when the topic already exists; optional on first write. |
| instance_id | string | UUID of the cache instance. |
| outcome * | string | Did it work? |
| search_questions | array | Up to 3 short questions a colleague would type to find this lesson BEFORE knowing the answer. Use their everyday words, not the lesson's own terms; same language as the lesson. Omit on update to keep, [] clears. |
| service | string | Service or system this lesson concerns, e.g. "prometheus", "auth-service". |
| service_kind | string | "service" (default) for an application, "system" for infrastructure like prometheus or redis. |
| severity | string | Impact severity: critical (blocks work/deploy), major (significant slowdown), minor (nice to know). Default: major. |
| tags | array | Topic tags for filtering (e.g. ["bash", "deploy", "env"]) |
| topic * | string | Short slug, e.g. "deploy:web", "debug:redis-tls", "fix:generate-series" |
| visibility | string | Who can see it: "team" (default) = all members, "private" = only via exact recall_best_solution, "public" = same as team for now. |
| what_failed | string | What did NOT work (optional but valuable) |
| what_worked * | string | What solved it. LEAD WITH THE DECISIVE FACT (number, address, command) in the first 100 characters. A measured number needs its basis ("89.6 % on 500 questions, npm run bench"); re-measure at 2x data |
lesson_verifiedReport that you RAN the check for a lesson and what came back. This is the only way a lesson gets fresh again — reading one does not verify it, and since 0.10.165 recall no longer pretends otherwise. The server never runs the command itself: you run it, you report the result. holds=true refreshes verified_at and clears any earlier failed check. holds=false marks the lesson as questionable and REQUIRES `befund` — it deletes nothing, because a check can fail for reasons that have nothing to do with the lesson. If the check never reached the claim (staging timed out, service down, lockfile behind), add ursache="umgebung": then nothing is flagged and recall only shows a quiet note. Example: lesson_verified(topic="deploy:web", holds=true, geprueft_mit="curl -s http://127.0.0.1:3220/bereit")| Parameter | Type | Description |
|---|---|---|
| author | string | Optional: your handle. |
| befund | string | What you saw instead. REQUIRED when haelt=false — a warning without content is noise. |
| geprueft_mit | string | The command you actually ran, one line. Shown in later recalls so the next reader can repeat it. |
| haelt * | boolean | Did the check confirm the lesson? true or false. There is deliberately no "not sure": guessing true makes an unchecked lesson look fresh, guessing false flags a correct one. |
| instance_id | string | UUID of the cache instance. |
| topic * | string | Topic slug of the lesson you checked. |
| ursache | string | Only with haelt=false: why it failed. "aussage" (default) = the check ran and the claim no longer holds; the lesson is flagged. "umgebung" = the check never reached the claim (timeout, service down, lockfile behind); the lesson is NOT flagged — "assertion failed" is news about the note, "staging timed out" is news about the day. |
list_instancesManage Brain instanceslist_orgsList your Cachly organizations. Returns each org with plan, seat count, and member info. Organizations are free. Teams pick a Brain tier: Team €49/mo for up to 5 people, Business €199/mo for up to 20 people with SSO. Enterprise on request.list_rememberedList all cached context entries for this project. Shows what knowledge the AI assistant has already cached, so you can decide whether to recall existing context or refresh it. Returns: key, category, size, TTL remaining, and a content preview.| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by category (default: all) |
| instance_id | string | UUID of the cache instance. |
| limit | number | Max entries to return (default: 50) |
madc_deliberateSpecialist AI agents vote to resolve contradictory lessons| Parameter | Type | Description |
|---|---|---|
| context | string | Optional context for the deliberation |
| instance_id | string | Brain instance ID |
| topic * | string | Topic to deliberate, e.g. "fix:jwks-rotation" |
memory_consolidateDetect contradictions, merge duplicates, expire stale lessons| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | If true, report what would change without writing (default: false) |
| instance_id | string | UUID of the cache instance. |
| stale_days | number | Lessons not recalled in this many days are flagged stale (default: 90) |
memory_crystalizeDistill all lessons into a Crystal for instant team context| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| label | string | Optional label for this crystal (e.g. "Q1 2026", "v2 launch"). Auto-generated from date if omitted. |
publish_lessonPublish a lesson to the Cachly Public Brain (anonymized community knowledge base). Published lessons can be imported by other developers via import_public_brain. PII is stripped automatically. Visible under the framework/category tag. Returns { lesson_id, topic, framework, published_at } confirming the publish. Irreversible — once published to the public brain, lessons cannot be deleted via the MCP interface. Use learn_from_attempts or global_learn for private lessons; use syndicate for anonymized global sharing without framework tagging.| Parameter | Type | Description |
|---|---|---|
| framework | string | Framework/platform tag (nextjs, fastapi, go, docker, etc.) |
| instance_id | string | UUID of the cache instance. |
| lesson * | string | Lesson to publish (PII will be stripped) |
| severity | string | Severity |
| topic * | string | Topic key (used as public category) |
recall_atBrain Archaeology — see what a lesson looked like at a specific point in time. "What did we know about deployments 3 months ago?" Returns the history of a topic filtered to entries before the given date. Shows how the lesson evolved: failure → partial → success. Also useful to understand WHY old code decisions were made.| Parameter | Type | Description |
|---|---|---|
| date * | string | ISO date string (e.g. "2026-01-15") — returns entries stored BEFORE this date |
| instance_id | string | UUID of the cache instance. |
| topic * | string | Topic slug to look up, e.g. "deploy:api" |
recall_best_solutionThe known fix for a topic, with its success and failure history| Parameter | Type | Description |
|---|---|---|
| author | string | Who is asking (optional). Required to read a group-scoped lesson: without it, group-scoped lessons answer like "not found". Team-wide lessons need no author. |
| instance_id | string | UUID of the cache instance. |
| topic * | string | Topic slug to look up, e.g. "deploy:web". Supports partial match. |
recall_contextRetrieve previously saved context from the cache. Returns the saved content or null if not found. Use this at the START of any task to check if you already have relevant context cached, before doing expensive operations like reading many files. Supports glob patterns: "file:*" matches all file summaries, "arch*" matches architecture-related keys.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| key * | string | The key to look up (supports glob pattern like "file:*") |
recall_feedbackTell the Brain whether a recalled lesson ACTUALLY SOLVED your problem. This is the one signal the Brain cannot infer: recall_count only means "it was shown". Call it right after a lesson helped you — or after you solved something the Brain should have found. IMPORTANT: rank=0 means the lesson was NOT in the answer at all. That is the most valuable feedback there is, because it says the ranking never surfaced it. Example: recall_feedback(query="why does the deploy abort", topic="ci:timeout-reports-cancelled", helped=true, rank=0)| Parameter | Type | Description |
|---|---|---|
| author | string | Optional: your handle. |
| helped * | boolean | Did it solve your problem? true or false. There is deliberately no "not sure" — a guessed value is worse than none. |
| instance_id | string | UUID of the cache instance. |
| note | string | Optional: what was missing, or why it did not fit. |
| query * | string | The question you asked, as you asked it. Not a summary — the ranking has to learn from the real wording. |
| rank * | number | Where it stood in the answer, 1-based. 0 = it was NOT in the answer at all (the most valuable case). |
| topic * | string | Topic of the lesson this is about. May be a lesson that was NOT returned (then set rank=0). |
remember_contextKeep architecture findings, decisions and file summaries| Parameter | Type | Description |
|---|---|---|
| category | string | Category for organization (default: custom) |
| content * | string | The context/summary/analysis to remember |
| instance_id | string | UUID of the cache instance. |
| key * | string | Descriptive key like "project_overview", "auth_architecture", "file:src/index.ts" |
| ttl | number | Time-to-live in seconds (default: 86400 = 24h, use 0 for no expiry) |
roadmap_addA project roadmap stored in the Brain| Parameter | Type | Description |
|---|---|---|
| description | string | What needs to be done, acceptance criteria, context |
| instance_id | string | UUID of the cache instance. |
| milestone | string | Milestone/epic this belongs to (optional) |
| priority | string | Priority level (default: medium) |
| tags | array | Tags for filtering (e.g. ["api", "web", "sdk", "infra"]) |
| title * | string | Short title of the task/feature (3–10 words) |
roadmap_listList all roadmap items, optionally filtered by status, priority, tag, or milestone. Returns items sorted by priority then creation date. Called automatically by session_start to show open work.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| milestone | string | Filter by milestone (optional) |
| priority | string | Filter by minimum priority (optional) |
| status | string | Filter by status. Use 'open' to see planned+in-progress+blocked (default: open) |
| tag | string | Filter by tag (optional) |
roadmap_nextA project roadmap stored in the Brain| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| tag | string | Filter by tag (optional) |
roadmap_updateUpdate the status, priority, or details of a roadmap item. Use to move items through the lifecycle: planned → in-progress → done (or blocked/cancelled). Also use to add notes/findings while working on an item.| Parameter | Type | Description |
|---|---|---|
| description | string | Updated description (optional) |
| id * | string | Item ID returned by roadmap_add or roadmap_list |
| instance_id | string | UUID of the cache instance. |
| notes | string | Progress notes, findings, or blockers (appended to existing notes) |
| priority | string | Updated priority (optional) |
| status | string | New status for the item |
| title | string | Updated title (optional) |
semantic_searchCache and semantic operations. Pass `org_id` on `cache_get` / `cache_set` to share the cache org-wide| Parameter | Type | Description |
|---|---|---|
| auto_namespace | boolean | Auto-detect the namespace from the query text using text heuristics instead of using the `namespace` parameter. Returns results only from the matching domain (code/translation/summary/qa/creative). |
| instance_id | string | UUID of the cache instance (from list_instances) |
| namespace | string | Semantic namespace to search in (default: cachly:sem) |
| query * | string | Natural-language query to find similar cached content |
| threshold | number | Minimum cosine similarity 0–1 (default: 0.82). Lower = broader matches. |
| top_k | number | Maximum number of results to return (default: 5) |
| use_hybrid | boolean | Enable Hybrid BM25+Vector RRF fusion search. Passes `hybrid: true` and the query text to the pgvector API for higher precision on named entities. Default: false. |
session_endSave what you built; extract lessons from the summary and the git log| Parameter | Type | Description |
|---|---|---|
| files_changed | array | Key files changed this session (optional) |
| instance_id | string | UUID of the cache instance. |
| lessons_learned | number | Number of new lessons stored this session (optional) |
| summary * | string | Brief summary of what was accomplished this session (2-3 sentences) |
| workspace_path | string | Absolute path to the project root (e.g. "/Users/you/myproject"). Enables Ambient Learning — reads git log since session start and auto-learns from commit messages. |
session_handoffSave a detailed handoff for the NEXT chat window / session. Stores: current progress, TODO list (done + remaining), changed files with descriptions, instructions for the next assistant, and any incomplete work. The next session_start automatically includes this handoff so the new window knows EXACTLY what happened and what remains. Call this BEFORE closing a chat window, especially if work is incomplete. This prevents the "continue" problem where new windows lose context, skip tasks, or produce broken code.| Parameter | Type | Description |
|---|---|---|
| blocked_on | string | If work is blocked, describe what is needed to unblock (e.g. "waiting for API deploy", "needs user input on design") |
| completed_tasks * | array | Tasks that were fully completed (e.g. "Implemented brainSearch() in JS SDK") |
| context_summary | string | Brief summary of what happened this session (architecture decisions, key findings, blockers) |
| files_changed | array | Changed files with their current state — marks partial/broken files so next window knows to fix them |
| instance_id | string | UUID of the cache instance. |
| instructions | string | Free-form instructions for the next assistant. Be specific: what to do next, what to avoid, what broke. |
| remaining_tasks * | array | Tasks NOT yet done — the next window MUST pick these up |
session_pingLightweight checkpoint — call this every ~5 tool calls or whenever you complete a significant step. Stores the current task + files touched so session_start on the NEXT provider can reconstruct what happened even if session_end was never called (e.g. Claude context limit hit, window crashed). This solves the provider-switching problem: Claude → Copilot → Cursor all see the same last checkpoint. Extremely fast — one Redis SET, no blocking operations.| Parameter | Type | Description |
|---|---|---|
| files_touched | array | Files modified so far this session |
| instance_id | string | UUID of the cache instance. |
| next_step | string | What the NEXT step is after this checkpoint (helps next provider resume immediately) |
| provider | string | Current AI provider (e.g. "claude-code", "copilot", "cursor", "windsurf") |
| task * | string | What you are currently working on (e.g. "Implementing invite handler in handler/invite.go") |
session_startFull briefing: last session, open failures, recent lessons, Brain health| Parameter | Type | Description |
|---|---|---|
| author | string | Your name or handle (e.g. "alice"). Enables Team Telepathy — filters YOUR lessons vs TEAM lessons from past 7 days. |
| focus | string | Keywords for what you plan to work on today (e.g. "deploy infra api"). Used to surface relevant lessons at the top. |
| instance_id | string | UUID of the cache instance. |
| provider | string | Current AI provider (e.g. "claude-code", "copilot", "cursor", "windsurf"). Shown in the briefing header and saved so the next provider can see who was last active. |
| workspace_path | string | Absolute path to the project root. If no session_end was found (e.g. context limit hit), reads git log to reconstruct what happened since last session. |
session_start_summaryFocused session briefing for large brains. Returns only the top-N most relevant lessons for the given focus topic, scored by relevance, recall count, severity, recency, and outcome. Ideal when session_start returns too many lessons to fit in context (1000+ lesson brains). Use session_start for the full briefing including handoffs, streak, roadmap, and team telepathy.| Parameter | Type | Description |
|---|---|---|
| author | string | Your name or handle (optional). Same as session_start — used for team lesson filtering. |
| focus * | string | The topic or task you are about to work on (e.g. "deploy infra", "api auth"). Used to score and rank lessons by relevance. |
| instance_id | string | UUID of the cache instance. |
| top_n | number | Number of lessons to return (default 10, max 25). Lessons are ranked by relevance to focus. |
set_cost_per_callStore a cost per LLM API call (USD) for this instance as a reference value. cachly does not turn it into a savings estimate: cache_stats and cache_org_stats show counted hits only. The tool stays so that existing scripts keep working. Use list_instances to find your instance_id.| Parameter | Type | Description |
|---|---|---|
| cost_per_call_usd * | number | Cost per LLM API call in USD, above 0 and at most 100 (for example 0.002). |
| instance_id | string | UUID of the cache instance. |
setup_ai_memoryOne-shot setup of the cachly 3-layer AI Memory system for a project.
Layer 1 — Storage: your cachly instance (Valkey, persistent across sessions)
Layer 2 — Tools: learn_from_attempts + recall_best_solution + smart_recall (the memory API)
Layer 3 — Autopilot: generates a copilot-instructions.md / .github/copilot-instructions.md
that instructs any MCP-compatible AI to recall known solutions BEFORE each task
and save lessons AFTER — fully automatic, zero manual effort.
Returns the copilot-instructions.md content + provider-specific .mcp.json snippet.
Optionally writes copilot-instructions.md directly to the project directory.| Parameter | Type | Description |
|---|---|---|
| embed_provider | string | Embedding provider to use for smart_recall / semantic search. Default: openai. Use ollama for fully local/free setup. |
| instance_id | string | UUID of the cachly instance to use as the AI brain |
| project_description | string | Short description of the project (used in the generated instructions) |
| project_dir | string | Absolute path to the project root. If provided, puts the cachly block into .github/copilot-instructions.md (and CLAUDE.md, .cursor/rules/cachly.mdc, .windsurfrules when that editor is in use). Text outside the cachly markers is kept. |
skill_gapsKnowledge blind spots: unresolved failures, missing attribution| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| min_failures | number | Min failure count to flag a domain as a gap (default: 1) |
smart_recallHybrid BM25 + semantic + causal-graph search, 11 languages, quality-reranked| Parameter | Type | Description |
|---|---|---|
| author | string | Who is recalling (optional). Counts cross-author reuse. |
| context_files | array | Files you are working on, e.g. ["src/auth/service.ts"]. Lessons learned around these files rank higher. |
| instance_id | string | UUID of the cache instance. |
| limit | number | Max results, 1-20 (default 8). |
| query * | string | Natural language query to find relevant cached context |
| threshold | number | Similarity threshold 0-1 (default: 0.78) |
sync_file_changesAssociate recent file changes with brain knowledge. Pass a list of changed file paths (from `git diff --stat`). Returns lessons relevant to those files, and records the file changes in session history. Call this after commits so the brain tracks what changed and why.| Parameter | Type | Description |
|---|---|---|
| changed_files * | array | List of changed file paths |
| commit_msg | string | Commit message (optional) |
| git_diff_stat | string | Output of `git diff --stat` (optional) |
| instance_id | string | UUID of the cache instance. |
syndicateContribute to, and search, the global Knowledge Commons| Parameter | Type | Description |
|---|---|---|
| outcome | string | Result of the attempt (default: success) |
| scope | string | Visibility: "public" = global commons (default), "org" = private to your org only |
| severity | string | How severe the issue was (default: minor) |
| tags | array | Up to 10 keywords for better discoverability |
| topic * | string | Topic key in category:keyword format (e.g. "fix:clickhouse-ipv6", "deploy:docker-compose") |
| what_failed | string | What failed or was wrong — helps others avoid the same trap. |
| what_worked * | string | Exact approach, command, or fix that worked. File paths are stripped automatically. |
syndicate_searchSearch the GLOBAL Cachly Knowledge Commons for solutions contributed by the entire community. Returns lessons ranked by confirm_count (trust score) then recency. Use this BEFORE debugging any unknown issue — someone in the global brain likely solved it already. Example: syndicate_search(q="clickhouse localhost connection refused") → "fix: use 127.0.0.1 not localhost when IPv6 is disabled · confirmed by 47 instances"| Parameter | Type | Description |
|---|---|---|
| category | string | Filter by category prefix: "fix", "deploy", "debug", "infra", "api", "web" |
| limit | number | Max results to return (default: 20, max: 50) |
| q | string | Free-text search query (leave empty for most recent lessons) |
| scope | string | "public" = global commons (default), "org" = public + your org-private lessons |
syndicate_statsShow the health of the global Knowledge Commons: total lessons, total confirms, top categories, most-trusted lessons, growth in the last 7 days, and top contributors (anonymous scores). Use for weekly reviews or to explore what the community knows.syndicate_trendingShow the TRENDING lessons in the global Knowledge Commons — those with the fastest confirmation velocity in the last 7 days (confirm_count / age_in_days). Use this at the start of a session or weekly review to see what the community is actively validating. Lessons need at least 2 independent confirms to appear here.| Parameter | Type | Description |
|---|---|---|
| limit | number | Max results (default: 10, max: 50) |
team_assign_roleRoles (admin, reviewer, contributor, viewer), enforced once an admin is set| Parameter | Type | Description |
|---|---|---|
| assigned_by | string | Handle of the admin performing the assignment (required after governance bootstrap) |
| handle * | string | Handle or name of the team member to assign a role to |
| instance_id | string | UUID of the shared team brain instance |
| role * | string | Role to assign. admin: manage roles + all actions. reviewer: senior-review (🛡️). contributor: store + peer-review. viewer: read-only. |
team_auditAdmin-only governance trail: every role change and lesson confirmation| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the shared team brain instance |
| limit | number | Max events to show, newest first (default: 50, max: 200) |
| requester | string | Your handle — must be an admin once governance is active |
team_confirmA reviewer confirms a lesson (senior or peer); confirmed lessons rank higher in recall| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the shared team brain instance |
| level | string | Review weight — "senior" ranks higher than "peer" (default: peer) |
| note | string | Optional review note (kept in the lesson audit trail) |
| reviewer * | string | Your name or handle (the reviewer endorsing this lesson) |
| topic * | string | Topic slug of the lesson to confirm (e.g. "deploy:api") |
team_crystallizeA Team Crystal: fixes that 2 or more teammates reached independently| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the shared team brain instance |
| label | string | Optional label (e.g. "Q1 2026"). Auto-generated from date if omitted. |
| min_authors | number | Min distinct authors that must converge for a pattern to crystallize (default: 2, min: 2) |
team_expertise_mapThe team's skills matrix in one table| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the cache instance. |
| top_n | number | Max contributors to show (default: 20) |
team_grant_scopeAdd or remove a team member to/from a named group (sub-team) on a shared brain. Group-scoped lessons (stored with group="...") only surface in smart_recall for members of that group (and admins). This is team-level visibility, orthogonal to lesson-level private. Admin-gated after the role model is bootstrapped. Example: team_grant_scope(handle="alice", group="security", assigned_by="bob") — bob must be admin.| Parameter | Type | Description |
|---|---|---|
| action | string | add (default) or remove the member from the group |
| assigned_by | string | Handle of the admin performing the change (required after governance bootstrap) |
| group * | string | Group/sub-team name (e.g. "backend", "security", "platform") |
| handle * | string | Handle of the team member to add/remove |
| instance_id | string | UUID of the shared team brain instance |
team_learnShare lessons across the team with author attribution| Parameter | Type | Description |
|---|---|---|
| author * | string | Your name or handle (required for team attribution) |
| commands | array | Commands that worked |
| file_paths | array | Relevant file paths |
| instance_id | string | UUID of the shared team brain instance |
| outcome * | string | What happened |
| severity | string | Impact level |
| tags | array | Tags for categorization |
| topic * | string | Topic in category:keyword format (e.g. "deploy:api") |
| what_failed | string | What did NOT work (avoid this) |
| what_worked * | string | What worked (the solution) |
team_recallShare lessons across the team with author attribution| Parameter | Type | Description |
|---|---|---|
| author | string | Filter by author name (optional) |
| instance_id | string | UUID of the shared team brain instance |
| limit | number | Max lessons to return (default: 10) |
| topic | string | Topic or keyword to filter lessons (optional) |
team_rosterRoles (admin, reviewer, contributor, viewer), enforced once an admin is set| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the shared team brain instance |
team_scopesList team groups and their members, or the groups a specific person belongs to. Pass handle to see one person's scopes; omit it to see all groups on the instance. Use to audit who can see group-scoped lessons.| Parameter | Type | Description |
|---|---|---|
| handle | string | Optional — show only this person's group memberships |
| instance_id | string | UUID of the shared team brain instance |
team_synthesizeTeam Brain Synthesis — merge multiple contributors' lessons on the same topic into one canonical version. When 2+ developers store lessons for the same topic with different details, this proposes the best merged version. Shows: all contributions by author, what worked (consensus), what failed (union), canonical lesson to store. Use this when onboarding new team members or before documenting a process.| Parameter | Type | Description |
|---|---|---|
| instance_id | string | UUID of the shared team brain instance |
| topic * | string | Topic slug to synthesize (e.g. "deploy:api") |
team_whoamiRoles (admin, reviewer, contributor, viewer), enforced once an admin is set| Parameter | Type | Description |
|---|---|---|
| handle * | string | Your handle or name |
| instance_id | string | UUID of the shared team brain instance |
trace_dependencyCausal Chain — find all lessons that depend on a given prerequisite. "What lessons are affected if node version changes?" When a dependency changes (new version, different provider, new OS), call this to see which lessons need review. Lessons store dependencies via the depends_on field in learn_from_attempts.| Parameter | Type | Description |
|---|---|---|
| dependency * | string | Dependency to trace (e.g. "node:>=20", "docker:running", "wireguard:active") |
| instance_id | string | UUID of the cache instance. |
| mark_review | boolean | If true, marks all dependent lessons as needs_review (default: false) |
Security checks
6 checks have not been run yet.