Skip to main content
Glama
aferreiraguido

javascript-mcp-server

find_angular_subscription_leaks

Detects Angular subscription leaks by checking if subscribe() calls in components, directives, and services are cleaned up via ngOnDestroy, unsubscribe, takeUntil, or async pipe.

Instructions

Uncleaned subscriptions (heuristic): subscribe() in components/directives/services without ngOnDestroy/unsubscribe/takeUntil/async pipe in the class (comments are ignored).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName or path of the loaded project
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: it is heuristic, covers components/directives/services, and ignores comments. It also defines what counts as a clean subscription, setting accurate expectations about how results are determined.

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 description is a single, front-loaded sentence. Every clause adds meaningful detail about scope, detection logic, or exclusions, with no redundant or filler wording.

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?

For a heuristic finder with one simple parameter and no output schema, the description provides solid coverage: it explains what is found, where, and under what conditions. It does not describe the result format or potential false positives, but the heuristic label mitigates that 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 fully documents the single 'name' parameter with a clear description. The tool description adds no additional parameter meaning, but none is needed given the schema coverage is 100%, so the baseline score 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?

The description explicitly states the tool finds uncleaned Angular subscriptions via a heuristic. It specifies the exact resource (subscribe() calls), the scope (components/directives/services), and the cleanup criteria (ngOnDestroy/unsubscribe/takeUntil/async pipe), clearly distinguishing it from sibling leak-detection tools like find_event_listener_leaks.

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?

The description implies when to use the tool: when auditing Angular classes for subscription cleanup. It does not explicitly name alternatives or state when not to use it, but the Angular-specific scope and sibling context make the intended use clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aferreiraguido/javascript-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server