Skip to main content
Glama

find_issues_for_file

Scan issues to return findings that reference a given working-tree file, each with rule, severity, path, and remediation text. The scan is bounded; check scan.complete.

Instructions

Find issues whose findings reference a given working-tree file.

Convenience for the edit loop: scans up to max_issues issues and returns the findings whose file path matches path (matched by shared path suffix, so an absolute or repo-relative path both work), each with its rule, severity, path, and inline remediation text. The backend cannot filter by file, so this is a client-side scan and may be slow for large workspaces.

The scan is bounded: max_issues is capped at 500 and the whole call at 300 backend requests. Check the returned scan.complete — when it is false the caps were hit and the file may have findings this result does not list, so do not read it as "no issues here". Narrow the search with list_issues filters and follow up on specific issues instead.

Input Schema

NameRequiredDescriptionDefault
pathYes
max_issuesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description must disclose behavior and it does: client-side scan because the backend cannot filter by file, potential slowness on large workspaces, hard caps on issues and backend requests, and the meaning of `scan.complete` including the explicit warning not to read an incomplete result as 'no issues here'. It also names the returned fields.

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?

The core purpose is front-loaded in sentence one, and each following paragraph carries a distinct, non-redundant payload (matching semantics, performance/cap limits, and the completeness caveat). Sized appropriately for a tool whose limitations matter more than its happy path.

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?

Despite having no output schema and no annotations, the description covers return contents (rule, severity, path, remediation text, scan.complete), the failure/limitation mode, and the fallback strategy. Nothing an agent needs to call or interpret this tool correctly is missing.

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

Parameters5/5

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

With 0% schema description coverage, the description carries the burden and does so: it explains that `path` is matched by shared path suffix so absolute or repo-relative paths both work, and that `max_issues` is capped at 500 with the whole call bounded at 300 backend requests. This is real semantics far beyond the bare schema.

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 (find issues whose findings reference a given working-tree file) plus the matching scope. It is clearly distinguishable from siblings like list_issues and get_finding_detail, which operate on the issue/finding hierarchy rather than by file.

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 frames the tool as a 'convenience for the edit loop,' and names the alternative path ('narrow the search with list_issues filters and follow up on specific issues instead') for the case where the bounded scan is insufficient. Both when-to-use and when-to-switch are stated.

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