MCPcopy Index your code

hub / github.com/EncrEor/rlm-claude / functions

Functions334 in github.com/EncrEor/rlm-claude

↓ 25 callersFunctiontokenize_fr
Tokenize French/English text for BM25 search. Features: - Lowercases text - Normalizes accents for matching - Extracts words and
src/mcp_server/tools/tokenizer_fr.py:201
↓ 23 callersMethodload
Load vectors from .npz file. Returns: True if loaded successfully, False if file doesn't exist or numpy unavailable
src/mcp_server/tools/vecstore.py:45
↓ 21 callersFunction_extract_entities
Extract named entities from chunk content (Phase 7.2, MAGMA-inspired). Uses regex patterns to identify domain-specific entities: files,
src/mcp_server/tools/navigation.py:286
↓ 18 callersFunction_chunk_in_date_range
Check if a chunk falls within a date range. Uses simple string comparison on YYYY-MM-DD format (lexicographic = chronologic). Args:
src/mcp_server/tools/navigation.py:257
↓ 16 callersMethodsearch
Search chunks (and optionally insights) using BM25 ranking. Args: query: Natural language search query top_k
src/mcp_server/tools/search.py:189
↓ 12 callersFunction_entity_matches
Check if a chunk's entities contain a given entity (Phase 7.2). Performs case-insensitive substring matching across all entity types. A
src/mcp_server/tools/navigation.py:400
↓ 12 callersMethodadd
(self, chunk_id, vec)
tests/test_retention_semantic.py:31
↓ 11 callersFunctionarchive_chunk
Archive a chunk by compressing it to archive/. Steps: 1. Read chunk file 2. Compress to archive/*.md.gz 3. Remove from main inde
src/mcp_server/tools/retention.py:321
↓ 10 callersMethod_make_store
(self, tmp_path)
tests/test_semantic.py:24
↓ 10 callersMethodadd
Add a vector for a chunk. If chunk_id already exists, replaces the vector. Args: chunk_id: The chunk identifier
src/mcp_server/tools/vecstore.py:91
↓ 10 callersFunctionchunk
Save content to an external chunk file. Use this to externalize parts of the conversation that you might need to reference later but don
src/mcp_server/tools/navigation.py:515
↓ 9 callersFunctionatomic_write_json
Write JSON atomically using write-to-temp-then-rename. On POSIX systems, rename is atomic, so the file is never in a half-written state.
src/mcp_server/tools/fileutil.py:116
↓ 9 callersFunctionnormalize_accent
Remove accents from text for matching purposes. Uses NFD normalization to decompose characters, then removes diacritical marks (combinin
src/mcp_server/tools/tokenizer_fr.py:176
↓ 8 callersMethod_create_chunk
Helper to create a chunk for testing.
tests/test_grep_fuzzy.py:43
↓ 8 callersFunction_get_cached_provider
Get or create the cached embedding provider (singleton, lazy). Reads RLM_EMBEDDING_PROVIDER env var (default: "model2vec"). Returns None if t
src/mcp_server/tools/embeddings.py:94
↓ 8 callersMethodembed
Embed a list of texts into vectors. Args: texts: List of text strings to embed Returns: numpy ndarray of sha
src/mcp_server/tools/embeddings.py:30
↓ 7 callersFunction_load_archive_index
Load archive index from JSON file.
src/mcp_server/tools/retention.py:71
↓ 7 callersFunction_parse_date_from_chunk
Extract date string (YYYY-MM-DD) from chunk metadata or ID. Tries created_at first, then falls back to parsing the chunk ID. Args:
src/mcp_server/tools/navigation.py:232
↓ 6 callersFunction_load_index
Load chunks index from JSON file.
src/mcp_server/tools/retention.py:53
↓ 6 callersFunction_load_index
Load chunks index from JSON file.
src/mcp_server/tools/navigation.py:141
↓ 6 callersFunction_normalize_bm25_scores
Normalize BM25 scores to [0, 1] range using min-max scaling. Adds a 'score_norm' field to each result dict. Args: results: List of B
src/mcp_server/tools/search.py:245
↓ 6 callersMethoddim
Return the embedding dimension.
src/mcp_server/tools/embeddings.py:41
↓ 6 callersFunctionis_immune
Determine if a chunk is protected from archiving/purging. A chunk is IMMUNE if ANY of these apply: - Has a protected tag (critical, deci
src/mcp_server/tools/retention.py:112
↓ 5 callersFunction_load_memory
Load session memory from JSON file.
src/mcp_server/tools/memory.py:19
↓ 5 callersFunction_load_sessions
Load sessions index from disk.
src/mcp_server/tools/sessions.py:17
↓ 5 callersFunctionrestore_chunk
Restore an archived chunk back to active storage. Steps: 1. Find in archive index 2. Decompress to chunks/ 3. Remove from archiv
src/mcp_server/tools/retention.py:420
↓ 5 callersFunctionretention_run
Execute retention actions. Args: archive: Archive old unused chunks (default: True) purge: Purge very old archives (default:
src/mcp_server/tools/retention.py:626
↓ 5 callersMethodsave
Persist vectors atomically to .npz file.
src/mcp_server/tools/vecstore.py:67
↓ 5 callersFunctionvalidate_chunk_id
Validate chunk ID format to prevent path traversal. Allows: alphanumeric, hyphens, underscores, dots, ampersands. Blocks: slashes, "..",
src/mcp_server/tools/fileutil.py:72
↓ 4 callersFunction_add_active_chunk
Create an active chunk file + index entry old enough to archive.
tests/test_retention_semantic.py:71
↓ 4 callersMethod_create_chunk
Helper to create a chunk for testing.
tests/test_grep_fuzzy.py:171
↓ 4 callersMethod_create_chunk
Helper to create a chunk file and index entry.
tests/test_temporal_filter.py:177
↓ 4 callersMethod_write_chunk
(self, chunks_dir: Path, filename: str, content: str)
tests/test_semantic.py:299
↓ 4 callersFunctionget_archive_candidates
Get list of chunks eligible for archiving. A chunk is an archive candidate if: - Age > ARCHIVE_AFTER_DAYS (30 days) - access_count =
src/mcp_server/tools/retention.py:158
↓ 4 callersFunctionlist_chunks
List all available chunks with their metadata. Use this to see what conversation history is available in external storage. Args:
src/mcp_server/tools/navigation.py:1032
↓ 4 callersFunctiont
Get translated string for current language.
hooks/i18n.py:95
↓ 3 callersMethod_create_chunk
Helper to create a chunk.
tests/test_grep_fuzzy.py:398
↓ 3 callersMethod_extract_content
Extract content from a chunk file, skipping YAML header. Phase 8.1: Prepends summary, tags, project, and domain from the YAM
src/mcp_server/tools/search.py:54
↓ 3 callersFunction_hybrid_search
Perform semantic vector search if available. Returns None if semantic search is not available (deps missing), allowing the caller to fall bac
src/mcp_server/tools/search.py:273
↓ 3 callersFunction_load_purge_log
Load purge log from JSON file.
src/mcp_server/tools/retention.py:89
↓ 3 callersFunction_save_archive_index
Save archive index atomically.
src/mcp_server/tools/retention.py:84
↓ 3 callersFunction_save_sessions
Save sessions index atomically.
src/mcp_server/tools/sessions.py:26
↓ 3 callersMethodbuild_index
Build BM25 index from all chunks and optionally insights. Reads all .md files in chunks directory, tokenizes content, and bu
src/mcp_server/tools/search.py:129
↓ 3 callersFunctionpeek
Read content from a chunk file. Use this to view the contents of a previously saved chunk. Can read the whole chunk or just a portion (b
src/mcp_server/tools/navigation.py:714
↓ 3 callersFunctionpurge_chunk
Permanently delete an archived chunk. Steps: 1. Find in archive index 2. Log metadata to purge_log.json (NOT content) 3. Remove
src/mcp_server/tools/retention.py:514
↓ 3 callersMethodremove
(self, chunk_id)
tests/test_retention_semantic.py:27
↓ 3 callersFunctionretention_preview
Preview retention actions without executing. Shows what would be archived or purged based on current rules. Returns: Dictionary
src/mcp_server/tools/retention.py:589
↓ 3 callersFunctionsafe_path
Build a safe file path from chunk ID, validating against traversal. Args: base_dir: The directory the file must remain within
src/mcp_server/tools/fileutil.py:90
↓ 2 callersMethod_create_chunk
Helper to create a chunk.
tests/test_grep_fuzzy.py:253
↓ 2 callersMethod_create_chunk
(self, chunk_id: str, content: str, created_at: str)
tests/test_temporal_filter.py:318
↓ 2 callersMethod_create_chunk
Helper to create a chunk file and index entry.
tests/test_temporal_filter.py:418
↓ 2 callersFunction_detect_project
Auto-detect project name from environment or git (Phase 5.5). Priority: 1. RLM_PROJECT environment variable (explicit override) 2. G
src/mcp_server/tools/navigation.py:56
↓ 2 callersFunction_make_chunks
Create one chunk per date, all containing the term 'deployment', appended to the index in chronological (oldest-first) order.
tests/test_grep_ordering.py:26
↓ 2 callersFunction_save_index
Save chunks index atomically.
src/mcp_server/tools/retention.py:66
↓ 2 callersFunction_save_memory
Save session memory atomically.
src/mcp_server/tools/memory.py:36
↓ 2 callersFunction_semantic_remove
Drop a chunk's vector from the semantic store. Never raises.
src/mcp_server/tools/retention.py:262
↓ 2 callersFunctionextract_content
Extract content from a chunk file, enriched with YAML metadata. Phase 8.1: Prepends summary and tags from YAML header to improve embedding qu
scripts/backfill_embeddings.py:30
↓ 2 callersFunctionforget
Remove an insight from memory. Args: insight_id: The ID of the insight to remove Returns: Confirmation of removal
src/mcp_server/tools/memory.py:172
↓ 2 callersFunctionget_purge_candidates
Get list of archived chunks eligible for purging. A chunk is a purge candidate if: - In archive for > PURGE_AFTER_DAYS (180 days) -
src/mcp_server/tools/retention.py:208
↓ 2 callersFunctiongrep
Search for a pattern across all chunks. Use this to find where a topic was discussed or where specific information is stored. Phase
src/mcp_server/tools/navigation.py:796
↓ 2 callersFunctionlist_domains
List all available domains from domains.json. Returns: dict with domains organized by category
src/mcp_server/tools/sessions.py:198
↓ 2 callersFunctionlist_sessions
List available sessions with optional filtering. Args: project: Filter by project name domain: Filter by domain limi
src/mcp_server/tools/sessions.py:162
↓ 2 callersMethodload
(self)
tests/test_retention_semantic.py:24
↓ 2 callersFunctionmain
Entry point for the MCP RLM server.
src/mcp_server/server.py:673
↓ 2 callersFunctionmemory_status
Get current status of the memory system. Returns: Statistics about stored insights
src/mcp_server/tools/memory.py:199
↓ 2 callersFunctionrecall
Retrieve insights from memory. Use this to: - Find information discussed earlier in conversation - Review decisions made - Check
src/mcp_server/tools/memory.py:95
↓ 2 callersFunctionremember
Save an important insight to persistent memory. Use this to remember: - Key decisions made during conversation - Important facts dis
src/mcp_server/tools/memory.py:49
↓ 2 callersMethodremove
Remove a chunk's vector. Args: chunk_id: The chunk identifier to remove Returns: True if found and removed,
src/mcp_server/tools/vecstore.py:118
↓ 2 callersFunctionrestore
Restore an archived chunk back to active storage. Args: chunk_id: ID of the archived chunk Returns: Dictionary with sta
src/mcp_server/tools/retention.py:669
↓ 2 callersMethodsearch
Search for nearest vectors using cosine similarity. Args: query_vec: 1D numpy array (query embedding) top_k: Maximum
src/mcp_server/tools/vecstore.py:140
↓ 1 callersFunction_active_ids
()
scripts/reconcile_stores.py:56
↓ 1 callersFunction_archived_ids
()
scripts/reconcile_stores.py:60
↓ 1 callersFunction_auto_summarize
Generate automatic summary from content (Phase 4.1). Extracts the first non-empty line as summary. If too long, truncates with ellipsis.
src/mcp_server/tools/navigation.py:181
↓ 1 callersFunction_check_duplicate
Check if content with this hash already exists (Phase 4.2). Args: content_hash: MD5 hash of normalized content Returns:
src/mcp_server/tools/navigation.py:426
↓ 1 callersFunction_content_hash
Generate hash of normalized content for duplicate detection (Phase 4.2). Normalizes whitespace and lowercases before hashing to catch ne
src/mcp_server/tools/navigation.py:214
↓ 1 callersFunction_estimate_tokens
Rough token estimation (1 token ~ 4 chars for French/English).
src/mcp_server/tools/navigation.py:171
↓ 1 callersMethod_extract_summary
Extract summary from chunk YAML header. Args: chunk_file: Path to the chunk .md file Returns: Summa
src/mcp_server/tools/search.py:110
↓ 1 callersFunction_generate_chunk_id
Generate a unique chunk ID (Phase 5.5 enhanced). Format 2.0: {date}_{project}_{seq}[_{ticket}][_{domain}] Args: project: Projec
src/mcp_server/tools/navigation.py:473
↓ 1 callersFunction_generate_id
Generate a short unique ID for an insight.
src/mcp_server/tools/memory.py:43
↓ 1 callersFunction_increment_access
Increment access counter for a chunk (Phase 4.3). Uses file locking to prevent race conditions on concurrent access. Args: chun
src/mcp_server/tools/navigation.py:445
↓ 1 callersFunction_load_domains
Load domains configuration from disk. Creates default if not exists.
src/mcp_server/tools/sessions.py:31
↓ 1 callersFunction_save_index
Save chunks index atomically.
src/mcp_server/tools/navigation.py:164
↓ 1 callersFunction_save_purge_log
Save purge log atomically.
src/mcp_server/tools/retention.py:102
↓ 1 callersFunction_semantic_add
(Re)embed a restored chunk into the semantic store. Never raises. Mirrors the enrichment used at chunk creation time (tags + summary + body)
src/mcp_server/tools/retention.py:274
↓ 1 callersFunction_ts
()
scripts/reconcile_stores.py:52
↓ 1 callersFunctionadd_chunk_to_session
Add a chunk ID to a session's chunk list. Args: chunk_id: The chunk ID to add session_id: Target session (uses current if no
src/mcp_server/tools/sessions.py:130
↓ 1 callersFunctionatomic_write_text
Write text file atomically using write-to-temp-then-rename. Args: filepath: Target file path content: Text content to write
src/mcp_server/tools/fileutil.py:145
↓ 1 callersFunctionbenchmark_provider
Run full benchmark for one provider.
scripts/benchmark_providers.py:90
↓ 1 callersFunctioncompare_results
Compare search results between providers.
scripts/benchmark_providers.py:162
↓ 1 callersFunctionextract_content
Extract content from a chunk file, skipping YAML header.
scripts/benchmark_providers.py:45
↓ 1 callersFunctionget_context_percentage
Read context usage from stdin (passed by Claude Code).
hooks/pre_compact_chunk.py:22
↓ 1 callersFunctiongrep_fuzzy
Fuzzy grep - find matches even with typos (Phase 5.2). Uses thefuzz library for approximate string matching. Tolerates typos like "valid
src/mcp_server/tools/navigation.py:924
↓ 1 callersFunctionis_memory_path
Check if the target file is in an auto-memory directory.
hooks/memory_write_redirect.py:27
↓ 1 callersFunctionload_chunks
Load all chunks (id, content) from index.
scripts/benchmark_providers.py:61
↓ 1 callersFunctionlocked_json_update
Context manager for locked read-modify-write on a JSON file. Acquires an exclusive lock, yields the data for modification, then writes b
src/mcp_server/tools/fileutil.py:169
↓ 1 callersFunctionmain
Entry point for the MCP RLM server.
mcp_server/server.py:673
↓ 1 callersFunctionmain
()
scripts/backfill_embeddings.py:68
↓ 1 callersFunctionmain
()
scripts/benchmark_providers.py:213
↓ 1 callersFunctionmain
()
scripts/backfill_entities.py:91
↓ 1 callersFunctionmain
()
scripts/reconcile_stores.py:64
next →1–100 of 334, ranked by callers