@contextstream/mcp-server 0.4.26 → 0.4.27

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 +24 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5191,6 +5191,21 @@ var ContextStreamClient = class {
5191
5191
  }
5192
5192
  });
5193
5193
  }
5194
+ /**
5195
+ * Refactor search optimized for find-replace operations.
5196
+ * Uses word-boundary matching for precise symbol renaming.
5197
+ * Returns matches grouped by file with line/col positions.
5198
+ */
5199
+ searchRefactor(body) {
5200
+ return request(this.config, "/search/refactor", {
5201
+ body: {
5202
+ ...this.withDefaults(body),
5203
+ search_type: "refactor",
5204
+ output_format: body.output_format,
5205
+ filters: body.workspace_id ? {} : { file_types: [], languages: [], file_paths: [], exclude_paths: [], content_types: [], tags: [] }
5206
+ }
5207
+ });
5208
+ }
5194
5209
  // Memory / Knowledge
5195
5210
  createMemoryEvent(body) {
5196
5211
  const withDefaults = this.withDefaults(body);
@@ -7919,7 +7934,8 @@ search(mode="hybrid", query="function implementation") \u2192 done (results incl
7919
7934
  | Find code by meaning | \`hybrid\` | "authentication logic", "error handling" |
7920
7935
  | Exact string/symbol | \`keyword\` | "UserAuthService", "API_KEY" |
7921
7936
  | File patterns | \`pattern\` | "*.sql", "test_*.py" |
7922
- | ALL matches (refactoring) | \`exhaustive\` | "oldFunctionName" (rename across codebase) |
7937
+ | ALL matches (grep-like) | \`exhaustive\` | "TODO", "FIXME" (find all occurrences) |
7938
+ | Symbol renaming | \`refactor\` | "oldFunctionName" (word-boundary matching) |
7923
7939
  | Conceptual search | \`semantic\` | "how does caching work" |
7924
7940
 
7925
7941
  **Token Efficiency:** Use \`output_format\` to reduce response size:
@@ -8074,7 +8090,8 @@ search(mode="hybrid", query="function implementation") \u2192 done (results incl
8074
8090
  | Find code by meaning | \`hybrid\` | "authentication logic", "error handling" |
8075
8091
  | Exact string/symbol | \`keyword\` | "UserAuthService", "API_KEY" |
8076
8092
  | File patterns | \`pattern\` | "*.sql", "test_*.py" |
8077
- | ALL matches (refactoring) | \`exhaustive\` | "oldFunctionName" (rename across codebase) |
8093
+ | ALL matches (grep-like) | \`exhaustive\` | "TODO", "FIXME" (find all occurrences) |
8094
+ | Symbol renaming | \`refactor\` | "oldFunctionName" (word-boundary matching) |
8078
8095
  | Conceptual search | \`semantic\` | "how does caching work" |
8079
8096
 
8080
8097
  ### Token Efficiency
@@ -13496,11 +13513,11 @@ Use this to remove a reminder that is no longer relevant.`,
13496
13513
  "search",
13497
13514
  {
13498
13515
  title: "Search",
13499
- description: `Search workspace memory and knowledge. Modes: semantic (meaning-based), hybrid (semantic + keyword), keyword (exact match), pattern (regex), exhaustive (all matches like grep).
13516
+ description: `Search workspace memory and knowledge. Modes: semantic (meaning-based), hybrid (semantic + keyword), keyword (exact match), pattern (regex), exhaustive (all matches like grep), refactor (word-boundary matching for symbol renaming).
13500
13517
 
13501
13518
  Output formats: full (default, includes content), paths (file paths only - 80% token savings), minimal (compact - 60% savings), count (match counts only - 90% savings).`,
13502
13519
  inputSchema: external_exports.object({
13503
- mode: external_exports.enum(["semantic", "hybrid", "keyword", "pattern", "exhaustive"]).describe("Search mode"),
13520
+ mode: external_exports.enum(["semantic", "hybrid", "keyword", "pattern", "exhaustive", "refactor"]).describe("Search mode"),
13504
13521
  query: external_exports.string().describe("Search query"),
13505
13522
  workspace_id: external_exports.string().uuid().optional(),
13506
13523
  project_id: external_exports.string().uuid().optional(),
@@ -13531,6 +13548,9 @@ Output formats: full (default, includes content), paths (file paths only - 80% t
13531
13548
  case "exhaustive":
13532
13549
  result = await client.searchExhaustive(params);
13533
13550
  break;
13551
+ case "refactor":
13552
+ result = await client.searchRefactor(params);
13553
+ break;
13534
13554
  }
13535
13555
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
13536
13556
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contextstream/mcp-server",
3
3
  "mcpName": "io.github.contextstreamio/mcp-server",
4
- "version": "0.4.26",
4
+ "version": "0.4.27",
5
5
  "description": "ContextStream MCP server - v0.4.x with consolidated domain tools (~11 tools, ~75% token reduction). Code context, memory, search, and AI tools.",
6
6
  "type": "module",
7
7
  "license": "MIT",