hny-mcp

MIT License
2
16
  • Linux
  • Apple

run_query

Execute Honeycomb queries to analyze and summarize observability data. Specify operations like COUNT, SUM, or P95, and group results using breakdowns. Follow specific rules to avoid errors, such as excluding the 'column' field for COUNT operations.

Instructions

Executes a Honeycomb query, returning results with statistical summaries.

CRITICAL RULE: For COUNT operations, NEVER include a "column" field in your calculation, even as null or undefined. Example: Use {"op": "COUNT"} NOT {"op": "COUNT", "column": "anything"}.

Additional Rules:

  1. All parameters must be at the TOP LEVEL (not nested inside a 'query' property)
  2. Field names must be exact - use 'op' (not 'operation'), 'breakdowns' (not 'group_by')
  3. Only use the exact operation names listed in the schema (e.g., use "P95" for 95th percentile, not "PERCENTILE")
  4. For all operations EXCEPT COUNT and CONCURRENCY, you must specify a "column" field

Input Schema

NameRequiredDescriptionDefault
breakdownsNoMUST use field name 'breakdowns' (not 'group_by'). Columns to group results by.
calculationsYes⚠️ CRITICAL RULE: For COUNT or CONCURRENCY operations, you MUST OMIT the 'column' field COMPLETELY - do not include it at all. For all other operations, the 'column' field is REQUIRED.
datasetYesThe dataset to query. Use __all__ to query across all datasets in the environment.
end_timeNoMUST use field name 'end_time' (with underscore). Absolute end timestamp in seconds.
environmentYesThe Honeycomb environment to query
filter_combinationNoMUST use field name 'filter_combination' (not 'combine_filters'). How to combine filters: AND or OR. Default: AND.
filtersNoMUST use field name 'filters' (an array of filter objects). Pre-calculation filters for the query.
granularityNoMUST use field name 'granularity'. Time resolution in seconds. 0 for auto.
havingsNoMUST use field name 'havings'. Post-calculation filters with same column rules as calculations.
limitNoMUST use field name 'limit'. Maximum number of result rows to return.
ordersNoMUST use field name 'orders' (not 'sort' or 'order_by'). Array of sort configurations.
start_timeNoMUST use field name 'start_time' (with underscore). Absolute start timestamp in seconds.
time_rangeNoMUST use field name 'time_range' (with underscore). Relative time range in seconds from now.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "breakdowns": { "description": "MUST use field name 'breakdowns' (not 'group_by'). Columns to group results by.", "items": { "minLength": 1, "type": "string" }, "type": "array" }, "calculations": { "description": "⚠️ CRITICAL RULE: For COUNT or CONCURRENCY operations, you MUST OMIT the 'column' field COMPLETELY - do not include it at all. For all other operations, the 'column' field is REQUIRED.", "items": { "additionalProperties": false, "properties": { "column": { "description": "⚠️ CRITICAL: NEVER include this field when op is COUNT or CONCURRENCY. REQUIRED for all other operations.", "minLength": 1, "type": "string" }, "op": { "description": "⚠️⚠️⚠️ CRITICAL RULES FOR OPERATIONS:\n\n1. FOR COUNT OPERATIONS:\n - NEVER include a \"column\" field\n - CORRECT: {\"op\": \"COUNT\"}\n - INCORRECT: {\"op\": \"COUNT\", \"column\": \"anything\"} \n \n2. FOR PERCENTILES:\n - Use the exact P* operations (P95, P99, etc.)\n - CORRECT: {\"op\": \"P95\", \"column\": \"duration_ms\"}\n - INCORRECT: {\"op\": \"PERCENTILE\", \"percentile\": 95}\n \n3. ALL operations EXCEPT COUNT and CONCURRENCY REQUIRE a column field\n\nCOMMON ERRORS TO AVOID:\n- DO NOT include \"column\" with COUNT or CONCURRENCY\n- DO NOT use \"PERCENTILE\" - use \"P95\", \"P99\", etc. instead\n- DO NOT misspell operation names", "enum": [ "COUNT", "CONCURRENCY", "SUM", "AVG", "COUNT_DISTINCT", "MAX", "MIN", "P001", "P01", "P05", "P10", "P20", "P25", "P50", "P75", "P80", "P90", "P95", "P99", "P999", "RATE_AVG", "RATE_SUM", "RATE_MAX", "HEATMAP" ], "type": "string" } }, "required": [ "op" ], "type": "object" }, "type": "array" }, "dataset": { "description": "The dataset to query. Use __all__ to query across all datasets in the environment.", "minLength": 1, "type": "string" }, "end_time": { "description": "MUST use field name 'end_time' (with underscore). Absolute end timestamp in seconds.", "exclusiveMinimum": 0, "type": "integer" }, "environment": { "description": "The Honeycomb environment to query", "minLength": 1, "type": "string" }, "filter_combination": { "description": "MUST use field name 'filter_combination' (not 'combine_filters'). How to combine filters: AND or OR. Default: AND.", "enum": [ "AND", "OR" ], "type": "string" }, "filters": { "description": "MUST use field name 'filters' (an array of filter objects). Pre-calculation filters for the query.", "items": { "additionalProperties": false, "properties": { "column": { "description": "MUST use field name 'column'. Name of the column to filter on.", "minLength": 1, "type": "string" }, "op": { "description": "MUST use field name 'op'. Available operators:\n- Equality: \"=\", \"!=\"\n- Comparison: \">\", \">=\", \"<\", \"<=\"\n- String: \"starts-with\", \"does-not-start-with\", \"ends-with\", \"does-not-end-with\", \"contains\", \"does-not-contain\"\n- Existence: \"exists\", \"does-not-exist\"\n- Arrays: \"in\", \"not-in\" (use with array values)", "enum": [ "=", "!=", ">", ">=", "<", "<=", "starts-with", "does-not-start-with", "ends-with", "does-not-end-with", "exists", "does-not-exist", "contains", "does-not-contain", "in", "not-in" ], "type": "string" }, "value": { "description": "MUST use field name 'value'. Comparison value. Optional for exists operators. Use arrays for in/not-in." } }, "required": [ "column", "op" ], "type": "object" }, "type": "array" }, "granularity": { "description": "MUST use field name 'granularity'. Time resolution in seconds. 0 for auto.", "minimum": 0, "type": "integer" }, "havings": { "description": "MUST use field name 'havings'. Post-calculation filters with same column rules as calculations.", "items": { "additionalProperties": false, "properties": { "calculate_op": { "description": "MUST use field name 'calculate_op'. Available operations:\n- NO COLUMN ALLOWED: COUNT, CONCURRENCY\n- REQUIRE COLUMN: SUM, AVG, COUNT_DISTINCT, MAX, MIN, P001, P01, P05, P10, P20, P25, P50, P75, P80, P90, P95, P99, P999, RATE_AVG, RATE_SUM, RATE_MAX", "enum": [ "COUNT", "CONCURRENCY", "SUM", "AVG", "COUNT_DISTINCT", "MAX", "MIN", "P001", "P01", "P05", "P10", "P20", "P25", "P50", "P75", "P80", "P90", "P95", "P99", "P999", "RATE_AVG", "RATE_SUM", "RATE_MAX" ], "type": "string" }, "column": { "description": "MUST use field name 'column'. NEVER use with COUNT/CONCURRENCY. REQUIRED for all other operations.", "minLength": 1, "type": "string" }, "op": { "description": "MUST use field name 'op'. Available comparison operators: \"=\", \"!=\", \">\", \">=\", \"<\", \"<=\"", "enum": [ "=", "!=", ">", ">=", "<", "<=" ], "type": "string" }, "value": { "description": "MUST use field name 'value'. Numeric threshold value to compare against.", "type": "number" } }, "required": [ "calculate_op", "op", "value" ], "type": "object" }, "type": "array" }, "limit": { "description": "MUST use field name 'limit'. Maximum number of result rows to return.", "exclusiveMinimum": 0, "type": "integer" }, "orders": { "description": "MUST use field name 'orders' (not 'sort' or 'order_by'). Array of sort configurations.", "items": { "additionalProperties": false, "properties": { "column": { "description": "MUST use field name 'column'. Column to order by. Required when sorting by a column directly.", "minLength": 1, "type": "string" }, "op": { "description": "MUST use field name 'op' when provided. Operation to order by. Must match a calculation operation.", "type": "string" }, "order": { "description": "MUST use field name 'order' when provided. Available values: \"ascending\" (low to high) or \"descending\" (high to low).", "enum": [ "ascending", "descending" ], "type": "string" } }, "required": [ "column" ], "type": "object" }, "type": "array" }, "start_time": { "description": "MUST use field name 'start_time' (with underscore). Absolute start timestamp in seconds.", "exclusiveMinimum": 0, "type": "integer" }, "time_range": { "description": "MUST use field name 'time_range' (with underscore). Relative time range in seconds from now.", "exclusiveMinimum": 0, "type": "number" } }, "required": [ "environment", "dataset", "calculations" ], "type": "object" }

You must be authenticated.

Other Tools from hny-mcp

Related Tools

ID: 8zeou4ict1