Skip to main content
Glama

find_event_subscribers

Find all event subscription (+=) and unsubscription (-=) sites across the solution for any event symbol. Reports location, handler method, and subscription kind to audit memory leaks or inspect event subscribers.

Instructions

Find every += and -= site for an event symbol across the solution. Accepts source events (e.g. 'MyClass.Clicked') or metadata events (e.g. 'System.Diagnostics.Process.Exited'). Each result reports the source location, the resolved handler (method FQN, or a synthetic name like 'lambda at File.cs:N' for inline handlers), and the subscription kind (Subscribe for +=, Unsubscribe for -=). Use this for memory-leak audits (compare subscribe/unsubscribe pairs), UI event subscriber inspection, or when Grep over '+= EventName' would miss qualified or fully-typed subscription sites. Returns an envelope with items sorted by file path then line, totalCount, truncated, and limit (default 500).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of items to return (default: 500). Items are sorted by file path, then line.
symbolYesEvent symbol (e.g. 'MyClass.Clicked' or 'System.Diagnostics.Process.Exited')
Behavior4/5

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

No annotations provided, so description carries full burden. It details result content (source location, resolved handler, subscription kind), sorting order, and envelope fields (totalCount, truncated, limit). It does not mention performance or side effects, but for a read-only search this is adequate.

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

Conciseness4/5

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

Four sentences, each adding distinct information: purpose, symbol types, result details, use cases. No fluff, but could be slightly more streamlined without losing 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 tool with only 2 parameters and no output schema, the description covers purpose, input semantics, use cases, and result structure comprehensively. No gaps.

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?

Schema coverage is 100%, and description adds value by explaining limit default (500) and sorting, and providing examples for symbol ('MyClass.Clicked'). This goes beyond the schema's type/description.

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?

Description clearly states it 'Find every += and -= site for an event symbol across the solution.' This is a specific verb and resource, and distinguishes it from general find tools like find_references or grep.

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 explicitly mentions use cases: 'memory-leak audits', 'UI event subscriber inspection', or 'when Grep over EventName would miss qualified sites'. It does not compare with sibling tools but gives practical context.

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/MarcelRoozekrans/roslyn-codelens-mcp'

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