How kennethadriann/vlml works
VLML turns GRID event exports into a DuckDB analytics model, then exposes structured metrics and reports through an MCP server for AI clients. The principal workflow is raw-event acquisition, parsing and loading, transformation into analytics tables, and report or SQL queries against that model. Distinct report modules cover match analysis, player profiles, scouting, and pattern detection. Edges reflect the pipeline orchestration and source-index references; some implementation details were not sampled, so uncertain links are omitted.
Main entry points: grid_client.py GRID GraphQL client · run_pipeline.py Pipeline orchestration · insights_tools.py Insight tool routing · manager.py DuckDB analytics store
Components 27
Data acquisition
- Event downloads
database/scripts/ingestion/file_download_client.py - Raw event acquisition
database/scripts/ingestion/download_raw_events.py - Event parsers
database/scripts/ingestion/parsers.py - Event classifiers
database/scripts/ingestion/classifiers.py - Atomic event loader
database/scripts/ingestion/db_loader.py - Raw data loading
database/scripts/ingestion/load_data.py
Analytics modeling
- Pipeline orchestration
database/scripts/orchestration/run_pipeline.py - Schema initialization
database/scripts/orchestration/init_schema.py - Table transformations
database/scripts/orchestration/run_transformations.py - DuckDB analytics store
src/vlml/db/manager.py
MCP interface
- MCP server
src/vlml/server.py - Insight tool routing
src/vlml/tools/insights_tools.py - SQL and database tools
src/vlml/tools/db_query_tools.py
Analytics and reports
- Shared data access
src/vlml/tools/common/data_fetch.py - Metric utilities
src/vlml/tools/common/metrics.py - Match analysis
src/vlml/tools/reports/match_analysis.py - Player profiling
src/vlml/tools/reports/player_profile.py - Scouting reports
src/vlml/tools/reports/scouting.py - Pattern detection
src/vlml/tools/reports/pattern_detection.py
GRID data access
- GRID GraphQL client
src/vlml/client/grid_client.py - GRID query definitions
src/vlml/client/queries.py - Team lookup tools
src/vlml/tools/team_tools.py - Player lookup tools
src/vlml/tools/player_tools.py - Tournament lookup tools
src/vlml/tools/tournament_tools.py
Other components
- Pipeline operator
- AI tool client
- GRID APIs
Connections 34
- Pipeline operator → Pipeline orchestration: runs pipeline
database/scripts/orchestration/run_pipeline.py - Pipeline orchestration → Schema initialization: initializes schema
database/scripts/orchestration/run_pipeline.py - Pipeline orchestration → Raw data loading: loads data
database/scripts/orchestration/run_pipeline.py - Pipeline orchestration → Table transformations: runs transforms
database/scripts/orchestration/run_pipeline.py - Pipeline orchestration → DuckDB analytics store: validates and reads
database/scripts/orchestration/run_pipeline.py - Raw event acquisition → Event downloads: downloads events
database/scripts/ingestion/download_raw_events.py - Raw event acquisition → GRID GraphQL client: queries metadata
database/scripts/ingestion/download_raw_events.py - Event downloads → GRID APIs: fetches files
- GRID GraphQL client → GRID APIs: sends GraphQL
src/vlml/client/grid_client.py - GRID GraphQL client → GRID query definitions: executes queries
- Raw data loading → Atomic event loader: loads raw data
database/scripts/ingestion/load_data.py - Atomic event loader → Event parsers: uses parsers
database/scripts/ingestion/db_loader.py - Atomic event loader → Event classifiers: uses classifiers
database/scripts/ingestion/db_loader.py - Atomic event loader → DuckDB analytics store: writes events
- Table transformations → DuckDB analytics store: transforms tables
- AI tool client → MCP server: invokes tools
README.md - MCP server → Insight tool routing: dispatches insights
src/vlml/server.py - MCP server → SQL and database tools: dispatches SQL
src/vlml/server.py - Insight tool routing → Match analysis: routes reports
- Insight tool routing → Player profiling: routes reports
- Insight tool routing → Scouting reports: routes reports
- Insight tool routing → Pattern detection: routes reports
- SQL and database tools → DuckDB analytics store: queries database
src/vlml/tools/db_query_tools.py - Match analysis → Shared data access: uses shared fetches
src/vlml/tools/reports/match_analysis.py - Player profiling → Shared data access: uses shared fetches
src/vlml/tools/reports/player_profile.py - Shared data access → DuckDB analytics store: queries analytics
src/vlml/tools/common/data_fetch.py - Shared data access → Metric utilities: uses SQL helpers
src/vlml/tools/common/data_fetch.py - Pattern detection → Match analysis: reuses analysis
src/vlml/tools/reports/pattern_detection.py - Pattern detection → Player profiling: reuses profiling
src/vlml/tools/reports/pattern_detection.py - Team lookup tools → GRID GraphQL client: queries GRID
src/vlml/tools/team_tools.py - Team lookup tools → GRID query definitions: uses query definitions
src/vlml/tools/team_tools.py - Player lookup tools → GRID GraphQL client: queries GRID
src/vlml/tools/player_tools.py - Tournament lookup tools → GRID GraphQL client: queries GRID
src/vlml/tools/tournament_tools.py - Tournament lookup tools → GRID query definitions: uses query definitions
src/vlml/tools/tournament_tools.py