Lex

v1.0.2
io.github.Guffawaffle/lex Checked 4 hours ago Published 11 months ago

Episodic 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)

ParameterTypeDescription
foldRadiusnumberNeighborhood depth (default: 1)
seedModulesarrayList 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.

ParameterTypeDescription
limitnumberMaximum number of frames to scan (default: 10000)
modulestringOptional 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.

ParameterTypeDescription
detailedbooleanInclude detailed module distribution (default: false)

frame_create

Store a Frame (episodic memory snapshot). Alias: remember (deprecated)

ParameterTypeDescription
module_scope *arrayModule IDs from lexmap.policy.json (e.g., ["auth/core", "auth/password"])
reference_point *stringWhat you were working on (e.g., "refactoring UserAuth module")
status_snapshot *objectCurrent state: {next_action: string, blockers?: [], merge_blockers?: [], tests_failing?: []}
summary_caption *stringOne-line summary of progress (e.g., "Extracted password validation to separate function")
atlas_frame_idstringReference to Atlas Frame (fold radius snapshot)
branchstringGit branch (defaults to current branch)
imagesarrayOptional array of image attachments (base64-encoded with MIME type)
jirastringOptional Jira/issue ticket (e.g., "PROJ-123")
keywordsarrayOptional search tags (e.g., ["refactoring", "authentication"])
request_idstringOptional 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)

ParameterTypeDescription
frame_id *stringFrame ID to retrieve (e.g., from remember response or passed context)
formatstringOutput format: 'full' (default) or 'compact' for small-context agents
include_atlasbooleanInclude 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)

ParameterTypeDescription
branchstringFilter by git branch
cursorstringOpaque cursor for pagination - use nextCursor from previous response to get next page
formatstringOutput format: 'full' (default) or 'compact' for small-context agents
limitnumberMax results to return (default: 10)
modulestringFilter by module ID in module_scope
sincestringISO 8601 timestamp - only return Frames after this time

frame_validate

Validate frame input without storing (dry-run validation). Alias: validate_remember (deprecated)

ParameterTypeDescription
module_scope *arrayModule IDs from lexmap.policy.json (e.g., ["auth/core", "auth/password"])
reference_point *stringWhat you were working on (e.g., "refactoring UserAuth module")
status_snapshot *objectCurrent state: {next_action: string, blockers?: [], merge_blockers?: [], tests_failing?: []}
summary_caption *stringOne-line summary of progress (e.g., "Extracted password validation to separate function")
atlas_frame_idstringReference to Atlas Frame (fold radius snapshot)
branchstringGit branch (defaults to current branch)
imagesarrayOptional array of image attachments (base64-encoded with MIME type)
jirastringOptional Jira/issue ticket (e.g., "PROJ-123")
keywordsarrayOptional 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.

ParameterTypeDescription
examplesbooleanInclude executable examples in the response (default: true)
formatstringOutput format: 'full' (default) or 'micro' for ultra-compact examples
toolstringTool 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)

ParameterTypeDescription
hintIds *arrayArray of hint IDs to retrieve (e.g., ['hint_mod_invalid_001'])

policy_check

Validate code against policy rules from lexmap.policy.json

ParameterTypeDescription
pathstringPath to check (defaults to current directory)
policyPathstringPath to policy file (defaults to lexmap.policy.json)
strictbooleanFail 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)

ParameterTypeDescription
formatstringOutput 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)

ParameterTypeDescription
ticketOrBranch *stringTicket ID or branch name to show timeline for
formatstringOutput format (default: text). 'compact' returns JSON with abbreviated fields for small-context agents.
sincestringFilter frames since this date (ISO 8601)
untilstringFilter 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.

ParameterTypeDescription
periodstringTime period for metrics. Format: duration string (e.g., '24h', '7d', '30d') or ISO 8601 timestamp. Default: '24h'