You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The static MCP resources exposed by the server are currently only placeholder-quality content, providing little value to LLM clients consuming them. Now that PR #111 ensures the resources are actually available in VSIX deployments, the content needs to be rewritten for such MCP resources so that they are actually useful to the calling LLM.
Current resources
Resource
URI
Problem
Getting Started
codeql://learning/getting-started
Generic "what is CodeQL" blurb. Says nothing about the MCP server, its tools, its prompts, or how an LLM should interact with it. This should be the primary onboarding resource for any LLM client connecting to the server. This resource should also be renamed to server/overview instead of learning/getting-started.
Query Basics
codeql://learning/query-basics
A 15-line QL syntax snippet. Too thin to be useful — doesn't mention from/where/select semantics, @kind metadata, common QL patterns, or how to use the server's compilation and LSP tools together. This resource should also be renamed to server/queries instead of learning/query-basics.
Security Templates
codeql://templates/security
Contains exactly 2 examples (Go SQL injection, JS XSS). No guidance on how to adapt them, no coverage of other languages or vulnerability classes, and no reference to the TDD workflow the server supports.
Performance Patterns
codeql://patterns/performance
Two tiny examples ("efficient joins" and "early filtering") with no explanation. Missing: recursive predicate optimization, pragma[only_bind_into], pragma[noopt], cartesian product avoidance, monotonic aggregates, performance profiling via the server's profile_codeql_query tool, etc.
Additionally consider
Registering ql-test-driven-development.md as a resource — This file already exists at server/src/resources/ql-test-driven-development.md and contains the most complete TDD workflow documentation, but it is not registered as an MCP resource. It should be exposed (e.g. as codeql://learning/test-driven-development). This resource should be be more an overview of the theory of why test-driven-development makes LLMs more effective at developing ql code that is both syntactically and semantically correct, where existing MCP-provided prompts (e.g. ql_tdd_basic, ql_tdd_advanced) are intended to be used by the calling LLM to prompt itself to actually implement the steps of a "basic" or "advanced" test-driven-development workflow for a given CodeQL query to be created or improved. The ql-test-driven-development.md resource should not replace such prompts but rather provide an overview of QL TDD theory, including the value of using printed AST data for test code, as a means of giving improved context and grounding validations to the calling LLM ... with cross-links to the ql_tdd_* prompts and related tools.
Cross-linking resources with tool names and prompt names — Resources should mention specific tool names (e.g. codeql_query_compile, codeql_test_run) and prompt names (e.g. ql_tdd_basic, tools_query_workflow) so LLMs can discover and invoke them.
Language-specific resources — The per-language AST and security resources (loaded from ql/ directory) are separate from this issue but may benefit from a similar quality review.
New resources
server/prompts --> Resource to be kept up-to-date as an overview of "prompts" provided by the codeql-development-mcp-server. Similar to existing docs/ql-mcp/prompts.md repo doc.
server/tools --> Resource to be kept up-to-date as an overview of the "tools" provided by the codeql-development-mcp-server. Similar to existing docs/ql-mcp/tools.md repo doc, though the codeql://server/tools resource must not mention "opt-in" / "monitoring" tools as these are disabled by default and won't be available to the calling LLM.
What "useful" looks like
These resources are consumed by LLMs via the MCP resources/read protocol. They should be written for that audience:
**getting-started / server/overview ** — An MCP server usage guide: what tools are available, what prompts exist, what workflows are supported, and how to orchestrate them. Think of it as the resource an LLM reads on first connection to orient itself. Should cross-reference the server's 38 default tools, 11 prompts, and the TDD workflow.
**query-basics / server/queries ** — A practical reference for writing CodeQL queries using the server's tools: metadata annotations (@kind, @id, @severity), the from/where/select structure, common QL idioms, how to compile and validate via the available tools, and how .qlref/.expected test files work.
security-templates — Actionable templates covering multiple languages and vulnerability classes. Each template should explain how to adapt it, reference the TDD workflow, and note which MCP tools to use for testing and validation. Cover at least: taint tracking, dataflow configurations, source/sink/sanitizer patterns.
performance-patterns — Don't make stuff up here. Don't assume you know CodeQL query performance. Keep this resource minimal while pointing to the existing explain-codeql-query prompt (e.g. server/src/prompts/explain-codeql-query.prompt.md) and, especially, the profile_codeql_query_from_logs tool -- which is the primary means of evaluating the actual performance of a syntactically valid CodeQL query for the purpose of debugging and/or improving the "performance" of the evaluated CodeQL query or queries, where improving "performance" may mean "improving the runtime evaluation efficiency of query so that it runs faster" and/or "improving the results (output) of the query so that it finds exactly, and only, the expected results". The performance-patterns resource should, however, copy/embed some of the pre-validated concepts / content from the codeql_action_log_performance_review prompt from advanced-security/codeql-development-template.
Problem
The static MCP resources exposed by the server are currently only placeholder-quality content, providing little value to LLM clients consuming them. Now that PR #111 ensures the resources are actually available in VSIX deployments, the content needs to be rewritten for such MCP resources so that they are actually useful to the calling LLM.
Current resources
codeql://learning/getting-startedserver/overviewinstead oflearning/getting-started.codeql://learning/query-basicsfrom/where/selectsemantics,@kindmetadata, common QL patterns, or how to use the server's compilation and LSP tools together. This resource should also be renamed toserver/queriesinstead oflearning/query-basics.codeql://templates/securitycodeql://patterns/performancepragma[only_bind_into],pragma[noopt], cartesian product avoidance, monotonic aggregates, performance profiling via the server'sprofile_codeql_querytool, etc.Additionally consider
ql-test-driven-development.mdas a resource — This file already exists atserver/src/resources/ql-test-driven-development.mdand contains the most complete TDD workflow documentation, but it is not registered as an MCP resource. It should be exposed (e.g. ascodeql://learning/test-driven-development). This resource should be be more an overview of the theory of why test-driven-development makes LLMs more effective at developingqlcode that is both syntactically and semantically correct, where existing MCP-provided prompts (e.g.ql_tdd_basic,ql_tdd_advanced) are intended to be used by the calling LLM to prompt itself to actually implement the steps of a "basic" or "advanced" test-driven-development workflow for a given CodeQL query to be created or improved. Theql-test-driven-development.mdresource should not replace such prompts but rather provide an overview of QL TDD theory, including the value of using printed AST data for test code, as a means of giving improved context and grounding validations to the calling LLM ... with cross-links to theql_tdd_*prompts and related tools.codeql_query_compile,codeql_test_run) and prompt names (e.g.ql_tdd_basic,tools_query_workflow) so LLMs can discover and invoke them.ql/directory) are separate from this issue but may benefit from a similar quality review.New resources
server/prompts--> Resource to be kept up-to-date as an overview of "prompts" provided by thecodeql-development-mcp-server. Similar to existingdocs/ql-mcp/prompts.mdrepo doc.server/tools--> Resource to be kept up-to-date as an overview of the "tools" provided by thecodeql-development-mcp-server. Similar to existingdocs/ql-mcp/tools.mdrepo doc, though thecodeql://server/toolsresource must not mention "opt-in" / "monitoring" tools as these are disabled by default and won't be available to the calling LLM.What "useful" looks like
These resources are consumed by LLMs via the MCP
resources/readprotocol. They should be written for that audience:**
getting-started/server/overview** — An MCP server usage guide: what tools are available, what prompts exist, what workflows are supported, and how to orchestrate them. Think of it as the resource an LLM reads on first connection to orient itself. Should cross-reference the server's 38 default tools, 11 prompts, and the TDD workflow.**
query-basics/server/queries** — A practical reference for writing CodeQL queries using the server's tools: metadata annotations (@kind,@id,@severity), thefrom/where/selectstructure, common QL idioms, how to compile and validate via the available tools, and how.qlref/.expectedtest files work.security-templates— Actionable templates covering multiple languages and vulnerability classes. Each template should explain how to adapt it, reference the TDD workflow, and note which MCP tools to use for testing and validation. Cover at least: taint tracking, dataflow configurations, source/sink/sanitizer patterns.performance-patterns— Don't make stuff up here. Don't assume you know CodeQL query performance. Keep this resource minimal while pointing to the existingexplain-codeql-queryprompt (e.g.server/src/prompts/explain-codeql-query.prompt.md) and, especially, theprofile_codeql_query_from_logstool -- which is the primary means of evaluating the actual performance of a syntactically valid CodeQL query for the purpose of debugging and/or improving the "performance" of the evaluated CodeQL query or queries, where improving "performance" may mean "improving the runtime evaluation efficiency of query so that it runs faster" and/or "improving the results (output) of the query so that it finds exactly, and only, the expected results". Theperformance-patternsresource should, however, copy/embed some of the pre-validated concepts / content from the codeql_action_log_performance_review prompt fromadvanced-security/codeql-development-template.Context
server/src/lib/resources.ts.ql/viaserver/src/resources/language-resources.ts.Acceptance criteria
getting-started.mdserves as the primary MCP server orientation guide.ql-test-driven-development.mdis registered as a browsable MCP resource.npm run build-and-test).