Skip to main content
Glama

appinsights_query

Run a raw KQL (Kusto) query against the D365FO environment's Application Insights / Log Analytics workspace (read-only -- the query language has no mutation operators). Requires the connection to be configured first via appinsights_set_connection (or server env vars). Use the standard App Insights schema: requests, dependencies, exceptions, traces, customEvents, pageViews, performanceCounters. Prefer appinsights_diagnose_slowness for a ready-made "why is it slow" report -- use this tool for anything more specific/custom.

Triggers: 'run this KQL', 'query app insights', 'requête KQL', 'log analytics query', 'custom App Insights query for my environment'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kqlYesKQL query text, e.g. "exceptions | where timestamp > ago(1h) | take 20". Do NOT include an explicit 'ago()'/time-range filter for the primary time column -- use the lookbackHours parameter instead (applied as the query time range).
maxRowsNoMax rows to return (1-500). Default 100.
lookbackHoursNoHow far back to query, in hours (1-720). Default 24.

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It clearly discloses that the operation is read-only, notes the prerequisite connection setup, and names the standard App Insights tables/schema. It does not describe output formatting or error behavior, but the safety profile and operational context are well covered for a query tool.

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?

The description is front-loaded with purpose and read-only behavior, followed by prerequisites, alternatives, and trigger examples. It is efficient overall, though the trigger phrase list is somewhat redundant for an agent that can infer intent from the main description; still, it does not introduce meaningful bloat.

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

Completeness4/5

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

Given the tool's complexity, the description covers purpose, read-only guarantee, required setup, targeted schema, parameter behavior, and the alternative sibling. The main gap is that no output shape or error behavior is described, but since there is no output schema and the tool returns arbitrary KQL query results, this is a minor omission.

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

Parameters3/5

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

The input schema already documents all three parameters with 100% coverage, including defaults and range constraints, so the description need not repeat them. The main description adds domain context about the standard App Insights schema but does not add significant parameter-level semantics beyond what the schema provides, matching the baseline for high schema coverage.

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?

The description states a specific verb and resource: run a raw KQL query against the D365FO environment's Application Insights / Log Analytics workspace. It also names the sibling alternative appinsights_diagnose_slowness and distinguishes this tool as the custom/specific query path, so an agent can tell them apart without opening schemas.

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?

It explicitly states the prerequisite that a connection must be configured via appinsights_set_connection or server env vars, and it gives a clear when-to-use versus when-not-to-use rule: prefer appinsights_diagnose_slowness for ready-made slowness reports, use this tool for more specific/custom queries. Trigger phrases are also provided, making selection unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation4/5

Most tools have distinct purposes and clear triggers, reducing ambiguity. For example, PR-related tools are separated into analysis, listing, commenting, and dependency mapping. However, some overlap exists between find_references, find_extensions, and find_callers, which could confuse an agent without careful descriptions.

Naming Consistency4/5

Tool names follow a consistent snake_case pattern with verb_noun structure within subgroups (e.g., ado_*, find_*, search_*, generate_*). There is no mixing of camelCase or other styles, though the variety of prefixes slightly reduces predictability.

Tool Count3/5

With 38 tools, the server feels slightly over-scoped for its domain. While each tool has a specific function, the number is high compared to typical well-scoped servers (10-15 tools). Some tools like find_references and find_callers could be consolidated.

Completeness4/5

The tool set covers a broad range of D365 F&O development and DevOps tasks, including code search, analysis, security, performance, upgrades, and work item management. Minor gaps exist, such as the absence of direct object modification or batch job management, but the core workflows are well covered.