Lex
v1.0.2Episodic memory and architectural policy for AI agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
atlas_analyze
Analyze code structure and dependencies across modules. Alias: code_atlas (deprecated)
| Parameter | Type | Description |
|---|---|---|
foldRadius | number | Neighborhood depth (default: 1) |
seedModules | array | List of module IDs to analyze |
contradictions_scan
Scan frames for potential contradictions (conflicting information across frames). Returns pairs of frames with detected conflicts and confidence scores.
| Parameter | Type | Description |
|---|---|---|
limit | number | Maximum number of frames to scan (default: 10000) |
module | string | Optional module ID filter to limit scan to specific module |
db_stats
Get database statistics including frame count, storage size, and activity metrics. Useful for understanding memory usage and recent activity.
| Parameter | Type | Description |
|---|---|---|
detailed | boolean | Include detailed module distribution (default: false) |
frame_create
Store a Frame (episodic memory snapshot). Alias: remember (deprecated)
| Parameter | Type | Description |
|---|---|---|
module_scope * | array | Module IDs from lexmap.policy.json (e.g., ["auth/core", "auth/password"]) |
reference_point * | string | What you were working on (e.g., "refactoring UserAuth module") |
status_snapshot * | object | Current state: {next_action: string, blockers?: [], merge_blockers?: [], tests_failing?: []} |
summary_caption * | string | One-line summary of progress (e.g., "Extracted password validation to separate function") |
atlas_frame_id | string | Reference to Atlas Frame (fold radius snapshot) |
branch | string | Git branch (defaults to current branch) |
images | array | Optional array of image attachments (base64-encoded with MIME type) |
jira | string | Optional Jira/issue ticket (e.g., "PROJ-123") |
keywords | array | Optional search tags (e.g., ["refactoring", "authentication"]) |
request_id | string | Optional idempotency key. If provided, duplicate calls with the same request_id will return the cached response instead of creating a new frame. Useful for safely retrying tool calls. |
frame_get
Retrieve a specific frame by ID. Use when you know the exact frame ID. Alias: get_frame (deprecated)
| Parameter | Type | Description |
|---|---|---|
frame_id * | string | Frame ID to retrieve (e.g., from remember response or passed context) |
format | string | Output format: 'full' (default) or 'compact' for small-context agents |
include_atlas | boolean | Include Atlas Frame neighborhood in response (default: true) |
frame_list
List recent Frames, optionally filtered by branch or module. Returns Frame + Atlas Frame for each result. Alias: list_frames (deprecated)
| Parameter | Type | Description |
|---|---|---|
branch | string | Filter by git branch |
cursor | string | Opaque cursor for pagination - use nextCursor from previous response to get next page |
format | string | Output format: 'full' (default) or 'compact' for small-context agents |
limit | number | Max results to return (default: 10) |
module | string | Filter by module ID in module_scope |
since | string | ISO 8601 timestamp - only return Frames after this time |
frame_search
Search Frames by reference point, branch, or Jira ticket. Returns Frame + Atlas Frame neighborhood. Alias: recall (deprecated)
| Parameter | Type | Description |
|---|---|---|
branch | string | Filter by git branch |
format | string | Output format: 'full' (default) or 'compact' for small-context agents |
jira | string | Exact match on Jira ticket |
limit | number | Max results to return (default: 10) |
mode | string | Search mode: 'all' (AND - all terms must match, default) or 'any' (OR - any term can match) |
reference_point | string | Fuzzy search on what you were working on |
frame_validate
Validate frame input without storing (dry-run validation). Alias: validate_remember (deprecated)
| Parameter | Type | Description |
|---|---|---|
module_scope * | array | Module IDs from lexmap.policy.json (e.g., ["auth/core", "auth/password"]) |
reference_point * | string | What you were working on (e.g., "refactoring UserAuth module") |
status_snapshot * | object | Current state: {next_action: string, blockers?: [], merge_blockers?: [], tests_failing?: []} |
summary_caption * | string | One-line summary of progress (e.g., "Extracted password validation to separate function") |
atlas_frame_id | string | Reference to Atlas Frame (fold radius snapshot) |
branch | string | Git branch (defaults to current branch) |
images | array | Optional array of image attachments (base64-encoded with MIME type) |
jira | string | Optional Jira/issue ticket (e.g., "PROJ-123") |
keywords | array | Optional search tags (e.g., ["refactoring", "authentication"]) |
help
Get usage help for Lex MCP tools including examples, required fields, related tools, and common workflows. Use this to understand how to use Lex tools effectively.
| Parameter | Type | Description |
|---|---|---|
examples | boolean | Include executable examples in the response (default: true) |
format | string | Output format: 'full' (default) or 'micro' for ultra-compact examples |
tool | string | Tool name to get help for (optional - returns all tools if omitted). Valid values: remember, validate_remember, recall, get_frame, list_frames, policy_check, timeline, code_atlas, introspect, help |
hints_get
Retrieve hint details by hint ID. Hints are stable, cacheable advice snippets for error recovery. Hint IDs are provided in compact error responses (hintId field). Fetch hints once and cache them to minimize token usage. Alias: get_hints (deprecated)
| Parameter | Type | Description |
|---|---|---|
hintIds * | array | Array of hint IDs to retrieve (e.g., ['hint_mod_invalid_001']) |
policy_check
Validate code against policy rules from lexmap.policy.json
| Parameter | Type | Description |
|---|---|---|
path | string | Path to check (defaults to current directory) |
policyPath | string | Path to policy file (defaults to lexmap.policy.json) |
strict | boolean | Fail on warnings (default: false) |
system_introspect
Discover the current state of Lex (available modules, policy, frame count, capabilities, error codes with metadata). Returns error code categories (validation, storage, policy, internal) and retryability hints for autonomous error handling. Alias: introspect (deprecated)
| Parameter | Type | Description |
|---|---|---|
format | string | Output format: 'full' (default) or 'compact' for small-context agents |
timeline_show
Show visual timeline of Frame evolution for a ticket or branch. Alias: timeline (deprecated)
| Parameter | Type | Description |
|---|---|---|
ticketOrBranch * | string | Ticket ID or branch name to show timeline for |
format | string | Output format (default: text). 'compact' returns JSON with abbreviated fields for small-context agents. |
since | string | Filter frames since this date (ISO 8601) |
until | string | Filter frames until this date (ISO 8601) |
turncost_calculate
Calculate Turn Cost governance metrics for a time period. Returns frame count, estimated tokens, and prompt count to help measure coordination overhead.
| Parameter | Type | Description |
|---|---|---|
period | string | Time period for metrics. Format: duration string (e.g., '24h', '7d', '30d') or ISO 8601 timestamp. Default: '24h' |