Self-hosted homelab log intelligence over MCP, CLI, and REST with SQLite/FTS. Aggregates syslog, Docker, OTLP, and AI transcripts for log analysis and investigation.
Static source inference · medium confidence · evidence: Streamable HTTP
Current-spec patterns detected
Summary
Cortex presents a severely underdeveloped tool interface. It exposes a single monolithic 'cortex' tool with 50+ action strings, an anti-pattern that violates fundamental tool composition principles. The tool definition lacks critical structure: parameter descriptions exist only as placeholders ('Search logs query parameters', 'Filter logs query parameters', etc.) without specifying what fields those objects contain, valid ranges, or constraints. No input schema details are visible beyond top-level parameter names. Output schemas are entirely undocumented. The single tool name 'cortex' is generic and fails to convey action (pattern:tool violation). The description attempts to list 50+ actions inline, which is not how LLMs parse tool intent, they expect per-action tools with specific names like 'search_logs', 'filter_logs', 'tail_logs'. This design forces the LLM to guess which 'action' string to pass and which parameters apply to that action, leading to hallucinated payloads. There is no error handling guidance, no output field documentation, and no indication of which parameters are required vs optional. The tool is registered but the schema definition is skeletal.
Single monolithic tool with 50+ embedded actions violates single-responsibility principle. LLMs cannot infer which action to invoke or how to map parameters without explicit per-action tool registration.
Tool name 'cortex' is generic and does not start with an action verb. Names like 'cortex' provide no signal to LLMs about what the tool does. Should be split into verb_noun tools: search_logs, filter_logs, tail_logs, get_errors, list_hosts, correlate_events, analyze_ai, etc.
Parameter descriptions are generic placeholders (e.g., 'Search logs query parameters', 'Filter logs query parameters') that do not explain what fields the objects contain, which are required, what formats are valid, or what constraints apply. LLMs cannot reason about these parameters.
Split the monolithic 'cortex' tool into 50+ independent tools with verb_noun names: search_logs, filter_logs, tail_logs, get_errors, list_hosts, map_homelab, get_host_state, get_fleet_state, correlate_events, correlate_state, analyze_ai_correlate, get_usage_blocks, get_project_context, list_ai_tools, list_ai_projects, get_timeline, detect_patterns, get_context, get_log, get_ingest_rate, detect_silent_hosts, detect_clock_skew, detect_anomalies, compare_data, ack_error, unack_error, get_file_tails, test_notifications, list_llm_invocations, find_similar_incidents, get_ask_history, get_incident_context, get_graph, get_artifact_evidence, record_artifact_evidence, list_skill_events, list_skill_incidents, investigate_skill, list_mcp_events, list_mcp_incidents, investigate_mcp, list_hook_events, list_hook_incidents, investigate_hook, get_compose_status, diagnose_compose, list_unaddressed_errors, get_notifications, and a help_cortex tool for discovering available actions.
For each new tool, write a 50 - 200 character description that clearly states what it does, when to use it, and what it returns. Example: 'search_logs: Search log entries by query terms. Returns matching logs with timestamps, hosts, and severity. Use this to find events matching a condition.' Avoid action verb lists in descriptions.
Define strict input schemas for each tool. For example, search_logs might accept: query (string, required, 1 - 500 chars), limit (integer, 1 - 1000, default 100), offset (integer, ≥0, default 0), time_range (string or object with start_time and end_time), severity (enum: trace|debug|info|warn|error|fatal). Every field must have a description.
Score history
Overall score trend
First recorded score · v2 rubric
38/100
Scored
Grade
Overall
Spec posture
Rubric
2026-09-22
F
38
2026-07-28+
v2
No output schema documented. The tool returns unspecified results. LLMs cannot know what fields to expect, how to chain results into subsequent calls, or what data types are returned.
Nested object parameters (search, filter, tail, errors, etc.) lack any schema definition. It is unclear what fields each object accepts, whether they are required, what data types are valid, or what ranges/enums are enforced.
The 'action' parameter is a free-form string with 50+ hardcoded values listed in the description. This should be an enum type with all valid actions explicitly defined in the schema, not prose.
No error handling guidance. If a search fails or an action is unsupported, there is no documentation of error codes, recovery steps, or what the LLM should try next.
Tool description lists 50+ actions inline, which is not user-friendly and does not match how LLMs reason about tool selection. A single line naming the tool cannot convey all 50 actions.
cortex
Document the output schema for each tool. Example for search_logs: { logs: [{ timestamp: string (ISO 8601), host: string, severity: string, message: string, tags?: string[] }], total_count: integer, has_more: boolean }. Include field types, required vs optional status, and format constraints.
For multi-field parameters (e.g., correlate_events), expand the schema to define each sub-field. Do not use generic descriptions like 'Correlate events query parameters'. Be specific: { time_range: { start_time: string (ISO 8601), end_time: string (ISO 8601) }, event_types: string[] (enum: error|warning|info), max_results: integer (1 - 100, default 50) }.
Add error handling guidance to each tool. Example: 'search_logs: Returns 400 if query is empty or exceeds 500 chars. Returns 404 if no logs match the query (try broadening the time range). Returns 500 if the database is unavailable (retry in 30 seconds).'
For the 'action' parameter (if you keep the monolithic design temporarily), convert the free-form string to a strict enum in the JSON Schema. However, this is a temporary measure, splitting into individual tools is the correct long-term fix.
Define pagination for tools that return lists. Every list should accept limit and offset (or cursor) parameters and return total_count and has_more. Cap default limit at 100 and maximum at 1000 to prevent context window exhaustion.
Add required vs optional status to all parameters. Mark commonly omitted parameters as optional with sensible defaults (e.g., limit defaults to 100, sort defaults to 'time_desc').
Document parameter constraints in descriptions. Example: 'time_range: An ISO 8601 string or object with start_time and end_time. Range must be ≤30 days. Required for searches spanning >1 day.' This prevents LLMs from passing invalid values.