|
| 1 | +# Tools |
| 2 | + |
| 3 | +> Complete reference of MCP tools provided by the CodeQL Development MCP Server. |
| 4 | +
|
| 5 | +## Overview |
| 6 | + |
| 7 | +The server exposes **34 always-on tools** and **11 optional monitoring tools**. Always-on tools are available in every session; monitoring tools require explicit opt-in (see [Monitoring and Reporting](../mcp-server-monitoring-and-reporting.md)). |
| 8 | + |
| 9 | +## Always-On Tools |
| 10 | + |
| 11 | +### CodeQL CLI Tools |
| 12 | + |
| 13 | +| Tool | Description | |
| 14 | +| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | |
| 15 | +| `codeql_bqrs_decode` | Decode BQRS result files to human-readable formats | |
| 16 | +| `codeql_bqrs_info` | Get metadata and information about BQRS result files | |
| 17 | +| `codeql_bqrs_interpret` | Interpret BQRS result files according to query metadata and generate output in specified formats (CSV, SARIF, graph formats) | |
| 18 | +| `codeql_database_analyze` | Run queries or query suites against CodeQL databases | |
| 19 | +| `codeql_database_create` | Create a CodeQL database from source code | |
| 20 | +| `codeql_generate_log-summary` | Create a summary of a structured JSON evaluator event log file | |
| 21 | +| `codeql_generate_query-help` | Generate query help documentation from QLDoc comments | |
| 22 | +| `codeql_pack_install` | Install CodeQL pack dependencies | |
| 23 | +| `codeql_pack_ls` | List CodeQL packs under some local directory path | |
| 24 | +| `codeql_query_compile` | Compile and validate CodeQL queries | |
| 25 | +| `codeql_query_format` | Automatically format CodeQL source code files | |
| 26 | +| `codeql_query_run` | Execute a CodeQL query against a database | |
| 27 | +| `codeql_resolve_database` | Resolve database path and validate database structure | |
| 28 | +| `codeql_resolve_languages` | List installed CodeQL extractor packs | |
| 29 | +| `codeql_resolve_library-path` | Resolve library path for CodeQL queries and libraries | |
| 30 | +| `codeql_resolve_metadata` | Resolve and return the key-value metadata pairs from a CodeQL query source file | |
| 31 | +| `codeql_resolve_qlref` | Resolve qlref files to their corresponding query files | |
| 32 | +| `codeql_resolve_queries` | List available CodeQL queries found on the local filesystem | |
| 33 | +| `codeql_resolve_tests` | Resolve the local filesystem paths of unit tests and/or queries under some base directory | |
| 34 | +| `codeql_test_accept` | Accept new test results as the expected baseline | |
| 35 | +| `codeql_test_extract` | Extract test databases for CodeQL query tests | |
| 36 | +| `codeql_test_run` | Run CodeQL query tests | |
| 37 | + |
| 38 | +### Language Server Protocol (LSP) Tools |
| 39 | + |
| 40 | +| Tool | Description | |
| 41 | +| ------------------------ | ----------------------------------------------------------------------------------------------- | |
| 42 | +| `codeql_lsp_completion` | Get code completions at a cursor position in a CodeQL file | |
| 43 | +| `codeql_lsp_definition` | Go to the definition of a CodeQL symbol at a given position | |
| 44 | +| `codeql_lsp_diagnostics` | Authoritative syntax and semantic validation of CodeQL (QL) code via the CodeQL Language Server | |
| 45 | +| `codeql_lsp_references` | Find all references to a CodeQL symbol at a given position | |
| 46 | + |
| 47 | +### Query Development Tools |
| 48 | + |
| 49 | +| Tool | Description | |
| 50 | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------ | |
| 51 | +| `create_codeql_query` | Create directory structure and files for a new CodeQL query with tests | |
| 52 | +| `find_class_position` | Find the start/end line and column of a class for quick evaluation | |
| 53 | +| `find_codeql_query_files` | Find and track all files and directories related to a CodeQL query, including resolved metadata | |
| 54 | +| `find_predicate_position` | Find the start/end line and column of a predicate for quick evaluation | |
| 55 | +| `profile_codeql_query` | Profile the performance of a CodeQL query run against a specific database by analyzing the evaluator log JSON file | |
| 56 | +| `quick_evaluate` | Quick evaluate either a class or a predicate in a CodeQL query for debugging | |
| 57 | +| `register_database` | Register a CodeQL database given a local path to the database directory | |
| 58 | +| `validate_codeql_query` | Quick heuristic validation for CodeQL query structure (does not compile the query) | |
| 59 | + |
| 60 | +## Optional Monitoring Tools |
| 61 | + |
| 62 | +These tools are disabled by default and require opt-in. See [Monitoring and Reporting](../mcp-server-monitoring-and-reporting.md) for details. |
| 63 | + |
| 64 | +### Session Management |
| 65 | + |
| 66 | +| Tool | Description | |
| 67 | +| ---------------------- | ------------------------------------------------------------ | |
| 68 | +| `session_end` | End a query development session with final status | |
| 69 | +| `session_get` | Get complete details of a specific query development session | |
| 70 | +| `session_list` | List query development sessions with optional filtering | |
| 71 | +| `session_update_state` | Update the current state of a query development session | |
| 72 | + |
| 73 | +### Session Analytics |
| 74 | + |
| 75 | +| Tool | Description | |
| 76 | +| --------------------------------- | ---------------------------------------------------------------- | |
| 77 | +| `session_calculate_current_score` | Calculate current quality score for a session based on its state | |
| 78 | +| `session_get_call_history` | Get MCP call history for a specific session | |
| 79 | +| `session_get_score_history` | Get quality score history for a specific session | |
| 80 | +| `session_get_test_history` | Get test execution history for a specific session | |
| 81 | + |
| 82 | +### Batch Operations |
| 83 | + |
| 84 | +| Tool | Description | |
| 85 | +| -------------------- | ----------------------------------------------------------------------- | |
| 86 | +| `sessions_aggregate` | Generate aggregate insights from multiple sessions based on filters | |
| 87 | +| `sessions_compare` | Compare multiple query development sessions across specified dimensions | |
| 88 | +| `sessions_export` | Export session data in specified format for external analysis | |
0 commit comments