Skip to main content
Glama

Find failure handling that can lose data

find_suspects
Read-only

Scans JavaScript and TypeScript sources statically to flag reads that turn unknown failures into empty results or only log failures, naming each suspect read and the check to prove or dismiss it.

Instructions

Reads JavaScript and TypeScript sources, without running them, for two patterns: UNKNOWN_AS_EMPTY (a failed or unexpected read becomes an empty collection, so "unknown" looks like "none") and FAILURE_ONLY_LOGGED (a read stores its data when it succeeds, but its failure is only logged). Each suspect names the read to fail and the check that proves or dismisses it. Use changedSince "main" to scan only what a branch changed. Needs TypeScript in the project.

Input Schema

NameRequiredDescriptionDefault
pathsNoFiles and directories to scan, relative to the working directory. Default: all of it.
changedSinceNoGit reference, such as main: scan only the files changed since it, uncommitted and untracked ones included.
includeTestsNoScan test files too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds the meaningful detail that sources are analyzed statically "without running them," and it discloses the TypeScript dependency, which the annotations do not. It also sketches the response shape (each suspect names the read and the check), going beyond the structured fields without contradicting them.

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?

Four tight sentences, front-loaded with what is scanned and what counts as a suspect, then the workflow tip and the prerequisite. Nothing repeats the title or the schema verbatim, and every sentence contributes.

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?

With no output schema, the description compensates by explaining what a returned suspect contains, and it covers the static-analysis behavior, the branch-diff workflow, and the TypeScript requirement. For a three-optional-parameter read-only scanner, nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%, so paths, changedSince, and includeTests are already fully documented, and the description only echoes the changedSince="main" case. Baseline 3 is appropriate; the description adds negligible semantics the schema does not already carry.

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

Purpose4/5

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

The description gives a specific verb and resource ("Reads JavaScript and TypeScript sources, without running them") and names the two exact defect patterns it looks for, UNKNOWN_AS_EMPTY and FAILURE_ONLY_LOGGED, which makes the tool's remit unambiguous. It never names or contrasts with the sibling read-analysis tools (find_page_reads, check_read_recovery), so an agent working from names alone still has to infer the split.

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

Usage Guidelines4/5

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

"Use changedSince \"main\" to scan only what a branch changed" supplies a concrete usage context, and "Needs TypeScript in the project" is a real prerequisite that prevents failed invocations. There are no explicit when-not conditions or pointers to the sibling tools for adjacent questions, so the guidance is clear but not complete.

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