Skip to main content
Glama

List Code Insights

list_insights
Read-onlyIdempotent

Lists code-quality, async, and design-smell insights for an analyzed C# solution session, with per-producer counts, optional file scoping, and counts of suppressed findings.

Instructions

List code-quality / async / design-smell insights for a session (long methods, fat interfaces, unused types, missing async suffixes, many-parameter methods, ...). Runs against the live analyzed solution; each insight is aggregated per producer, with the count of its detail lines ('detailsCount'; get_insight lists them). Pass dbPath to use the active QualityProfile (producer thresholds + toggles) from that DB; omit it for the default profile (DB-free). Honors the session's active test-detection profile (resolved by analyze_solution(dbPath)) for the production-focused producers. An explicit analyze_solution(layerProfile) drives the layer-violation insight and wins over the DB-configured profile (same precedence as solution_metrics and the CLI gate). THIS ANSWER IS TRIAGE-FILTERED, on BOTH triage axes: findings the solution marked intentional (a suppression - in the DB or in the git-tracked .aicb.json sidecar) AND findings a user dismissed as seen (in the solution record, NOT in the sidecar) are removed, and an insight whose findings are all gone does not appear at all. Every insight that lost lines carries 'suppressed' with the count of what BOTH axes removed together (absent = nothing filtered), so a shrinking number is never mistaken for a codebase that improved - but do not read that count as a sidecar entry count, because some of it is dismissal. Note 'title' is producer text computed BEFORE filtering, so on a partially filtered insight it still names the pre-filter total - 'detailsCount' + 'suppressed' are the real split. 'remediationCostMinutes' is a coarse order-of-magnitude estimate from fixed per-finding rules, not measured effort. Pass files - say the files a change touches - for the findings about the types they declare, with their detail lines.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sessionId": "<sessionId>"
    },
    "name": "list_insights"
  }
}

Input Schema

NameRequiredDescriptionDefault
filesNoOptional C# files, each absolute or relative to the solution folder: the answer keeps the findings about the types these files declare and becomes an object {files, notInSolution, insights}. 'files' are the ones the solution holds, solution-relative; 'notInSolution' the ones it does not (a deleted or non-C# file, a typo), as given. Each insight carries its in-scope 'details' with 'detailLocators' (up to 20, then a '(... and N more)' line), and 'detailsCount' counts the in-scope lines; 'title', 'remediationCostMinutes' and 'suppressed' stay the whole-solution numbers. A line matches by its locator's simple type name, so a same-named type elsewhere matches too, except on a member line whose member only that other type declares; a line about a file of top-level statements matches by that file; any other line with no type locator is left out, while an insight about the solution as a whole (no lines, no type locator) stays, with detailsCount 0. Omitted or empty: the solution-wide array above.
dbPathNoOptional path to an AIContextBuilder SQLite DB. When set, producer thresholds + toggles come from that DB's active QualityProfile AND the configured default layer profile (DefaultLayerProfileName / per-solution) drives the layer-violation analysis (an explicit analyze_solution(layerProfile) wins). Omitted, the QualityProfile falls back to the server's default config DB (the GUI's, if resolved), else the default profile, and the layer profile to the config DB the session was analysed against - the one its renders read.
sessionIdYesThe session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.46519
    • changedInput schema / properties / files / description
      Previous value: -"Optional C# files, each absolute or relative to the solution folder: the answer keeps the findings about the types these files declare and becomes an object {files, notInSolution, insights}. 'files' are the ones the solution holds, solution-relative; 'notInSolution' the ones it does not (a deleted or non-C# file, a typo), as given. Each insight carries its in-scope 'details' with 'detailLocators' (up to 20, then a '(... and N more)' line), and 'detailsCount' counts the in-scope lines; 'title', 'remediationCostMinutes' and 'suppressed' stay the whole-solution numbers. A line matches by its locator's simple type name, so a same-named type elsewhere matches too; a line about a file of top-level statements matches by that file; any other line with no type locator is left out, while an insight about the solution as a whole (no lines, no type locator) stays, with detailsCount 0. Omitted or empty: the solution-wide array above."New value: +"Optional C# files, each absolute or relative to the solution folder: the answer keeps the findings about the types these files declare and becomes an object {files, notInSolution, insights}. 'files' are the ones the solution holds, solution-relative; 'notInSolution' the ones it does not (a deleted or non-C# file, a typo), as given. Each insight carries its in-scope 'details' with 'detailLocators' (up to 20, then a '(... and N more)' line), and 'detailsCount' counts the in-scope lines; 'title', 'remediationCostMinutes' and 'suppressed' stay the whole-solution numbers. A line matches by its locator's simple type name, so a same-named type elsewhere matches too, except on a member line whose member only that other type declares; a line about a file of top-level statements matches by that file; any other line with no type locator is left out, while an insight about the solution as a whole (no lines, no type locator) stays, with detailsCount 0. Omitted or empty: the solution-wide array above."
  2. Changed1 schema field changedv0.5.46517
    • changedInput schema / properties / files / description
      Previous value: -"Optional C# files, each absolute or relative to the solution folder: the answer keeps the findings about the types these files declare and becomes an object {files, notInSolution, insights}. 'files' are the ones the solution holds, solution-relative; 'notInSolution' the ones it does not (a deleted or non-C# file, a typo), as given. Each insight carries its in-scope 'details' with 'detailLocators' (up to 20, then a '(... and N more)' line), and 'detailsCount' counts the in-scope lines; 'title', 'remediationCostMinutes' and 'suppressed' stay the whole-solution numbers. A line matches by its locator's simple type name, so a same-named type elsewhere matches too; a line with no type locator is left out, while an insight about the solution as a whole (no lines, no type locator) stays, with detailsCount 0. Omitted or empty: the solution-wide array above."New value: +"Optional C# files, each absolute or relative to the solution folder: the answer keeps the findings about the types these files declare and becomes an object {files, notInSolution, insights}. 'files' are the ones the solution holds, solution-relative; 'notInSolution' the ones it does not (a deleted or non-C# file, a typo), as given. Each insight carries its in-scope 'details' with 'detailLocators' (up to 20, then a '(... and N more)' line), and 'detailsCount' counts the in-scope lines; 'title', 'remediationCostMinutes' and 'suppressed' stay the whole-solution numbers. A line matches by its locator's simple type name, so a same-named type elsewhere matches too; a line about a file of top-level statements matches by that file; any other line with no type locator is left out, while an insight about the solution as a whole (no lines, no type locator) stays, with detailsCount 0. Omitted or empty: the solution-wide array above."
  3. Changed1 schema field changedv0.5.46516
    • addedInput schema / properties / files
      Added value: +{
      +  "default": null,
      +  "description": "Optional C# files, each absolute or relative to the solution folder: the answer keeps the findings about the types these files declare and becomes an object {files, notInSolution, insights}. 'files' are the ones the solution holds, solution-relative; 'notInSolution' the ones it does not (a deleted or non-C# file, a typo), as given. Each insight carries its in-scope 'details' with 'detailLocators' (up to 20, then a '(... and N more)' line), and 'detailsCount' counts the in-scope lines; 'title', 'remediationCostMinutes' and 'suppressed' stay the whole-solution numbers. A line matches by its locator's simple type name, so a same-named type elsewhere matches too; a line with no type locator is left out, while an insight about the solution as a whole (no lines, no type locator) stays, with detailsCount 0. Omitted or empty: the solution-wide array above.",
      +  "items": {
      +    "type": [
      +      "string",
      +      "null"
      +    ]
      +  },
      +  "type": [
      +    "array",
      +    "null"
      +  ]
      +}
  4. Changed1 schema field changedv0.5.46514
    • changedInput schema / properties / dbPath / description
      Previous value: -"Optional path to an AIContextBuilder SQLite DB. When set, producer thresholds + toggles come from that DB's active QualityProfile AND the configured default layer profile (DefaultLayerProfileName / per-solution) drives the layer-violation analysis (an explicit analyze_solution(layerProfile) wins); omit to fall back to the server's default config DB (the GUI's, if resolved), else the default profile + the explicit session layer profile."New value: +"Optional path to an AIContextBuilder SQLite DB. When set, producer thresholds + toggles come from that DB's active QualityProfile AND the configured default layer profile (DefaultLayerProfileName / per-solution) drives the layer-violation analysis (an explicit analyze_solution(layerProfile) wins). Omitted, the QualityProfile falls back to the server's default config DB (the GUI's, if resolved), else the default profile, and the layer profile to the config DB the session was analysed against - the one its renders read."
  5. Changed1 schema field changedv0.5.46513
    • changedInput schema / properties / sessionId / description
      Previous value: -"The session_id returned by analyze_solution."New value: +"The session_id returned by analyze_solution. Also takes an absolute .sln/.slnx/.slnf path, analyzed on first use."
  6. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes far beyond the readOnly/idempotent annotations: it discloses that results are triage-filtered on two axes (DB/sidecar suppressions and seen-dismissals), that fully filtered insights vanish, that 'title' is computed pre-filtering while detailsCount+suppressed are the real split, and that remediationCostMinutes is a rough heuristic. These are non-obvious traits an agent could not infer from annotations.

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

Conciseness3/5

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

Strongly front-loaded with purpose, but the body is one dense paragraph with long multi-clause sentences and emphasis caps, and the files-matching rules substantially duplicate the schema text. Much of it earns its place, but the repetition and lack of visual structure cost clarity.

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 high-complexity tool with no output schema, the description explains the array-vs-object return shape (files yields {files, notInSolution, insights}), the detail-line caps, and the meaning of suppressed/detailsCount/remediationCostMinutes. An agent has enough to call it and interpret results correctly.

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% and the schema already carries the detailed rules for files (simple type-name matching, notInSolution, detailLocators) and dbPath fallbacks; the description largely restates that text. It adds framing (live solution, per-producer aggregation) but little semantic content beyond the schema, so the baseline of 3 applies.

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?

Opens with a specific verb and resource ('List code-quality / async / design-smell insights for a session') and enumerates concrete insight kinds (long methods, fat interfaces, missing async suffixes). It also distinguishes itself from the sibling get_insight by explaining that this tool aggregates per producer while get_insight lists the detail lines.

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 routes the agent: get_insight for detail lines, analyze_solution(layerProfile) precedence for the layer-violation insight, dbPath vs omission for profile selection, and the files parameter for change-scoped findings. The conditions that select each behavior are stated rather than implied.

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