Root Trace — VS Code Extension
Root Trace is a one-stop solution for root cause analysis of Elvis tickets. It
combines AI agents, an MCP server for Elvis ticket access, and a powerful
log extraction & processing engine — all configured from a single sidebar panel.
Overview
Root Trace brings three capabilities together:
- AI Agents — Copilot agents that automate end-to-end log analysis and root
cause analysis directly from Elvis tickets.
- MCP Server & Tools — exposes Elvis ticket management to LLMs through the
Model Context Protocol (MCP) via a stdio-based
server with 7 tools usable by any MCP client (VS Code Copilot, Claude Desktop,
Cursor, …).
- Log Extraction & Processing — downloads ticket attachments, extracts
archives, decodes multiple log formats, and merges logcat files automatically.
The extension itself handles configuration only — it does not manage the MCP
server lifecycle (start / stop / restart), which is handled by VS Code's built-in
MCP support. It provides:
- Automatic environment detection — local Windows vs. remote Linux (SSH / WSL)
- Global MCP configuration — generates the user-level
mcp.json so the server
is available across all workspaces
- Secure credential storage — credentials piped via stdin to the bundled binary
which stores them in the OS Credential Manager
- Bundled AI agents — installs ready-to-use Copilot agents (see below)
- Sidebar panel — a dedicated activity bar panel for configuration and status
AI Agents
The extension bundles ready-to-use Copilot agents that build on the MCP tools
and the log extraction engine to automate root cause analysis directly from Elvis
tickets.
| Agent |
Description |
| Log Analysis Agent |
Analyzes logcat logs for Elvis tickets and performs root cause analysis on projection issues (Android Auto, CarPlay, iAP2, DCSM). Fetches tickets and attachments via the MCP tools, identifies involved modules, builds failure timelines, correlates events across modules, finds duplicates, and generates structured analysis reports under analysis/{ticket_id}.md. |
| Log Context Agent |
Scans the current Android workspace, discovers modules, extracts log tags from source code, and generates a complete .github context framework (copilot-instructions.md, tag-to-context.json) used by the Log Analysis Agent for accurate module identification. |
Usage
Invoke an agent from the Copilot chat agent picker, then provide input:
| Agent |
Example input |
Behavior |
| Log Analysis Agent |
3729542 |
Fetch ticket, download the first log attachment, run full analysis |
| Log Analysis Agent |
analyze all 3729542 |
Download all log attachments and analyze across all logs |
| Log Analysis Agent |
analyze logcat_2026.gz 3729542 |
Download and analyze a named attachment |
| Log Context Agent |
(no argument) |
Scan the open workspace and build the .github context framework |
Installation & updates
- Install or update the agents from the sidebar panel using the
Install / Update Agents action. They are copied to
~/.copilot/agents/,
making them available across all workspaces.
- Each agent file carries a
version in its frontmatter. The sidebar panel shows
whether the installed agents are up-to-date, outdated, or missing, so you can
re-run the action to update them.
When an attachment is downloaded, Root Trace automatically detects its type,
extracts archives (recursively), decodes supported log formats, and merges logcat
files into a single chronological timeline.
| Format |
Extensions |
| Tar (and compressed tar) |
.tar, .tar.gz / .tgz, .tar.bz2 / .tbz2, .tar.xz / .txz |
| Zip |
.zip |
| 7-Zip |
.7z |
| Split / multi-volume 7z |
.7z.001, .7z.002, … (auto-assembled before extraction) |
Archives are extracted recursively — archives nested inside archives are
unpacked automatically.
Supported log types
| Log type |
Detected by |
Processing |
| logcat |
logcat.txt, aplog* filenames |
Detected across all extracted files and merged into one chronological log |
| DLT (Diagnostic Log and Trace) |
.dlt |
Full multi-extractor decode in a single pass (see below) |
| esotrace |
.esotrace files / directories |
Decoded via the esotrace handler |
| btsnoop (Bluetooth HCI) |
magic-byte detection |
Decoded to a readable trace |
| pcap / tcpdump |
.pcap, .pcapng, .cap (or magic bytes) |
Decoded network capture |
| Plain text |
.txt, .log, .csv, .json, .xml, .html, .md |
Returned as-is |
A single pass over a .dlt file produces multiple categorized artifacts:
logcat.txt — Android logcat messages
btsnoop_decoded.tsv — Bluetooth HCI traffic
network_trace_decoded.tsv — NW_TRACE (SOME/IP, CAN, …)
errors_warnings.tsv — Fatal / Error / Warning messages
system_monitor.tsv — CPU / memory / thread stats
dlt_full.tsv — complete log timeline
- embedded file transfers — files carried inside the DLT stream
Merging multiple files
When a download or archive contains several logcat files, they are combined into a
single chronologically ordered log so the full timeline can be analyzed at once.
The MCP server provides 7 tools that any MCP-compatible client can invoke. The
server authenticates using credentials stored in the OS Credential Manager (Windows
Credential Manager / Linux keyring) — no credentials are passed via environment
variables or command-line arguments.
| Tool |
Description |
get_ticket_notes |
Retrieve notes/comments for a ticket (all or top N) |
get_ticket_details |
Get complete ticket details — description, notes, attachments, and metadata in one call |
list_ticket_attachments |
List all attachments for a ticket with filenames and download links |
download_elvis_attachment |
Download an attachment, auto-extract archives, and combine logcat files |
get_duplicates |
Find potential duplicate tickets using the duplicate-detection analysis API |
get_project_list |
List all available Elvis projects |
get_open_ticket_summary |
Get open tickets for a project with full details (supports partial project name matching) |
Error Codes
All tools return structured error responses with the following codes:
| Code |
Type |
Description |
| E001 |
Authentication error |
Elvis credentials are invalid |
| E002 |
Ticket not found |
The specified ticket ID does not exist |
| E003 |
Attachment not found |
The requested filename does not exist in the ticket |
| E004 |
Download error |
Network or file write issue during download |
| E005 |
Log processing error |
Archive extraction or logcat combining failed |
| E006 |
Connection error |
Cannot reach the Elvis API |
| E007 |
Validation error |
Invalid input (e.g., missing project name) |
The extension adds an Elvis MCP icon to the VS Code activity bar (left sidebar).
Clicking it opens the configuration panel.
Layout
┌──────────────────────────────────────────────┐
│ Elvis MCP Server [📋 log] │
│──────────────────────────────────────────────│
│ Status: ● Configured / Not Configured │
│ Environment: Local Windows / Remote Linux │
│ │
│ [ Configure MCP ] │
│──────────────────────────────────────────────│
│ UPDATE ELVIS CREDENTIALS │
│──────────────────────────────────────────────│
│ Username │
│ [ domain_username ] │
│ │
│ Password │
│ [ ******** ] [👁] │
│ │
│ Log Path │
│ [ C:\Users\...\elvis-mcp\logs ] [📁] │
│ │
│ [ Update configuration ] │
│ │
│ HINTS │
│ 1. If not configured → Configure MCP │
│ 2. If creds need update → Update config │
│ 3. If both done → start from MCP panel │
└──────────────────────────────────────────────┘
Sections
Title Bar
- Elvis MCP Server — extension title
- Log icon (top-right) — opens the Elvis MCP output channel showing
extension diagnostic messages
Status & Environment
- Status — shows
Configured (green dot) or Not Configured (red dot).
Configuration is detected by checking:
- The global
mcp.json contains a roottrace server entry
- The bundled binary exists at the resolved path
- Environment — auto-detected:
Local Windows — when running on a local Windows workspace
Remote Linux (SSH) — when connected via Remote-SSH or WSL
- Enabled when status is
Not Configured
- Disabled (greyed out, shows "Configured") when already configured
- Action: generates the global
mcp.json at the VS Code user-level config
path and opens the file for review
| Platform |
mcp.json Location |
| Windows |
%APPDATA%\Code\User\mcp.json |
| Linux |
~/.config/Code/User/mcp.json |
The generated entry contains only command + args — no credentials, no
environment variables:
{
"servers": {
"roottrace": {
"command": "<path-to-bundled-binary>",
"args": []
}
}
}
Update Elvis Credentials
Three form fields:
| Field |
Description |
Default |
| Username |
Elvis / domain username |
(saved from last entry) |
| Password |
Elvis / domain password |
(saved in VS Code SecretStorage) |
| Log Path |
Directory for downloaded attachments |
~/elvis-mcp/logs (platform-specific) |
- Eye icon — toggles password visibility
- Folder icon — opens a folder browser for Log Path
- Update configuration button — validates all fields, then pipes credentials
to the bundled binary via stdin (JSON). The binary stores them in the OS
Credential Manager using Python
keyring.
Hints
Contextual guidance displayed at the bottom of the panel:
- If not configured — click Configure MCP to generate the configuration.
- If credentials need updating — edit the fields and click Update configuration.
- If both are done — go to the MCP extension panel and start the server, or restart VS Code.
Commands
Available via Ctrl+Shift+P:
| Command |
Description |
Elvis MCP: Configure |
Generate / regenerate the global mcp.json |
Elvis MCP: Reconfigure Credentials |
Open the sidebar to update credentials |
Elvis MCP: Show Extension Log |
Open the Elvis MCP output channel |
Status Bar
A status bar item appears at the bottom-left of VS Code:
| State |
Display |
Tooltip |
| Configured |
✓ Elvis MCP [Local] |
"Elvis MCP is configured" |
| Not Configured |
⚠ Elvis MCP [Local] |
"Elvis MCP is not configured — click to configure" |
The environment label shows Local or Remote: ssh-remote depending on the
detected workspace.
Troubleshooting
Extension not activating
- Ensure the VSIX is installed (check Extensions sidebar)
- The extension activates on startup (
onStartupFinished) — reload VS Code
- Status shows "Configured" — the global
mcp.json already has the entry
- If you need to regenerate, use
Ctrl+Shift+P → Elvis MCP: Configure
Credentials not working
- Open the sidebar, update credentials, and click Update configuration
- Check the extension log (
Ctrl+Shift+P → Elvis MCP: Show Extension Log)
- Verify the binary exists at the expected path
Binary not found
- Check that
bin/win32/elvis-mcp-server.exe or bin/linux/elvis-mcp-server
exists in the extension directory
- For Remote-SSH, ensure the extension is installed on the remote host
License
See LICENSE file for details.