feat: add signoz_execute_clickhouse_query MCP tool via v3 API#62
Open
nilaydown wants to merge 1 commit intoSigNoz:mainfrom
Open
feat: add signoz_execute_clickhouse_query MCP tool via v3 API#62nilaydown wants to merge 1 commit intoSigNoz:mainfrom
signoz_execute_clickhouse_query MCP tool via v3 API#62nilaydown wants to merge 1 commit intoSigNoz:mainfrom
Conversation
Made-with: Cursor
signoz_execute_clickhouse_query MCP tool via v3 API
Author
|
Hi! This PR adds the ClickHouse SQL v3 query tool. Could someone please approve the workflow and take a look when convenient? Thanks! |
Author
|
@pradeepitm12 thanks for the workflow approval! Could you review the PR as well? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
signoz_execute_clickhouse_queryMCP tool to run raw ClickHouse SQL via SigNoz/api/v3/query_range.Problem
The existing MCP tools expose high-level query builder and aggregation flows, but do not support arbitrary ClickHouse SQL. For complex analyses, schema exploration, or existing SQL workflows, users must leave their MCP client and run queries elsewhere, breaking the AI-assisted workflow and limiting advanced use cases.
Solution
signoz_execute_clickhouse_querythat:/api/v3/query_range.{{.start_timestamp}},{{.end_timestamp}}(Unix seconds){{.start_datetime}},{{.end_datetime}}(UTC datetime strings)timeRangeor explicitstart/end, and defaults to last 1 day if none are provided.Test plan
/api/v3/query_rangewith the expected payload.signoz_execute_clickhouse_queryis registered and callable from MCP clients.{{.start_timestamp}}/{{.end_timestamp}}and datetime variants across differenttimeRangevalues.