Skip to main content
Glama

detect_performance_issues

Read-onlyIdempotent

Profile an X++ object for N+1 queries, queries in loops, missing field lists, row-by-row inserts/updates, missing firstOnly. Returns compact issue table with line + fix. Only call when performance is explicitly the concern — for general quality use validate_best_practices. [!] Auto-fixing requires D365_CUSTOM_MODEL_PATH (custom code only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNameNoOptional: specific method to analyze. Analyzes all methods if not provided.
objectNameYesObject name to analyze, e.g. 'SalesTable', 'CustInvoiceJour'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the return format ('compact issue table with line + fix') and a meaningful environmental prerequisite. The phrase 'Auto-fixing' introduces slight ambiguity about whether this tool mutates code, but it does not directly contradict the annotations.

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

Conciseness5/5

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

Three sentences with zero redundancy: the first defines scope and issue types, the second states the output, and the third provides usage guidance and a prerequisite. Information is front-loaded and every sentence earns its place.

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?

With no output schema, the description responsibly states the return value as an issue table with line and fix. It also covers when to use the tool and a key environment prerequisite. The only gap is that it does not clarify whether 'Auto-fixing' is an action this tool performs or an external follow-up, but the core context for calling and interpreting results is present.

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?

Schema description coverage is 100%, so the schema already documents objectName and methodName adequately. The description reinforces the object-level scope ('Profile an X++ object') but adds no extra parameter semantics beyond the schema. Baseline 3 is appropriate when the schema carries the load.

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 'Profile' plus resource 'X++ object' and enumerates exact performance issue patterns (N+1, queries in loops, missing field lists, row-by-row, missing firstOnly). The description also distinguishes this from validate_best_practices, making the purpose unmistakable.

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?

Explicitly says 'Only call when performance is explicitly the concern' and directs to validate_best_practices for general quality. It also discloses the D365_CUSTOM_MODEL_PATH prerequisite for auto-fixing, giving an agent clear context on when to invoke and what conditions apply.

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.