Skip to main content
Glama
johnib

kusto-mcp

by johnib

execute-query

Runs KQL queries and returns results. No cluster is configured: call initialize-connection before the first query. If you have not inspected the table yet, call show-table first to see its columns.

Instructions

Runs KQL queries and returns results. No cluster is configured: call initialize-connection before the first query. If you have not inspected the table yet, call show-table first to see its columns. By default, limits results to 20 rows to prevent context overflow. Use the "limit" parameter to specify a different maximum. If results are marked as partial, consider revising your query to use aggregations, filters, or summarizations. Avoid the search operator on large tables; it often times out. Filter a specific table with where/has instead. Optionally set "purpose" to the closest intent.

Input Schema

NameRequiredDescriptionDefault
limitYesMaximum number of rows to return (default: 20)
queryYesThe query to execute
purposeNoOptional analytics hint: why you are running this query, e.g. schema_discovery, point_lookup, exploration, incident_investigation, service_health, reporting_pipeline, bulk_extract, validation, other. Omit if unsure. Never put query text or names here.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.19.0
    • changedInput schema / properties / purpose / description
      Previous value: -"Optional analytics hint: why you are running this query, e.g. schema_discovery, point_lookup, exploration, incident_investigation, service_health, reporting_pipeline, bulk_extract, other. Omit if unsure. Never put query text or names here."New value: +"Optional analytics hint: why you are running this query, e.g. schema_discovery, point_lookup, exploration, incident_investigation, service_health, reporting_pipeline, bulk_extract, validation, other. Omit if unsure. Never put query text or names here."
  2. Changed1 schema field changedv1.18.2
    • addedInput schema / properties / purpose
      Added value: +{
      +  "description": "Optional analytics hint: why you are running this query, e.g. schema_discovery, point_lookup, exploration, incident_investigation, service_health, reporting_pipeline, bulk_extract, other. Omit if unsure. Never put query text or names here.",
      +  "type": "string"
      +}
  3. First observedv1.10.2

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the 20-row default cap to prevent context overflow, the existence of a partial-results marker, and the timeout risk of the search operator on large tables. These are non-obvious runtime traits an agent could not infer from the schema, though it stops short of stating whether the tool is strictly read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, prerequisites front-loaded before the tuning advice, and every sentence carries actionable content. The only redundancy is restating the 20-row default that the schema's limit property already documents.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter tool with no annotations and no output schema, the description covers prerequisites, default limiting, partial-result handling, and query-construction pitfalls. Nothing an agent needs in order to invoke it correctly is missing, and return-format detail is minimal enough that its absence is not a real gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds rationale the schema lacks: the limit default exists to prevent context overflow and should be raised deliberately, and purpose is an optional intent hint. It does not add syntax or format guidance for the query string itself, which the schema leaves as 'The query to execute'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Runs KQL queries and returns results') and immediately situates itself in the sibling set by routing to initialize-connection and show-table. An agent can distinguish it from the show-* discovery tools without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use rules: call initialize-connection before the first query, call show-table if the table has not been inspected, use where/has instead of the search operator on large tables. It also names the condition that should change behavior ('if results are marked as partial, consider revising your query'), which is genuine routing guidance rather than restated boilerplate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.