LLM-powered legal knowledge base compiler. Ingest legal documents, compile structured Obsidian wikis, query with natural language, lint for consistency.
LexWiki defines 7 tools with consistent naming (verb_noun pattern: lexwiki_*) and reasonable descriptions (avg ~150 chars). All tools have input schemas with type definitions. However, parameter descriptions are sparse or missing context. Output schemas are undocumented, LLMs cannot predict return structure. Error handling is minimal (mostly string returns with 'Error:' prefix). No tool annotations (readOnlyHint, destructiveHint). Composition is sound: tools chain logically (ingest → compile → query/lint/search). Security concern: file paths accepted as strings without validation, risking path traversal.
Compile raw documents into the structured legal wiki. Classifies documents, generates summaries with [[backlinks]], builds clause libraries, jurisdiction trackers, and indexes.
Ingest a legal document (PDF, DOCX, XLSX, PPTX, HTML, TXT) into the raw knowledge base. Extracts text to markdown and stores in vault/raw/.
Check the legal wiki for consistency issues. Detects: expired statute citations, inconsistent clause language, missing standard terms, broken backlinks, stale summaries.
List all pages in the wiki, optionally filtered by category. Args: category: Filter by type: "contracts", "statutes", "cases", "memos", "topics", "indexes"
Query the legal knowledge base using natural language. Uses the wiki's own indexes (no vector DB) to find relevant pages, then synthesizes an answer with [[page]] citations.
Output schemas undocumented. Tools return plain strings; LLMs cannot predict structure or chain results. E.g., lexwiki_query returns synthesized answer as string, but no schema for citations or confidence.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). LLMs cannot distinguish safe reads from destructive writes. lexwiki_ingest and lexwiki_compile modify state but lack destructiveHint.
Path traversal vulnerability. lexwiki_ingest, lexwiki_compile, and lexwiki_read_page accept file paths as strings without validation. An LLM could be tricked into reading/writing outside vault/ via '../../../etc/passwd'.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | 2026-07-28+ | v2 |
Read a specific wiki page by name. Args: page_name: Page name (e.g. "master-services-agreement") or relative path within wiki/.
Fast keyword search across wiki pages (BM25 ranking, no LLM call needed). Use this for quick lookups when you know what terms to search for. Faster and more reliable than lexwiki_query for simple searches. Args: keywords: Search terms (e.g. "termination clause", "liability cap") top_k: Number of results to return (default 10)
Parameter descriptions lack constraints. 'scope' in lexwiki_query says 'e.g. contracts, jurisdiction:UAE' but does not specify valid format, syntax, or enum. LLMs will hallucinate invalid scopes.
Error handling is minimal. Tools return 'Error: <message>' as plain strings. No recovery guidance, no categorization (retryable vs fatal). LLMs cannot decide whether to retry or escalate.