@cachly-dev/mcp-server 0.9.10 → 0.9.12

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/dist/index.js CHANGED
@@ -2434,7 +2434,11 @@ const TOOLS = [
2434
2434
  {
2435
2435
  name: 'cache_get',
2436
2436
  description: 'Get a value from a running cache instance by key. ' +
2437
- 'Returns the value (string or JSON) or null if the key does not exist.',
2437
+ 'Returns the stored value (string or deserialized JSON object) or null if the key does not exist or has expired. ' +
2438
+ 'Read-only — no side effects. ' +
2439
+ 'Use cache_mget when you need multiple keys in one round-trip. ' +
2440
+ 'Use cache_exists to check existence without retrieving the value. ' +
2441
+ 'Use semantic_search when you need fuzzy/vector search across stored values.',
2438
2442
  inputSchema: {
2439
2443
  type: 'object',
2440
2444
  properties: {
@@ -2447,11 +2451,15 @@ const TOOLS = [
2447
2451
  {
2448
2452
  name: 'cache_set',
2449
2453
  description: 'Set a key-value pair in a running cache instance. ' +
2450
- 'Value can be a string or a JSON-serialized object. Optionally set a TTL in seconds.',
2454
+ 'Overwrites any existing value at the key — not idempotent for new data. ' +
2455
+ 'Returns "OK" on success; returns an error if the instance_id is invalid or the instance is paused. ' +
2456
+ 'Value can be a string or a JSON-serialized object. Optionally set a TTL in seconds (omit for no expiry). ' +
2457
+ 'Use cache_mset instead for setting multiple keys in a single pipeline round-trip. ' +
2458
+ 'Use cache_stream_set instead for caching LLM token streams (ordered string chunks).',
2451
2459
  inputSchema: {
2452
2460
  type: 'object',
2453
2461
  properties: {
2454
- instance_id: { type: 'string' },
2462
+ instance_id: { type: 'string', description: 'UUID of the cache instance (from list_instances)' },
2455
2463
  key: { type: 'string', description: 'Cache key' },
2456
2464
  value: { type: 'string', description: 'Value to store (string or JSON)' },
2457
2465
  ttl: { type: 'number', description: 'Time-to-live in seconds (optional, omit for no expiry)' },
@@ -2499,12 +2507,15 @@ const TOOLS = [
2499
2507
  },
2500
2508
  {
2501
2509
  name: 'cache_ttl',
2502
- description: 'Get the remaining time-to-live (TTL) of a key in seconds. Returns -1 if no TTL, -2 if the key does not exist.',
2510
+ description: 'Get the remaining time-to-live (TTL) of a key in seconds. ' +
2511
+ 'Returns -1 if the key exists but has no expiry, -2 if the key does not exist. ' +
2512
+ 'Read-only — no side effects. ' +
2513
+ 'Use cache_set with a ttl parameter to set or update the expiry.',
2503
2514
  inputSchema: {
2504
2515
  type: 'object',
2505
2516
  properties: {
2506
- instance_id: { type: 'string' },
2507
- key: { type: 'string' },
2517
+ instance_id: { type: 'string', description: 'UUID of the cache instance (from list_instances)' },
2518
+ key: { type: 'string', description: 'Cache key to inspect' },
2508
2519
  },
2509
2520
  required: ['instance_id', 'key'],
2510
2521
  },
@@ -2542,13 +2553,17 @@ const TOOLS = [
2542
2553
  {
2543
2554
  name: 'semantic_search',
2544
2555
  description: 'Find cached entries that are semantically similar to a natural-language query. ' +
2545
- 'Powered by pgvector HNSW index on cachly infrastructure — embeddings never leave Germany. ' +
2546
- 'Requires OPENAI_API_KEY (or compatible) and the Speed/Business tier with CACHLY_VECTOR_URL. ' +
2547
- 'Example: "find all cached responses about password reset" or "what did we answer about pricing?"',
2556
+ 'Read-only — no side effects. ' +
2557
+ 'Returns an array of objects, each with: key, value, similarity_score (0–1), and namespace. ' +
2558
+ 'Returns an empty array if no entries meet the similarity threshold. ' +
2559
+ 'Requires OPENAI_API_KEY (or compatible provider) and the Speed/Business tier with CACHLY_VECTOR_URL. ' +
2560
+ 'Embeddings are computed server-side and never leave Germany (pgvector HNSW index). ' +
2561
+ 'Example: "find all cached responses about password reset" or "what did we answer about pricing?". ' +
2562
+ 'Use cache_get for exact key lookup; use smart_recall for brain lessons.',
2548
2563
  inputSchema: {
2549
2564
  type: 'object',
2550
2565
  properties: {
2551
- instance_id: { type: 'string' },
2566
+ instance_id: { type: 'string', description: 'UUID of the cache instance (from list_instances)' },
2552
2567
  query: { type: 'string', description: 'Natural-language query to find similar cached content' },
2553
2568
  threshold: {
2554
2569
  type: 'number',
@@ -2680,7 +2695,11 @@ const TOOLS = [
2680
2695
  name: 'cache_mset',
2681
2696
  description: 'Set multiple key-value pairs in a single pipeline round-trip. ' +
2682
2697
  'Supports per-key TTL – unlike native MSET. ' +
2683
- 'Uses one TCP round-trip for N keys via Redis pipeline.',
2698
+ 'Uses one TCP round-trip for N keys via Redis pipeline. ' +
2699
+ 'Each item overwrites any existing value for that key. ' +
2700
+ 'On partial failure the successfully pipelined keys are committed; a per-key error list is returned for any that failed. ' +
2701
+ 'Returns a summary: { set: N, errors: [...] }. ' +
2702
+ 'Use cache_set for a single key; use cache_stream_set for large streaming payloads.',
2684
2703
  inputSchema: {
2685
2704
  type: 'object',
2686
2705
  properties: {
@@ -2763,8 +2782,11 @@ const TOOLS = [
2763
2782
  'Perfect for caching: codebase overviews, file summaries, project structure, ' +
2764
2783
  'frequently-accessed data, or "thinking" results like dependency analysis. ' +
2765
2784
  'The AI assistant can use this to avoid re-reading the entire codebase every time. ' +
2785
+ 'Overwrites any existing value stored under the same key. ' +
2786
+ 'Returns { key, stored_at, ttl } confirming the saved context. ' +
2766
2787
  'Example: remember_context("project overview", "This is a Next.js app with...") ' +
2767
- 'then later: recall_context("project overview")',
2788
+ 'then later: recall_context("project overview"). ' +
2789
+ 'Use recall_context to retrieve; use list_remembered to see all stored keys.',
2768
2790
  inputSchema: {
2769
2791
  type: 'object',
2770
2792
  properties: {
@@ -3300,9 +3322,12 @@ const TOOLS = [
3300
3322
  {
3301
3323
  name: 'global_learn',
3302
3324
  description: 'Store a lesson that applies across ALL your projects (cross-project knowledge). ' +
3325
+ 'Idempotent: if a lesson with the same topic already exists, it is updated in place — no duplicates are created. ' +
3326
+ 'Returns a confirmation with the stored lesson key. No rate limits. ' +
3303
3327
  'Global lessons are stored with the prefix cachly:global:lesson: and recalled from any instance via global_recall. ' +
3304
3328
  'Use for tool preferences, personal workflows, platform quirks, and universal gotchas. ' +
3305
- 'Example: global_learn(topic="bash:macos-arrays", lesson="Arrays work differently on macOS bash 3.2")',
3329
+ 'Example: global_learn(topic="bash:macos-arrays", lesson="Arrays work differently on macOS bash 3.2"). ' +
3330
+ 'Use learn_from_attempts for project-specific session lessons; use team_learn to share lessons with your team.',
3306
3331
  inputSchema: {
3307
3332
  type: 'object',
3308
3333
  properties: {
@@ -3336,7 +3361,11 @@ const TOOLS = [
3336
3361
  name: 'publish_lesson',
3337
3362
  description: 'Publish a lesson to the Cachly Public Brain (anonymized community knowledge base). ' +
3338
3363
  'Published lessons can be imported by other developers via import_public_brain. ' +
3339
- 'PII is stripped automatically. Visible under the framework/category tag.',
3364
+ 'PII is stripped automatically. Visible under the framework/category tag. ' +
3365
+ 'Returns { lesson_id, topic, framework, published_at } confirming the publish. ' +
3366
+ 'Irreversible — once published to the public brain, lessons cannot be deleted via the MCP interface. ' +
3367
+ 'Use learn_from_attempts or global_learn for private lessons; ' +
3368
+ 'use syndicate for anonymized global sharing without framework tagging.',
3340
3369
  inputSchema: {
3341
3370
  type: 'object',
3342
3371
  properties: {
@@ -3633,7 +3662,10 @@ const TOOLS = [
3633
3662
  'This is how individual knowledge becomes collective intelligence. ' +
3634
3663
  'Call this AFTER every learn_from_attempts that is worth sharing universally ' +
3635
3664
  '(critical bugs, deployment gotchas, architecture discoveries). ' +
3636
- 'Use scope="org" to keep the lesson private to your organisation.',
3665
+ 'If a lesson with the same topic already exists in the commons, it is updated in place (idempotent). ' +
3666
+ 'Returns { key, confirm_count, scope } confirming the stored lesson. ' +
3667
+ 'Use scope="org" to keep the lesson private to your organisation. ' +
3668
+ 'Do NOT use for secrets or PII — content is stored in a shared knowledge base.',
3637
3669
  inputSchema: {
3638
3670
  type: 'object',
3639
3671
  properties: {