@yugabytedb/meko-mcp 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +106 -38
- package/assets/hooks-handlers/lib/capture-cleanup-cli.js +1473 -0
- package/assets/hooks-handlers/lib/capture-notices.js +131 -14
- package/assets/hooks-handlers/lib/capture-state.js +95 -1
- package/assets/hooks-handlers/lib/capture-status-cli.js +6 -2
- package/assets/hooks-handlers/lib/capture.js +1237 -137
- package/assets/hooks-handlers/lib/checkpoint-timer.js +51 -10
- package/assets/hooks-handlers/lib/journal-bridge.js +218 -0
- package/assets/hooks-handlers/lib/kiro-handler.js +26 -4
- package/assets/hooks-handlers/lib/opencode-handler.js +620 -0
- package/assets/hooks-handlers/lib/opencode-normalizer.js +145 -0
- package/assets/hooks-handlers/lib/terminal-handoff.js +10 -1
- package/assets/opencode-plugin/meko.js +213 -0
- package/assets/scripts/meko-statusline.sh +85 -18
- package/assets/skills/meko-mcp-tools/SKILL.md +57 -14
- package/assets/skills/meko-mcp-tools/references/_sections.md +2 -2
- package/assets/skills/meko-mcp-tools/references/tools-agent-id-conventions.md +15 -7
- package/assets/skills/meko-mcp-tools/references/tools-cookbook.md +86 -14
- package/assets/skills/meko-mcp-tools/references/tools-datapack-workflow.md +1 -1
- package/assets/skills/meko-mcp-tools/references/tools-known-limitations.md +29 -6
- package/assets/skills/meko-mcp-tools/references/tools-memory-vs-conversation.md +8 -4
- package/assets/skills/meko-mcp-tools/references/tools-overview.md +32 -22
- package/assets/skills/meko-mcp-tools/references/tools-rag-workflow.md +14 -8
- package/assets/skills/meko-mcp-tools/references/tools-troubleshooting.md +45 -1
- package/assets/skills/meko-mcp-tools/references/tools-user-id-conventions.md +6 -39
- package/assets/skills/meko-mcp-tools-desktop/SKILL.md +54 -18
- package/assets/skills/meko-mcp-tools-desktop/desktop/README.md +1 -1
- package/assets/skills/meko-mcp-tools-desktop/references/_sections.md +1 -1
- package/assets/skills/meko-mcp-tools-desktop/references/tools-agent-id-conventions.md +8 -6
- package/assets/skills/meko-mcp-tools-desktop/references/tools-cookbook.md +95 -33
- package/assets/skills/meko-mcp-tools-desktop/references/tools-known-limitations.md +22 -5
- package/assets/skills/meko-mcp-tools-desktop/references/tools-memory-vs-conversation.md +14 -10
- package/assets/skills/meko-mcp-tools-desktop/references/tools-overview.md +35 -25
- package/assets/skills/meko-mcp-tools-desktop/references/tools-rag-workflow.md +14 -8
- package/assets/skills/meko-mcp-tools-desktop/references/tools-troubleshooting.md +67 -1
- package/assets/skills/meko-select-datapack-desktop/SKILL.md +4 -4
- package/assets/skills/meko-select-datapack-desktop/references/cookbook.md +5 -5
- package/assets/skills/meko-select-datapack-desktop/references/role-display-future.md +7 -5
- package/assets/skills/meko-select-datapack-desktop/references/troubleshooting.md +4 -4
- package/bin/create-meko-setup.mjs +70 -7
- package/lib/capture-cleanup.mjs +63 -0
- package/lib/clients/claude-code.mjs +1 -0
- package/lib/clients/codex.mjs +80 -35
- package/lib/clients/common.mjs +7 -0
- package/lib/clients/index.mjs +2 -0
- package/lib/clients/kiro.mjs +5 -5
- package/lib/clients/opencode.mjs +532 -0
- package/lib/config.mjs +68 -1
- package/lib/installer.mjs +18 -2
- package/lib/migrate/adapters/claude-code.mjs +11 -2
- package/lib/migrate/adapters/codex.mjs +9 -2
- package/lib/migrate/adapters/memory-md.mjs +27 -8
- package/lib/migrate/adapters/opencode.mjs +148 -0
- package/lib/migrate/claude-parser.mjs +153 -9
- package/lib/migrate/id.mjs +195 -13
- package/lib/migrate/mcp-client.mjs +25 -1
- package/lib/migrate/opencode-normalizer.mjs +132 -0
- package/lib/migrate/orchestrator.mjs +293 -77
- package/lib/migrate/progress.mjs +239 -5
- package/lib/migrate/registry.mjs +72 -0
- package/lib/migrate.mjs +96 -8
- package/package.json +1 -1
- package/scripts/bundle-assets.mjs +4 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Complete Tool Catalog and Decision Tree
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**25 Meko data tools covered by this skill.** These are the tools available in production, grouped as: Retrieval (1), Memory (8), Conversation (6), Knowledge Base (2), Datapack (5), Artifacts (2), Observability (1). Combined Meko + AMP endpoints may expose additional infrastructure tools; those are outside this skill's scope.
|
|
4
4
|
|
|
5
5
|
## Quick health check before using tools
|
|
6
6
|
|
|
@@ -13,10 +13,11 @@ Before starting a session, verify that the Meko MCP tools are working:
|
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
User wants to...
|
|
16
|
+
├── Ask "what do you know about X?" --------> context_search (read; memory + KB + past conversations in one call)
|
|
16
17
|
├── Search personal context? ---------------> memory_search (read)
|
|
17
18
|
├── Search shared datapack knowledge? ------> knowledgebase_search (read)
|
|
18
19
|
├── Add documents to a knowledge base? -----> point user at Meko UI: Datapack → Actions → Add Knowledge
|
|
19
|
-
|
|
20
|
+
├── Delete ONE knowledge-base file? --------> knowledgebase_delete_document (destructive — confirm with the user first)
|
|
20
21
|
├── Store or recall information?
|
|
21
22
|
│ ├── Store a fact/preference/entity? -----------> memory_add (write)
|
|
22
23
|
│ ├── Store a full conversation (multi-turn)? ---> conversation_create + conversation_add_message (write)
|
|
@@ -30,47 +31,56 @@ User wants to...
|
|
|
30
31
|
└── CRUD datapack? --------------------> datapack_create/list/describe/update/delete
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
Agent /
|
|
34
|
+
Agent lifecycle and KB **ingestion / index lifecycle** (adding sources, uploads, re-indexing) are managed outside the MCP surface — typically in the Meko control-plane UI. Deleting a single KB file IS exposed here (`knowledgebase_delete_document`).
|
|
34
35
|
|
|
35
|
-
##
|
|
36
|
+
## Retrieval Tools (1)
|
|
36
37
|
|
|
37
38
|
| Tool | Purpose |
|
|
38
39
|
|------|---------|
|
|
39
|
-
| `
|
|
40
|
+
| `context_search(query, conversation_id, agent_id=None, datapack_id=None, limit=10, force_source="auto")` | Default first call for open-ended recall. Queries memory, the knowledge base, and the conversation-history cache in parallel and returns each source in its own bucket: `{"results": {"memory": [...], "knowledge_base": [...], "conversation": {"hits": [...], "thread": [...]}}, "token_savings": {...}}`. A bucket is `null` only when that source wasn't queried: `force_source` excluded it, or the server couldn't build a query vector for it. An empty bucket is ambiguous: either that source found nothing relevant, or it failed. `context_search` turns a failed source into an empty list and records the error only in the trace. Before you tell the user nothing is stored about X, confirm with `memory_search` or `knowledgebase_search`, which return errors. `force_source` is `"auto"` (all three), `"memory"`, `"knowledge_base"`, or `"conversation"`; any other value returns `invalid_force_source`. `limit` bounds the memory and KB buckets only; the conversation bucket returns up to 10 hits plus a thread of whole turns. The conversation bucket is datapack-wide. It returns embedded turns from every user and agent on the datapack, and each hit carries its author's `user_id`. Don't present a hit as this user's own history. |
|
|
41
|
+
|
|
42
|
+
## Knowledge Base Tools (2)
|
|
43
|
+
|
|
44
|
+
| Tool | Purpose |
|
|
45
|
+
|------|---------|
|
|
46
|
+
| `knowledgebase_search(query, conversation_id, datapack_id, agent_id=None, limit=10)` | Hybrid (semantic + keyword) search across KB chunks and promoted memories. `datapack_id` is REQUIRED (no default). Each hit has `id`, `chunk_text`, `document_id`, `metadata_filters`, `distance`, and `match_type` (`semantic`, `keyword`, or `hybrid`). |
|
|
47
|
+
| `knowledgebase_delete_document(document_id, conversation_id, datapack_id="")` | Permanently delete ONE KB file (chunks + metadata; stored-file delete is best-effort — check `s3_deleted`). Irreversible: confirm with the user first. `document_id` comes from `knowledgebase_search` hits (no filename in hits — echo the id + chunk text). Owner/maintainer/uploader only (status 403 otherwise); status 409 while still indexing — wait and retry. |
|
|
40
48
|
|
|
41
49
|
## Memory Tools (8)
|
|
42
50
|
|
|
43
51
|
| Tool | Purpose |
|
|
44
52
|
|------|---------|
|
|
45
|
-
| `memory_add(text,
|
|
46
|
-
| `memory_search(query,
|
|
47
|
-
| `memory_get_by_id(memory_id,
|
|
48
|
-
| `memory_get_all(
|
|
49
|
-
| `memory_update(memory_id, text,
|
|
50
|
-
| `memory_delete_by_id(memory_id,
|
|
51
|
-
| `memory_delete_all(
|
|
53
|
+
| `memory_add(text, conversation_id, agent_id=None, run_id=None, metadata=None, messages=None, datapack_id=None)` | Store fact/preference/entity as long-term memory |
|
|
54
|
+
| `memory_search(query, conversation_id, agent_id=None, limit=10, datapack_id=None, run_id=None)` | Hybrid search across memories (semantic + keyword + entity boost). Drops rows below a server-configured similarity floor (default 0.2), so a weak query can return an empty list. `conversation_id` is required but only nests the trace. It must be a 32-hex id: `""` currently fails (MEKO-707), so pass a freshly generated one if you have no conversation yet. `run_id` filters to one conversation's memories. |
|
|
55
|
+
| `memory_get_by_id(memory_id, conversation_id, agent_id=None, datapack_id=None)` | Direct pgvector row lookup by UUID. Preferred over `memory_search` for exact-id verification. Returns `not_found` for a missing id and for an id that belongs to another account. |
|
|
56
|
+
| `memory_get_all(conversation_id, agent_id=None, run_id=None, datapack_id=None, promoted=False)` | Recent window (about 20 rows) of the user's memories across every agent, plus the true `total`. Not a complete listing. `promoted=True` returns the recent window of promoted memories instead. `run_id` is ignored. |
|
|
57
|
+
| `memory_update(memory_id, text, conversation_id, agent_id=None, datapack_id=None)` | Overwrite memory text. Returns `memory_is_promoted` for a promoted memory (edit those in the Cloud UI Learnings tab). |
|
|
58
|
+
| `memory_delete_by_id(memory_id, conversation_id, agent_id=None, datapack_id=None)` | Delete a single memory. Returns `memory_is_promoted` for a promoted memory. |
|
|
59
|
+
| `memory_delete_all(conversation_id, agent_id=None, run_id=None, datapack_id=None)` | Delete all memories in the **passed `agent_id`'s bucket** (destructive). Unlike reads, this is agent-scoped: omitting `agent_id` deletes only the `meko_agent` bucket. `run_id` narrows it to one conversation; a malformed value returns `invalid_run_id`. |
|
|
52
60
|
| `memory_promote(conversation_id, memory_ids, agent_id=None, datapack_id=None)` | Promote private memories into the datapack's shared knowledge base (moves them out of mem0, then evicts from mem0 — one-way). Owners/maintainers only; viewers/contributors get 403. |
|
|
53
61
|
|
|
54
62
|
## Conversation Tools (6)
|
|
55
63
|
|
|
56
64
|
| Tool | Purpose |
|
|
57
65
|
|------|---------|
|
|
58
|
-
| `conversation_create(agent_id, run_id=None, title=None, metadata=None, session_id="")` | Create conversation container (Langfuse session) |
|
|
59
|
-
| `conversation_add_message(conversation_id,
|
|
60
|
-
| `conversation_get(conversation_id, agent_id, include_messages=False, limit=100, offset=0)` | Retrieve conversation, optionally with messages |
|
|
66
|
+
| `conversation_create(agent_id=None, run_id=None, title=None, metadata=None, session_id="", datapack_id=None)` | Create conversation container (Langfuse session) |
|
|
67
|
+
| `conversation_add_message(conversation_id, input, output, agent_id=None, reasoning=None, metadata=None, seed=None, datapack_id=None, plan=None)` | Add a message turn (Langfuse trace). `output` is required. The response may include `extracted_memories` and, when the turn wasn't embedded for conversation search, `conversation_search_skipped` (`quota_exceeded` or `datapack_opted_out`). |
|
|
68
|
+
| `conversation_get(conversation_id, agent_id=None, include_messages=False, limit=100, offset=0, datapack_id=None)` | Retrieve conversation, optionally with messages |
|
|
61
69
|
| `conversation_list(agent_id=None, limit=20, offset=0, conversation_id="", datapack_id=None)` | List the user's conversations within a datapack (`agent_id` does not filter — trace attribution only). `datapack_id` (UUID) is optional — defaults to the pinned/tenant datapack; use `datapack_list` to look it up. `conversation_id` optional (omit for browse). |
|
|
62
|
-
| `conversation_update(conversation_id, agent_id, title=None, metadata=None)` | Update title or metadata |
|
|
63
|
-
| `conversation_delete(conversation_id, agent_id)` | Delete entire conversation (destructive) |
|
|
70
|
+
| `conversation_update(conversation_id, agent_id=None, title=None, metadata=None, datapack_id=None)` | Update title or metadata |
|
|
71
|
+
| `conversation_delete(conversation_id, agent_id=None, datapack_id=None)` | Delete entire conversation (destructive) |
|
|
64
72
|
|
|
65
73
|
## Datapack Management Tools (5)
|
|
66
74
|
|
|
67
75
|
| Tool | Purpose |
|
|
68
76
|
|------|---------|
|
|
69
|
-
| `datapack_create(name)` | Create new datapack |
|
|
77
|
+
| `datapack_create(name, conversation_id)` | Create new datapack |
|
|
70
78
|
| `datapack_list(conversation_id, datapack_id=None)` | List all datapacks. `conversation_id` is required for trace nesting; omit `datapack_id` to use the endpoint default. |
|
|
71
|
-
| `datapack_describe(datapack_id, include_status=False)` | Describe datapack by UUID |
|
|
72
|
-
| `datapack_update(datapack_id, name=None, description=None, conversation_search_opt_out=None)` | Rename a datapack, update its description, and/or opt out of (or back into) conversation-search caching. Pass at least one field. Opt-out is owner/maintainer only. |
|
|
73
|
-
| `datapack_delete(datapack_id)` | Delete datapack by UUID (irreversible) |
|
|
79
|
+
| `datapack_describe(conversation_id, datapack_id="", include_status=False)` | Describe a datapack by UUID (default datapack if omitted). Returns `memory_count`, `collective_memory_count` (promoted), `learnings_count` (awaiting a promotion decision), `knowledge_base_file_count`, `knowledge_chunk_count`, and `shared_knowledge_count`. `knowledge_base_file_count` and `shared_knowledge_count` are `null` when the status endpoint is unreachable; `knowledge_count` is a deprecated alias of `knowledge_chunk_count`. |
|
|
80
|
+
| `datapack_update(datapack_id, conversation_id, name=None, description=None, conversation_search_opt_out=None)` | Rename a datapack, update its description, and/or opt out of (or back into) conversation-search caching. Pass at least one field. Opt-out is owner/maintainer only. |
|
|
81
|
+
| `datapack_delete(datapack_id, conversation_id)` | Delete datapack by UUID (irreversible) |
|
|
82
|
+
|
|
83
|
+
All five datapack tools reject an empty `conversation_id` with `conversation_id_required`.
|
|
74
84
|
|
|
75
85
|
## Artifact Tools (2)
|
|
76
86
|
|
|
@@ -104,4 +114,4 @@ For knowledge-base content on Cloud, the canonical path is **UI upload**: Datapa
|
|
|
104
114
|
|
|
105
115
|
## Common Parameter Patterns
|
|
106
116
|
|
|
107
|
-
Memory and KB tools accept optional `datapack_id` to target a specific datapack. `agent_id` attributes writes
|
|
117
|
+
Memory and KB tools accept optional `datapack_id` to target a specific datapack. A `datapack_id` your account can't access returns `datapack_access_denied`. `agent_id` attributes writes. Conversations are agent-owned: `conversation_get`, `conversation_add_message`, `conversation_update`, and `conversation_delete` return `agent_id_mismatch` for any value other than the creating agent's. `agent_id` does **not** filter memory reads (`memory_search`/`memory_get_all`) or `conversation_list`, which return all your agents' rows for the user. `memory_delete_all` is the exception on the memory side: it deletes only the passed `agent_id`'s bucket. See `tools-agent-id-conventions.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Knowledge Base / RAG workflow
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
MCP exposes two KB tools: `knowledgebase_search` (retrieval) and
|
|
4
|
+
`knowledgebase_delete_document` (remove ONE uploaded file). Index
|
|
4
5
|
creation and ingestion happen out of band — through the **Meko UI**
|
|
5
6
|
(`cloud.mekodata.ai`).
|
|
6
7
|
|
|
@@ -8,9 +9,10 @@ creation and ingestion happen out of band — through the **Meko UI**
|
|
|
8
9
|
|
|
9
10
|
| Situation | Use this | Why |
|
|
10
11
|
|---|---|---|
|
|
11
|
-
| Search an existing KB | `knowledgebase_search` |
|
|
12
|
+
| Search an existing KB | `knowledgebase_search` | Retrieval over the indexed chunks |
|
|
12
13
|
| Add documents to a KB | **Meko UI** — Datapack → Actions → **Add Knowledge** | File-upload dialog (PDF/TXT/MD/JSON/MP4, 5 MB each, 10/batch). No MCP equivalent |
|
|
13
|
-
|
|
|
14
|
+
| Delete ONE uploaded file | `knowledgebase_delete_document` | Destructive; `document_id` from search hits; confirm with the user first |
|
|
15
|
+
| Anything else (list / rename / re-index / source lifecycle) | **UI** | No MCP tools for the rest of KB lifecycle |
|
|
14
16
|
|
|
15
17
|
## knowledgebase_search — the one you'll actually call
|
|
16
18
|
|
|
@@ -23,7 +25,7 @@ knowledgebase_search(
|
|
|
23
25
|
limit=10)
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
Required: `query`, `
|
|
28
|
+
Required: `query`, `conversation_id`, `datapack_id`.
|
|
27
29
|
Unlike the memory tools, `datapack_id` has no default here — you must
|
|
28
30
|
pass it explicitly. `agent_id` is **ignored for filtering** on this
|
|
29
31
|
tool (KB results are team-shared on the datapack), but you still pass
|
|
@@ -37,10 +39,12 @@ Populated KB:
|
|
|
37
39
|
{
|
|
38
40
|
"results": [
|
|
39
41
|
{
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"id": "<chunk id>",
|
|
43
|
+
"chunk_text": "<chunk text>",
|
|
44
|
+
"document_id": "<KB document id; pass to knowledgebase_delete_document>",
|
|
45
|
+
"metadata_filters": {},
|
|
46
|
+
"distance": 0.31,
|
|
47
|
+
"match_type": "semantic" | "keyword" | "hybrid",
|
|
44
48
|
...
|
|
45
49
|
},
|
|
46
50
|
...
|
|
@@ -49,6 +53,8 @@ Populated KB:
|
|
|
49
53
|
}
|
|
50
54
|
```
|
|
51
55
|
|
|
56
|
+
Lower `distance` is closer. Promoted memories appear as hits whose `metadata_filters.source` is `"memory"`. Hits carry no filename, so show the user the `document_id` and chunk text when they need to identify a file.
|
|
57
|
+
|
|
52
58
|
Empty or nonexistent KB: `{"results": [], "count": 0}` (no error,
|
|
53
59
|
just an empty array).
|
|
54
60
|
|
|
@@ -7,7 +7,7 @@ These patterns are extracted from real agent sessions. Follow them to avoid wast
|
|
|
7
7
|
1. **Never retry the identical failed call more than once.** If it fails twice with the same error, it's not transient — diagnose the cause.
|
|
8
8
|
2. **Distinguish transient vs persistent failures.** "Connection already closed" is transient (retry once). "Permission denied" is persistent (stop, don't retry).
|
|
9
9
|
3. **Don't guess parameters sequentially.** If a tool fails with one parameter format, don't try 4 variations. Check this skill's docs for the correct format first.
|
|
10
|
-
4. **Use your session's `agent_id` consistently on writes** (the SessionStart-injected value), and on `conversation_get`
|
|
10
|
+
4. **Use your session's `agent_id` consistently on writes** (the SessionStart-injected value), and on every conversation call (`conversation_get`, `conversation_add_message`, `conversation_update`, `conversation_delete`). Conversations are owned by the creating `agent_id`; a wrong value returns `agent_id_mismatch`. Memory reads and `conversation_list` are unaffected by `agent_id`. Don't switch write forms mid-session.
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -26,6 +26,22 @@ These patterns are extracted from real agent sessions. Follow them to avoid wast
|
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
29
|
+
## Connection errors: `[Errno 111] Connection refused`
|
|
30
|
+
|
|
31
|
+
**Affects:** any tool, intermittently. Reports show `memory_add`, `conversation_create`, `memory_search`, and `context_search` failing this way while identical calls succeed minutes later.
|
|
32
|
+
|
|
33
|
+
**What it means:** the request reached no listening server, usually a server instance that was restarting or scaling. It is not a timeout and not a rejected argument.
|
|
34
|
+
|
|
35
|
+
**What to do:** wait a few seconds and retry once. Retry `conversation_add_message` only with a `seed`, and never retry `conversation_create` (see the table below). If the retry also fails, report the failure. For a write, tell the user it was not saved; don't let a failed write pass silently.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## `memory_search` hangs or times out
|
|
40
|
+
|
|
41
|
+
`memory_search` can stall for minutes under backend load while other tools respond. Don't raise the client timeout; that only makes the stall longer. Retry once. If it stalls again, report that the search failed, and if the user needs an answer now, try `context_search` or `memory_get_by_id` for a known id. `memory_get_all` only returns a recent window, so it can't replace a search.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
29
45
|
## An error payload is a FAILED search, never an empty one
|
|
30
46
|
|
|
31
47
|
Quota errors, rate-limit errors, and tool refusals come back as an error object with **no `results` key** — reading `response.get("results", [])` first silently converts "you were refused" into "the store is empty." Follow SKILL.md operating contract 1: report it as "search failed: `<error code>` — findings unknown," never as "no results."
|
|
@@ -47,6 +63,34 @@ Bursts of requests on one token return:
|
|
|
47
63
|
|
|
48
64
|
---
|
|
49
65
|
|
|
66
|
+
## Quota errors that look like auth errors
|
|
67
|
+
|
|
68
|
+
`free_tier_limit_reached` can arrive with HTTP 403, and automatic capture that hits a cap shows up as capture failing with 403. Read the error code, not the status. A quota error means the account reached a lifetime cap (see `tools-known-limitations.md`). Don't rotate keys or reinstall. Tell the user which tool hit the cap and that upgrading the plan lifts it.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Datapack and ownership errors
|
|
73
|
+
|
|
74
|
+
| Error | Meaning | What to do |
|
|
75
|
+
|---|---|---|
|
|
76
|
+
| `datapack_access_denied` | The `datapack_id` isn't a UUID, or it isn't owned by or shared with your account. The access check also fails closed on a transient server database error. | Retry once. If it repeats, stop; don't switch to another datapack. If the id came from a pin, ask the user to re-pin with the select-datapack skill. |
|
|
77
|
+
| `datapack_id_required` | The call couldn't resolve a datapack. Conversation reads and writes (including `conversation_list`), `datapack_describe`, and `knowledgebase_delete_document` return it. | Pass the pinned `datapack_id`. Don't drop the parameter to make the call pass. |
|
|
78
|
+
| `not_found` from `memory_get_by_id`, `memory_update`, or `memory_delete_by_id` | The memory doesn't exist **or** belongs to another account. The server returns the same error for both on purpose. | Check the id came from a search in this datapack. |
|
|
79
|
+
| `memory_is_promoted` | The memory was promoted to shared knowledge and is read-only through MCP. | Point the user at the Cloud UI Learnings tab. |
|
|
80
|
+
| `invalid_run_id` | `memory_delete_all` got a `run_id` that isn't a conversation id. | Pass the conversation UUID, or omit `run_id`. |
|
|
81
|
+
| `embedder_error` from `knowledgebase_search` | The server couldn't resolve the embedding setup for this datapack's index. | Report it; retrying won't help. |
|
|
82
|
+
| `invalid_force_source` from `context_search` | `force_source` isn't `auto`, `memory`, `knowledge_base`, or `conversation`. | Omit `force_source`. |
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Conversation writes fail right after `conversation_create`
|
|
87
|
+
|
|
88
|
+
`conversation_add_message` has intermittently returned `not_found`, or `agent_id_mismatch` naming agent `'None'`, seconds after `conversation_create` returned that id. It shows up most with several parallel subagents writing to one conversation. Retry once with the same `seed` after a few seconds. If it still fails, don't create a new conversation for the same work: save the durable findings with `memory_add` and tell the user the transcript is incomplete.
|
|
89
|
+
|
|
90
|
+
On a long conversation that has worked before, `not_found` can instead mean the trace grew too large to load. See `tools-known-limitations.md`.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
50
94
|
## agent_id errors
|
|
51
95
|
|
|
52
96
|
On the Cloud multi-tenant schema, `agent_id` is a TEXT column value — not a PostgreSQL identifier — so arbitrary strings are accepted.
|
|
@@ -4,7 +4,7 @@ On Cloud Meko, every write and every personal read carries a `user_id` that iden
|
|
|
4
4
|
|
|
5
5
|
## The default behavior: automatic user_id from cognito
|
|
6
6
|
|
|
7
|
-
On Cloud, the server resolves your `user_id`
|
|
7
|
+
On Cloud, the server resolves your `user_id` from the cognito account attached to your MCP session (the API key or OAuth token).
|
|
8
8
|
|
|
9
9
|
This is the common case for Claude Code / Claude Desktop / Cursor:
|
|
10
10
|
|
|
@@ -18,43 +18,11 @@ memory_add(
|
|
|
18
18
|
|
|
19
19
|
A second person signing into the same Cloud datapack with their own account gets their own `user_id` automatically — they can never read your un-promoted memories via MCP, and you can never read theirs.
|
|
20
20
|
|
|
21
|
-
##
|
|
21
|
+
## No tool takes a user_id argument
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
`user_id` always comes from the credentials on your MCP session. No Meko MCP tool accepts a `user_id` (or `app_id`) argument, and the server rejects unknown arguments, so adding one makes the call fail.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
# Serving Alice
|
|
27
|
-
memory_add(
|
|
28
|
-
text="Alice prefers email communication. Has Pro plan.",
|
|
29
|
-
agent_id="support-bot",
|
|
30
|
-
user_id="alice_123",
|
|
31
|
-
conversation_id="<conv>")
|
|
32
|
-
|
|
33
|
-
# Serving Bob — completely separate partition, same cognito account
|
|
34
|
-
memory_add(
|
|
35
|
-
text="Bob prefers Slack. On Enterprise plan.",
|
|
36
|
-
agent_id="support-bot",
|
|
37
|
-
user_id="bob_456",
|
|
38
|
-
conversation_id="<conv>")
|
|
39
|
-
|
|
40
|
-
# Search only returns Alice's memories
|
|
41
|
-
memory_search(
|
|
42
|
-
query="communication preference",
|
|
43
|
-
agent_id="support-bot",
|
|
44
|
-
user_id="alice_123",
|
|
45
|
-
conversation_id="<conv>")
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
This is rarely relevant for Claude Code / Desktop / Cursor — those are single-human clients, and the automatic cognito user_id is the right behavior. It matters for autonomous multi-user agents built on top of the Meko API.
|
|
49
|
-
|
|
50
|
-
## Gotcha — mixing scoped and unscoped calls
|
|
51
|
-
|
|
52
|
-
If you pass `user_id="alice"` on writes but omit it on searches, the search falls back to the auto cognito user_id and **will not find** Alice's memories. They're in a different partition. Pick a convention for a given agent and stick to it:
|
|
53
|
-
|
|
54
|
-
- Claude Code / Desktop / Cursor: omit `user_id`, rely on the auto cognito value.
|
|
55
|
-
- Multi-user autonomous agents: pass `user_id` consistently on every write and read.
|
|
56
|
-
|
|
57
|
-
Mixing creates invisible data.
|
|
25
|
+
An agent that serves several end users behind one Meko account can't partition memory per end user with `user_id`. `agent_id` doesn't work either: it attributes rows but doesn't filter reads. Give each end user or tenant that must not see the others' content a separate datapack, and pass that `datapack_id` on every call.
|
|
58
26
|
|
|
59
27
|
## How user_id relates to agent_id and the Shared Knowledge split
|
|
60
28
|
|
|
@@ -62,7 +30,7 @@ Mixing creates invisible data.
|
|
|
62
30
|
|---|---|---|
|
|
63
31
|
| Personal memories (`memory_add`, `memory_search`, `memory_get_all`) | `(datapack_id, user_id)` | Enforced on every read. `agent_id` is not applied — one user sees all their own memories across every agent, but cannot see another user's un-promoted memories. |
|
|
64
32
|
| Conversation listing (`conversation_list`) | `(datapack_id, user_id)` | Enforced. `agent_id` is not applied — you see all your own conversations across every agent. |
|
|
65
|
-
| Conversation fetch (`conversation_get`) | `(datapack_id, user_id, agent_id)` | Enforced. Agent-owned: pass the creating `agent_id` or you get `agent_id_mismatch`. Cross-user reads require promotion. |
|
|
33
|
+
| Conversation fetch and writes (`conversation_get`, `conversation_add_message`, `conversation_update`, `conversation_delete`) | `(datapack_id, user_id, agent_id)` | Enforced. Agent-owned: pass the creating `agent_id` or you get `agent_id_mismatch`. Cross-user reads require promotion. |
|
|
66
34
|
| Team Shared Knowledge (`knowledgebase_search`) | `(datapack_id)` only | **Not used** — `user_id` is stripped when a memory is promoted to Knowledge. All team members on the datapack see the same Shared Knowledge. |
|
|
67
35
|
|
|
68
36
|
Personal content crosses the `user_id` boundary through `memory_promote` or the Cloud UI's "Promote to Knowledge" action. The MCP path requires exact memory UUIDs, explicit user confirmation, and an owner/maintainer role; it moves the records into team-visible Shared Knowledge and evicts the private copies.
|
|
@@ -72,9 +40,8 @@ Personal content crosses the `user_id` boundary through `memory_promote` or the
|
|
|
72
40
|
| Parameter | Identifies | Typical value | Required? |
|
|
73
41
|
|---|---|---|---|
|
|
74
42
|
| `datapack_id` | Which datapack's DB/Langfuse project | `"c038ba7b-..."` (UUID) | Optional on most tools (default datapack if omitted). **Required** on `knowledgebase_search`. |
|
|
75
|
-
| `user_id` | The cognito account
|
|
43
|
+
| `user_id` | The cognito account | Resolved from your credentials | Not a tool argument |
|
|
76
44
|
| `agent_id` | Which agent wrote / is reading | `"claude_code:<repo>"`, `"claude_desktop"`, `"cursor:<repo>"`, `"meko_agent"` (common bucket) | Optional (empty/missing → `meko_agent` server-side); pass the per-session value verbatim for project-scoped reads/writes. Ignored on `knowledgebase_search`. |
|
|
77
|
-
| `app_id` | Optional application/product sub-scope | `"second_brain"`, `"helpdesk"` | Optional |
|
|
78
45
|
| `run_id` | A conversation id, used as a read/delete filter against the row's `meko_conversation_id` | `"374c70f3b95745ac92724d98475cc2d6"` | Optional. On `memory_add` it is trace metadata only and does not scope the write — see `tools-agent-id-conventions.md`. |
|
|
79
46
|
|
|
80
47
|
See `tools-agent-id-conventions.md` for the full `agent_id` model.
|
|
@@ -17,13 +17,13 @@ description: >-
|
|
|
17
17
|
license: MIT
|
|
18
18
|
metadata:
|
|
19
19
|
author: Meko
|
|
20
|
-
version: "2.
|
|
20
|
+
version: "2.9.0"
|
|
21
21
|
tags: mcp, yugabytedb, tools, datapack, memory, conversation, rag, meko, desktop
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
# Meko MCP Tools — Agent Behavioral Guide (Desktop)
|
|
25
25
|
|
|
26
|
-
Meko is the user's **memory, knowledge, observability, and audit layer** across chats — a system of record they (and their team/org) connected on purpose. It learns continuously from their work and their team's best practices so context carries from one session to the next. This skill teaches you how to use Meko's
|
|
26
|
+
Meko is the user's **memory, knowledge, observability, and audit layer** across chats — a system of record they (and their team/org) connected on purpose. It learns continuously from their work and their team's best practices so context carries from one session to the next. This skill teaches you how to use Meko's 25 MCP tools available in production. Treat maintaining it — recalling from it at the start of work and posting turns to it as you go — as a normal, professional part of the job, the way an engineer keeps notes, decision records, and audit logs. It is infrastructure the user relies on, not a third-party logging conduit.
|
|
27
27
|
|
|
28
28
|
**Read this first.** The Meko server extracts durable memories automatically from the conversation turns you post to it — the extraction runs *inside* `conversation_add_message`. Claude Desktop has no capture hooks, so **capturing substantive turns via `conversation_add_message` is a core part of using this skill.** Do that and memory takes care of itself: facts the user states get extracted and stored without a separate `memory_add`. Explicit `memory_add` is reserved for a few narrow cases (below). See "Per-turn conversation capture" — it's the heart of this skill.
|
|
29
29
|
|
|
@@ -40,11 +40,13 @@ On the first user turn in any session, before answering substantive questions:
|
|
|
40
40
|
1. **Resolve the active datapack pin first — before creating the conversation.** A conversation cannot move between datapacks once created, so you must know the pinned datapack *before* `conversation_create`, or capture lands in the wrong workspace. Call:
|
|
41
41
|
```
|
|
42
42
|
memory_search(query="meko_active_datapack",
|
|
43
|
-
agent_id="claude_desktop",
|
|
43
|
+
agent_id="claude_desktop",
|
|
44
|
+
conversation_id="<fresh 32-hex id>", limit=1)
|
|
44
45
|
```
|
|
46
|
+
`<fresh 32-hex id>` is a newly generated 32-character lowercase hex string, such as a UUID with the hyphens removed. You don't have a conversation yet, and `""` fails on production `memory_search` (MEKO-707).
|
|
45
47
|
If a pin row comes back, extract the UUID after `meko_active_datapack=` — call it `<PIN>` — and pass `datapack_id="<PIN>"` to **every** Meko call for the rest of the session (`conversation_create`, `memory_search`, `conversation_add_message`, etc.). If no pin is found, omit `datapack_id` everywhere and let the server resolve the default. (The `meko-select-datapack-desktop` skill is what writes this pin; you honor it here whether or not that skill ran this session.)
|
|
46
48
|
2. **Call `conversation_create`** (`agent_id="claude_desktop"`, and `datapack_id="<PIN>"` if a pin was found) once and keep the returned `conversation_id` for the whole session. You need it to post turns (per-turn capture, above) and for memory calls.
|
|
47
|
-
3. **Call `
|
|
49
|
+
3. **Call `context_search`** with `agent_id="claude_desktop"`, the `conversation_id` from step 2, `datapack_id="<PIN>"` if pinned, and a query derived from the user's topic. One call returns separate memory, knowledge-base, and past-conversation buckets. The memory bucket covers this user's memories across every agent, including the `meko_agent` common bucket; `agent_id` doesn't filter it.
|
|
48
50
|
4. Incorporate the recalled facts into your reply. Don't re-ask things you've been told before.
|
|
49
51
|
|
|
50
52
|
Recall and capture are routine parts of answering — the user has set Meko up as their memory layer, so you don't need a per-call permission prompt for them. Do briefly say what you did ("checked your Meko memory", "saved that to your Meko memory") — a short disclosure, not a silent background action and not a big announcement.
|
|
@@ -57,7 +59,7 @@ Recall and capture are routine parts of answering — the user has set Meko up a
|
|
|
57
59
|
|
|
58
60
|
**Read scoping:**
|
|
59
61
|
- `memory_search` / `memory_get_all` — scoped to `(datapack_id, user_id)`. `agent_id` does not filter results, so one call returns this user's memories across every agent.
|
|
60
|
-
- `conversation_list` — also returns this user's conversations across agents. `conversation_get`
|
|
62
|
+
- `conversation_list` — also returns this user's conversations across agents. `conversation_get`, `conversation_add_message`, `conversation_update`, and `conversation_delete` are agent-owned and require the exact `agent_id` that created the conversation.
|
|
61
63
|
- `knowledgebase_search` — scoped to `datapack_id` only. `agent_id` on the request is ignored. Returns the team's Shared Knowledge — uploaded documents plus promoted memories.
|
|
62
64
|
|
|
63
65
|
Some pre-existing rows use the older constant `agent_id="agent"` or ad-hoc shapes (e.g. `claude-desktop` with a hyphen). They remain readable; the stored value is still shown as provenance in the UI. See `tools-agent-id-conventions.md` for the full model.
|
|
@@ -76,7 +78,7 @@ conversation_add_message(conversation_id="<id>",
|
|
|
76
78
|
reasoning="<why you answered as you did; tool calls if any>")
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
Post the turn verbatim — do not summarize.
|
|
81
|
+
Post the turn verbatim — do not summarize.
|
|
80
82
|
|
|
81
83
|
The failure mode to avoid: answering the user and moving on **without posting the turn**. If you don't post it, nothing is captured and nothing is extracted — a turn later there's no record the exchange happened. Treat `conversation_add_message` as part of completing a substantive turn: once you've written your reply, post the turn (and note you did) before the turn is done. This is transparent capture into the user's own memory store, so there's no reason to skip it — but if the content is sensitive or the user asked you not to store it, skip and say so.
|
|
82
84
|
|
|
@@ -118,10 +120,10 @@ Meko turns your volatile context window into persistent, shareable knowledge:
|
|
|
118
120
|
**Meko is the memory store — never write memories to local files, markdown notes, or any file-based memory system.** Meko's memory is persistent across all agents, sessions, and team members; local files are not.
|
|
119
121
|
|
|
120
122
|
- To remember what the user says → **post the turn with `conversation_add_message`** (the server extracts memories from it), NOT write to a local file.
|
|
121
|
-
- To recall → call `
|
|
123
|
+
- To recall → call `context_search` on the MCP server (or `memory_search` for memory alone), NOT read local files.
|
|
122
124
|
- For the narrow explicit-save cases → `memory_add` (see "When to also call memory_add").
|
|
123
125
|
|
|
124
|
-
If a Meko call fails,
|
|
126
|
+
If a Meko call fails, tell the user the save or recall failed and include the error. Don't quietly write a local file instead; offer one only if the user wants a local copy.
|
|
125
127
|
|
|
126
128
|
## Core principle: capture the turn, don't hand-curate memory
|
|
127
129
|
|
|
@@ -140,7 +142,7 @@ Your job is not to decide fact-by-fact what to `memory_add`. It's to **post ever
|
|
|
140
142
|
| User corrects or negates a prior fact | Post the turn (the new fact is extracted). Extraction is **additive**, so if the stale fact must not survive, `memory_search` for it and `memory_update` / `memory_delete_by_id`. |
|
|
141
143
|
| User explicitly says "remember this" | `memory_add` (verbatim), in addition to posting the turn. |
|
|
142
144
|
| A durable fact lives only in your output or a tool result | `memory_add`. Extraction reads the user side of the turn, so it won't capture these. |
|
|
143
|
-
| User asks "what do you know about X?" |
|
|
145
|
+
| User asks "what do you know about X?" | `context_search(agent_id="claude_desktop")`. One call returns separate memory, knowledge-base, and past-conversation buckets; report each. Confirm an empty memory or KB bucket with `memory_search` or `knowledgebase_search` before saying nothing is stored. |
|
|
144
146
|
| User asks "what do we (as a team) know about X?" or about uploaded documents | `knowledgebase_search` (returns uploaded docs + promoted memories). |
|
|
145
147
|
| User asks to share specific private memories with the team | Follow the `memory_promote` confirmation workflow below. Never promote based on a fuzzy search result or implied consent. |
|
|
146
148
|
| User provides structured/tabular data (CSV, data dictionary) | Not natively supported via MCP. Point the user at the UI's Add Knowledge upload; do not `memory_add` row-by-row. |
|
|
@@ -164,6 +166,22 @@ conversation_create(agent_id="claude_desktop",
|
|
|
164
166
|
- **Use seeds** for dedup: `seed="<conversation_id>:claude-desktop:<sequential_number>"`.
|
|
165
167
|
- Don't also `memory_add` the same fact — the server extracts memories from the posted turn. `memory_add` is only for the three exception cases above.
|
|
166
168
|
|
|
169
|
+
### Long-running conversations
|
|
170
|
+
|
|
171
|
+
Meko stores a conversation as one Langfuse trace, and Langfuse refuses to load a trace larger than its size limit. After a long session crosses that limit, reads of this session's conversation fail even though it exists:
|
|
172
|
+
|
|
173
|
+
- `conversation_get` and `conversation_update` return `{"error": "not_found", "detail": "Conversation <id> not found"}`, or the call times out.
|
|
174
|
+
- On servers without the MEKO-714 fix, `conversation_add_message` returns the same `not_found`.
|
|
175
|
+
|
|
176
|
+
When this happens on the conversation you created at the start of the session, accept the error and keep working:
|
|
177
|
+
|
|
178
|
+
- Don't retry the call, create a replacement conversation, or re-post earlier turns. Each re-post makes the trace larger.
|
|
179
|
+
- If `conversation_add_message` still succeeds, keep posting turns and skip only the read-back.
|
|
180
|
+
- If `conversation_add_message` fails with `not_found`, stop posting turns for this session. Save durable facts with `memory_add` instead, and tell the user once that Meko can't take more turns in this conversation because it's too large.
|
|
181
|
+
- Keep using `context_search`, the `memory_*` tools, and `knowledgebase_search`. They don't load the conversation trace.
|
|
182
|
+
|
|
183
|
+
A `not_found` right after `conversation_create` has other causes; see `tools-troubleshooting.md`.
|
|
184
|
+
|
|
167
185
|
## Calling tools correctly on the first attempt
|
|
168
186
|
|
|
169
187
|
**Use only the required parameters. Do not guess optional parameters.**
|
|
@@ -179,6 +197,24 @@ memory_add(
|
|
|
179
197
|
```
|
|
180
198
|
Required parameters: `text`, `agent_id`, `conversation_id`. On **writes**, `conversation_id` must be a real UUID from `conversation_create` — writes attached to a nil/empty conversation are orphaned in Langfuse traces. Empty / missing `agent_id` is NOT rejected — the server quietly falls back to the `meko_agent` common bucket. Pass `agent_id="claude_desktop"` explicitly so this client's writes stay in the right bucket and don't pollute the cross-project pool.
|
|
181
199
|
|
|
200
|
+
### context_search: default first call for recall
|
|
201
|
+
```
|
|
202
|
+
context_search(
|
|
203
|
+
query="auth migration decisions",
|
|
204
|
+
agent_id="claude_desktop",
|
|
205
|
+
conversation_id="<id from conversation_create>",
|
|
206
|
+
datapack_id="<PIN, if pinned>")
|
|
207
|
+
```
|
|
208
|
+
Required parameters: `query`, `conversation_id`. It queries memory, the knowledge base, and the conversation-history cache in parallel and returns `{"results": {"memory": [...], "knowledge_base": [...], "conversation": {"hits": [...], "thread": [...]}}, "token_savings": {...}}`.
|
|
209
|
+
|
|
210
|
+
- Read every bucket; a KB document can supersede a memory.
|
|
211
|
+
- An empty bucket is ambiguous: either that source found nothing relevant, or it failed. `context_search` turns a failed source into an empty list and records the error only in the trace. Before you tell the user nothing is stored about X, confirm with `memory_search` or `knowledgebase_search`, which return errors.
|
|
212
|
+
- A bucket is `null` only when that source wasn't queried: `force_source` excluded it, or the server couldn't build a query vector for it.
|
|
213
|
+
- The conversation bucket is datapack-wide. It returns embedded turns from every user and agent on the datapack, and each hit carries its author's `user_id`. Don't present a hit as this user's own history.
|
|
214
|
+
- `limit` bounds the memory and KB buckets only; the conversation bucket returns up to 10 hits plus a thread of whole turns.
|
|
215
|
+
- The memory bucket has no similarity floor here, so discount weak rows against the other buckets.
|
|
216
|
+
- Use `memory_search` for the pin lookup and for `run_id` filtering, and `knowledgebase_search` when you need exact `document_id` values.
|
|
217
|
+
|
|
182
218
|
### memory_search — correct call pattern
|
|
183
219
|
```
|
|
184
220
|
memory_search(
|
|
@@ -186,14 +222,14 @@ memory_search(
|
|
|
186
222
|
agent_id="claude_desktop",
|
|
187
223
|
conversation_id="<id from conversation_create>")
|
|
188
224
|
```
|
|
189
|
-
Required parameters: `query`, `
|
|
225
|
+
Required parameters: `query`, `conversation_id`. On **`memory_search`** specifically, `conversation_id` is used only for Langfuse trace nesting — it does NOT filter results. Pass the session's UUID so the search span appears under the active conversation. Never pass `""`: production `memory_search` currently fails on an empty value (MEKO-707). If you have no conversation yet, pass a freshly generated 32-character lowercase hex id (a UUID with the hyphens removed); on a read it only nests the trace. For conversation-scoped filtering use the separate `run_id` parameter.
|
|
190
226
|
|
|
191
227
|
`agent_id` attributes the search trace but does not filter the returned memories. One call includes rows written by `claude_desktop`, `meko_agent`, coding agents, and legacy agent values for this user.
|
|
192
228
|
|
|
193
|
-
**Interpreting results.** `memory_search` returns a single list — `{"results": [...]}` — the stored memories, ranked by a hybrid score (semantic similarity + keyword match + a boost for memories mentioning the entities named in your query). There are no `relations` / `promoted_relations` keys.
|
|
229
|
+
**Interpreting results.** `memory_search` returns a single list — `{"results": [...]}` — the stored memories, ranked by a hybrid score (semantic similarity + keyword match + a boost for memories mentioning the entities named in your query). There are no `relations` / `promoted_relations` keys.
|
|
194
230
|
|
|
195
231
|
- **`memory_search` is cross-agent by design.** Results include memories written by *other* clients (`agent_id` "agent", "claude_code:…", etc.) for the same user — that is expected, not a tenant leak. Use them.
|
|
196
|
-
- **
|
|
232
|
+
- **Results below a server-configured similarity floor (default 0.2) are dropped.** An empty `results` list can mean "only weak matches", not "nothing stored". Some older rows may carry a `graph_nodes` / `graph_edges` block in `metadata`; ignore it.
|
|
197
233
|
|
|
198
234
|
### knowledgebase_search — correct call pattern
|
|
199
235
|
```
|
|
@@ -204,7 +240,7 @@ knowledgebase_search(
|
|
|
204
240
|
datapack_id="<datapack UUID>",
|
|
205
241
|
limit=10)
|
|
206
242
|
```
|
|
207
|
-
Required parameters: `query`, `
|
|
243
|
+
Required parameters: `query`, `conversation_id`, `datapack_id`. `datapack_id` has no default here. `agent_id` is ignored for filtering — results are the team's shared knowledge on the datapack regardless of what you pass.
|
|
208
244
|
|
|
209
245
|
### memory_promote — explicit confirmation required
|
|
210
246
|
|
|
@@ -222,20 +258,20 @@ The Cloud UI's Learnings tab remains an alternative user-driven path.
|
|
|
222
258
|
|
|
223
259
|
### Critical parameter rules
|
|
224
260
|
|
|
225
|
-
- **agent_id**: `"claude_desktop"` for this client's project-less writes and trace attribution. Use `"meko_agent"` when writing genuinely cross-project facts such as user identity. Empty/missing values on writes route to `meko_agent`. The value does not filter `memory_search`, `memory_get_all`, `conversation_list`, or `knowledgebase_search
|
|
226
|
-
- **conversation_id**: Behavior varies by tool. On write tools (`memory_add`, `conversation_add_message`) pass a real UUID from `conversation_create` — a nil/empty value orphans the Langfuse trace. On
|
|
261
|
+
- **agent_id**: `"claude_desktop"` for this client's project-less writes and trace attribution. Use `"meko_agent"` when writing genuinely cross-project facts such as user identity. Empty/missing values on writes route to `meko_agent`. The value does not filter `memory_search`, `memory_get_all`, `conversation_list`, or `knowledgebase_search`. The conversation calls (`conversation_get`, `conversation_add_message`, `conversation_update`, `conversation_delete`) require the creating agent's exact value, and `memory_delete_all` deletes only the passed value's bucket. See `tools-agent-id-conventions.md`.
|
|
262
|
+
- **conversation_id**: Behavior varies by tool. On write tools (`memory_add`, `conversation_add_message`) pass a real UUID from `conversation_create` — a nil/empty value orphans the Langfuse trace. On read tools it's used only for trace nesting (not for filtering), but it must still be a 32-hex id: `memory_search` fails on `""`, and most other tools reject it with `conversation_id_required`. Never pass `"current"`, `""`, or other non-UUID values. Before `conversation_create` (the first-turn pin lookup), use a freshly generated 32-hex id.
|
|
227
263
|
- **When in doubt about optional parameters, omit them.** The server has sensible defaults.
|
|
228
264
|
|
|
229
265
|
## Key concepts
|
|
230
266
|
|
|
231
|
-
1. **
|
|
267
|
+
1. **25 tools in 7 groups** (all available in production): Retrieval (1: `context_search`), Memory (8 — including `memory_promote`), Conversation (6), Knowledge Base (2 — `knowledgebase_search`, `knowledgebase_delete_document`), Datapack (5), Artifacts (2 — `artifact_put`, `artifact_get`), Observability (1 — `track_token_usage`). Memory is captured automatically from turns posted with `conversation_add_message` — post each substantive turn and the server extracts durable memories from it. KB ingestion is UI-only (Datapack → Actions → Add Knowledge); raw SQL is not exposed. See `tools-overview.md`.
|
|
232
268
|
2. **datapack_id routing**: DB, RAG, and memory tools accept optional `datapack_id` (default datapack if omitted). `knowledgebase_search` is the exception: `datapack_id` is **required** there.
|
|
233
269
|
3. **agent_id is multi-agent**: For Claude Desktop, use `agent_id="claude_desktop"` for normal writes and `agent_id="meko_agent"` for cross-project facts. Writes are attributed to `(datapack_id, user_id, agent_id)`. Personal memory reads and `conversation_list` span all of this user's agents; `conversation_get` remains agent-owned. `knowledgebase_search` ignores `agent_id` entirely. See `tools-agent-id-conventions.md`.
|
|
234
270
|
4. **Personal memory vs. team-shared knowledge**: Un-promoted memories are scoped per-user — readable across all of that user's agents, but no other user can see them. With explicit confirmation, `memory_promote` moves exact memories into Shared Knowledge; the Cloud UI's Learnings tab is an alternative. Promoted content is visible to every datapack member. `knowledgebase_search` is the MCP read path for both Shared Knowledge and uploaded documents.
|
|
235
271
|
5. **conversation_id IS the Langfuse trace ID**: every MCP tool call inside a conversation becomes a span under that trace. Observable in the Meko UI's Observe hub. See `tools-memory-vs-conversation.md`.
|
|
236
272
|
6. **Adding documents to the team knowledge base is UI-only on Cloud today**: user uploads files via Datapack → Actions → **Add Knowledge** (PDF/TXT/MD/JSON/MP4, 5MB each). The MCP ingestion tools are not available on Cloud. See `tools-rag-workflow.md`.
|
|
237
273
|
7. **Manual conversation capture**: Claude Desktop does not have automatic capture hooks. Create and save conversations explicitly when sessions are valuable.
|
|
238
|
-
8. **Memory latencies are not cheap**: observed on prod 2026-05-07 — `memory_add` 12-21s/call (calls OpenAI), `memory_search` 2-6s/call. Budget accordingly.
|
|
274
|
+
8. **Memory latencies are not cheap**: observed on prod 2026-05-07 — `memory_add` 12-21s/call (calls OpenAI), `memory_search` 2-6s/call. Budget accordingly. On the Free tier, `conversation_add_message` and `context_search` are each capped at 1,000 lifetime calls, and `memory_search` and `knowledgebase_search` at 1,000. Per-turn capture draws down the `conversation_add_message` cap, so on Free skip trivial turns. When a call returns `free_tier_limit_reached`, report it and stop calling that tool; it can arrive as HTTP 403 but isn't an authentication problem.
|
|
239
275
|
9. **Known limitations**: see `tools-known-limitations.md` before attempting write operations on tools that appear in the catalog but aren't available on Cloud.
|
|
240
276
|
10. **Error recovery**: Connection errors are common with memory tools — see `tools-troubleshooting.md` for retry strategies and fallbacks.
|
|
241
277
|
|
|
@@ -243,7 +279,7 @@ The Cloud UI's Learnings tab remains an alternative user-driven path.
|
|
|
243
279
|
|
|
244
280
|
| File | What it covers |
|
|
245
281
|
|------|---------------|
|
|
246
|
-
| `tools-overview.md` | Complete catalog of all
|
|
282
|
+
| `tools-overview.md` | Complete catalog of all 25 tools available in production, with decision tree |
|
|
247
283
|
| `tools-cookbook.md` | Per-tool examples with correct parameters, responses, and error cases |
|
|
248
284
|
| `tools-memory-vs-conversation.md` | When to use memory tools vs conversation tools |
|
|
249
285
|
| `tools-rag-workflow.md` | End-to-end RAG pipeline flow |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Meko MCP Tools — Claude Desktop Setup
|
|
2
2
|
|
|
3
|
-
Use the Meko MCP tools skill natively in Claude Desktop. Because Desktop has no lifecycle hooks, the skill teaches Claude to capture each substantive turn by posting it via `conversation_add_message` (the server extracts durable memories from those posts), to reserve explicit `memory_add` for the narrow cases (the user says "remember this", a fact lives only in the assistant's output or a tool result, or a corrected fact needs overwriting), to classify information, to use all <!--tool-count-->
|
|
3
|
+
Use the Meko MCP tools skill natively in Claude Desktop. Because Desktop has no lifecycle hooks, the skill teaches Claude to capture each substantive turn by posting it via `conversation_add_message` (the server extracts durable memories from those posts), to reserve explicit `memory_add` for the narrow cases (the user says "remember this", a fact lives only in the assistant's output or a tool result, or a corrected fact needs overwriting), to classify information, to use all <!--tool-count-->25<!--/tool-count--> Meko MCP tools correctly, and to handle errors gracefully.
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
@@ -6,7 +6,7 @@ description: Maps reference files to their topics for the meko-mcp-tools-desktop
|
|
|
6
6
|
# Reference Sections
|
|
7
7
|
|
|
8
8
|
## Tool Selection & Catalog
|
|
9
|
-
- [tools-overview.md](tools-overview.md) — Complete catalog of all
|
|
9
|
+
- [tools-overview.md](tools-overview.md) — Complete catalog of all 25 tools available in production, with a decision tree
|
|
10
10
|
|
|
11
11
|
## Tool-Specific Guidance
|
|
12
12
|
- [tools-agent-id-conventions.md](tools-agent-id-conventions.md) — Multi-agent model: the three buckets (project `<client>:<repo-basename>`, common `meko_agent`, loose client name), personal vs. team-shared read surfaces
|
|
@@ -42,7 +42,7 @@ Empirically verified 2026-07-23 on Cloud prod: memories written under two distin
|
|
|
42
42
|
|
|
43
43
|
### Personal conversation reads — `conversation_get`, `conversation_list`
|
|
44
44
|
|
|
45
|
-
- `conversation_get`
|
|
45
|
+
- `conversation_get`, `conversation_add_message`, `conversation_update`, and `conversation_delete` are agent-owned: pass the exact `agent_id` that created the conversation, or the call returns `agent_id_mismatch`.
|
|
46
46
|
- `conversation_list` is not agent-filtered and returns the datapack's conversations for this user across agents.
|
|
47
47
|
|
|
48
48
|
### Team-shared reads — `knowledgebase_search`
|
|
@@ -83,15 +83,17 @@ knowledgebase_search(agent_id=anything, query=...)
|
|
|
83
83
|
|
|
84
84
|
If the user asks "what do you know about X?":
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
2. **`knowledgebase_search(agent_id="<anything>", datapack_id="<datapack>", query="X")`** — returns team-shared knowledge. Useful when the answer may have been promoted by the user or a teammate.
|
|
86
|
+
call **`context_search(agent_id="claude_desktop", conversation_id="<id>", datapack_id="<datapack>", query="X")`**. It returns separate buckets:
|
|
88
87
|
|
|
89
|
-
|
|
88
|
+
- memory: all of this user's personal memories across every agent;
|
|
89
|
+
- knowledge base: team-shared knowledge, including anything the user or a teammate promoted;
|
|
90
|
+
- conversation: matching past turns from any user or agent on the datapack.
|
|
91
|
+
|
|
92
|
+
Always tell the user which surface each finding came from. Confirm an empty memory or KB bucket with `memory_search` or `knowledgebase_search` before saying nothing is there.
|
|
90
93
|
|
|
91
94
|
## Optional sub-scoping
|
|
92
95
|
|
|
93
96
|
Optional parameters can narrow a call further:
|
|
94
|
-
- `user_id` — explicitly scope writes/reads to a specific end-user if your agent serves multiple (rare in Claude Desktop; more common in API products)
|
|
95
97
|
- `run_id` — **read/delete filter only**, and it filters on the row's
|
|
96
98
|
`meko_conversation_id`, so the value to pass is a *conversation id*, not a
|
|
97
99
|
free-form run label. On `memory_add` it is Langfuse trace metadata only and is
|
|
@@ -99,7 +101,7 @@ Optional parameters can narrow a call further:
|
|
|
99
101
|
`memory_search(run_id=X)` returns nothing, silently. Scope writes with
|
|
100
102
|
`conversation_id` instead (MEKO-473).
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
Accepted by `memory_add`, `memory_search`, `memory_get_all`, `memory_delete_all`, and `conversation_create`. `memory_get_all` ignores it. No tool takes a `user_id` argument; the server resolves it from your credentials.
|
|
103
105
|
|
|
104
106
|
## Things I checked and found in-data on real Cloud datapacks
|
|
105
107
|
|