Exposes the Dynatrace Query Language (DQL) knowledge base to MCP-aware agents as callable tools for searching DQL reference documentation and generating DQL queries using configured LLM providers.
Two tools with clear, actionable descriptions (194 - 250 chars, within baseline 34 - 392). Both have input schemas with typed parameters and descriptions. dql_search includes a default value (top_k=8) and clear use-case guidance. However, output schemas are undocumented (no structured return type declared), error handling is minimal (generic 'not found' message), and no tool annotations (readOnlyHint, idempotentHint) despite both being read-only. Parameter descriptions are adequate but lack format constraints (e.g., top_k range). No composition issues (tools are single-purpose), but missing recovery guidance for common failure modes.
Generate a complete, syntactically correct DQL query for the given request, using the configured LLM grounded in the knowledge base. Returns the DQL query plus a short explanation. Use dql_search instead if you want raw reference material to write the query yourself.
Search the Dynatrace Query Language (DQL) knowledge base and return the most relevant reference material: syntax rules, working query examples, common-mistake fixes, and this environment's metric keys / field schemas. Use this BEFORE writing any DQL so the query is grounded in correct syntax (metrics use `timeseries` not `fetch`, `by:{...}` needs braces, etc.) and real metric keys / field names instead of hallucinated ones.
Output schemas undocumented. Both tools return strings, but LLMs cannot infer structure (dql_search returns concatenated chunks with source attribution; dql_generate returns query + explanation). Documenting return format as structured JSON would enable better downstream parsing.
No tool annotations despite both being read-only. Adding readOnlyHint=true would signal to agents these are safe to call without side effects, enabling more aggressive caching and retry strategies.
Parameter top_k lacks range constraints. Description says 'default 8' but does not specify min/max (e.g., 1 - 50). Unbounded integers let LLMs pass absurd values (top_k=10000) that degrade performance.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | 2026-07-28+ | v2 |
Error handling lacks recovery guidance. dql_search returns 'No knowledge base content found. Has `dql_rag.py ingest` been run?', actionable for humans but not for LLMs. Should suggest fallback actions (e.g., 'Try a simpler question' or 'Check LLM configuration').
dql_generate has no dry-run or confirmation step. Generating and executing DQL queries can have side effects (data export, resource consumption). A confirm_before_execute pattern would prevent accidental misuse.