sepia-mcp 0.6.1 → 0.7.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -817,7 +817,8 @@ var SearchInput = v.object({
817
817
  namespace: v.optional(v.pipe(v.string(), v.description("Restrict to a namespace"))),
818
818
  type: v.optional(v.pipe(v.string(), v.maxLength(64), v.description("Memory type (fact/observation/preference/instruction) OR entity type (person/project/tool/concept/repo)"))),
819
819
  tags: v.optional(v.pipe(tagsSchema, v.description("Match memories/entities carrying ALL of these tags"))),
820
- limit: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(SEARCH_LIMIT_MAX), v.description("Max results (default 10, max 25)")), 10)
820
+ limit: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(SEARCH_LIMIT_MAX), v.description("Max results (default 10, max 25)")), 10),
821
+ min_terms: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(50), v.description("Drop hits covering fewer than this many query terms (precision dial; absent = best-effort recall). Too high returns 0 with `terms` present — that is the filter, not a missing memory.")))
821
822
  });
822
823
  var TraverseInput = v.object({
823
824
  start_id: v.pipe(uuidSchema, v.description("Entity UUID to start the BFS walk from")),
@@ -8777,6 +8778,8 @@ class SepiaClient {
8777
8778
  qs.set("tags", params.tags.join(","));
8778
8779
  if (params.limit !== undefined)
8779
8780
  qs.set("limit", String(params.limit));
8781
+ if (params.min_terms !== undefined)
8782
+ qs.set("min_terms", String(params.min_terms));
8780
8783
  return this.request("GET", `/api/search?${qs.toString()}`);
8781
8784
  }
8782
8785
  traverseGraph(startId, depth) {
@@ -9057,19 +9060,20 @@ function registerSearchTools(server, client) {
9057
9060
  server.tool({
9058
9061
  name: "search",
9059
9062
  title: "Search Memory",
9060
- description: "Unified keyword + metadata search across memories, entity names, and entity summaries. Multi-word queries are best-effort: rows matching more of your words rank first, and results are never emptied by one absent word. `partial: true` in the result means no single row covered the whole query.",
9063
+ description: "Unified keyword + metadata search across memories, entity names, and entity summaries. Multi-word queries are best-effort: rows matching more of your words rank first, and results are never emptied by one absent word. `partial: true` means no single row covered the whole query, and `best_matched_terms` reports the best coverage achieved — pass it back as `min_terms` when you want precision instead of recall.",
9061
9064
  icons: [SEPIA_ICON],
9062
9065
  schema: SearchToolInput,
9063
9066
  annotations: { readOnlyHint: true }
9064
9067
  }, safe(async (args) => {
9065
- const { count, results, terms, partial } = await client.search({
9068
+ const { count, results, terms, best_matched_terms, partial } = await client.search({
9066
9069
  q: args.q,
9067
9070
  namespace: args.namespace,
9068
9071
  type: args.type,
9069
9072
  tags: args.tags,
9070
- limit: args.limit
9073
+ limit: args.limit,
9074
+ min_terms: args.min_terms
9071
9075
  });
9072
- return { count, terms, partial, hits: results };
9076
+ return { count, terms, best_matched_terms, partial, hits: results };
9073
9077
  }));
9074
9078
  }
9075
9079
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sepia-mcp",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Self-contained MCP server for Sepia — a personal knowledge-graph memory server. Talks to the Sepia REST API (SEPIA_URL + SEPIA_API_KEY); stdio or HTTP transport.",
5
5
  "type": "module",
6
6
  "repository": {