@delega-dev/mcp
Advanced tools
+41
-0
@@ -266,2 +266,11 @@ #!/usr/bin/env node | ||
| } | ||
| async searchContext(params) { | ||
| const query = { q: params.q }; | ||
| if (params.project_id !== void 0) query.project_id = String(params.project_id); | ||
| if (params.source) query.source = params.source; | ||
| if (params.key) query.key = params.key; | ||
| if (params.limit !== void 0) query.limit = String(params.limit); | ||
| if (params.include_superseded) query.include_superseded = "true"; | ||
| return this.request("GET", `${this.pathPrefix}/context/search`, void 0, query); | ||
| } | ||
| // ── Agents ── | ||
@@ -595,2 +604,14 @@ async listAgents() { | ||
| } | ||
| function formatRecall(resp) { | ||
| const results = resp.results ?? []; | ||
| if (!results.length) return `No matching decision-memory for "${resp.query ?? ""}".`; | ||
| const lines = [`Recall \u2014 ${results.length} match(es) for "${resp.query ?? ""}":`]; | ||
| for (const r of results) { | ||
| const val = typeof r.value === "string" ? r.value : JSON.stringify(r.value); | ||
| lines.push("", `[${r.source}] ${r.key}: ${val}`); | ||
| const task = r.task_content ? `#${r.task_id} (${r.task_content})` : `#${r.task_id}`; | ||
| lines.push(` \u21B3 task ${task} \xB7 score ${r.score}`); | ||
| } | ||
| return lines.join("\n"); | ||
| } | ||
@@ -1249,2 +1270,22 @@ // src/index.ts | ||
| server.tool( | ||
| "recall", | ||
| "Search your decision-memory across ALL tasks \u2014 recall a prior decision, fact, or constraint without knowing which task recorded it. Returns the best-matching context entries (key, value, source, and the task they live on) ranked by relevance, with human-stated facts weighted highest. Use at the START of new work to avoid re-deciding something already settled. Lexical match for now (exact-ish terms beat paraphrases). Read-only; scoped to what you can read. Hosted API only.", | ||
| { | ||
| q: z.string().describe("What you're about to do or looking for, e.g. 'auth token expiry policy' or 'D1 migration approach'"), | ||
| project_id: z.union([z.string(), z.number()]).optional().describe("Restrict to one project"), | ||
| source: z.enum(["human_stated", "agent_inferred", "agent_observed", "imported"]).optional().describe("Restrict to a provenance source"), | ||
| key: z.string().optional().describe("Restrict to a specific context key"), | ||
| limit: z.number().int().min(1).max(100).optional().describe("Max results (default 20)"), | ||
| include_superseded: z.boolean().optional().describe("Include retracted/overwritten entries (default false)") | ||
| }, | ||
| async (args) => { | ||
| try { | ||
| const resp = await client.searchContext(args); | ||
| return { content: [{ type: "text", text: formatRecall(resp) }] }; | ||
| } catch (error) { | ||
| return toolErrorResult(error); | ||
| } | ||
| } | ||
| ); | ||
| server.tool( | ||
| "fleet_attention", | ||
@@ -1251,0 +1292,0 @@ "Triage board: one call returning everything across the account that needs a human or coordinator \u2014 abandoned claims (a crashed/silent agent's expired lease), silent holders, errored and input-blocked tasks, overdue, and looping (repeatedly reopened) tasks. Scoped like stats: coordinators/admins see the whole account, workers see their own involvement. Read-only. Hosted API only.", |
+1
-1
| { | ||
| "name": "@delega-dev/mcp", | ||
| "version": "1.14.0", | ||
| "version": "1.15.0", | ||
| "mcpName": "io.github.delega-dev/delega", | ||
@@ -5,0 +5,0 @@ "description": "MCP server for Delega — the task handoff layer for AI agents", |
+1
-0
@@ -73,2 +73,3 @@ # delega-mcp | ||
| | `get_context_history` | Read the append-only provenance ledger for a task's context | | ||
| | `recall` | Search decision-memory across ALL tasks — recall a prior decision/fact without knowing which task holds it. Ranked, human-stated weighted highest, scoped to what you can read. **Hosted API only.** | | ||
| | `find_duplicate_tasks` | Check whether proposed task content is similar to existing open tasks (TF-IDF + cosine similarity). Call before `create_task` to avoid redundant work. | | ||
@@ -75,0 +76,0 @@ | `get_usage` | Return quota + rate-limit info. **Hosted API only** (`api.delega.dev`); custom endpoints receive a clear error. | |
76125
3.66%1549
2.79%180
0.56%