Skip to main content
Glama

get_exception_flow

Identifies exceptions that can escape a method by tracing callees, showing escape path, catch location, and whether handling is filtered.

Instructions

Which exceptions can escape a method — the 'is calling this safe?' question. Walks the method's callees depth-first (cycle-safe, depth- and node-bounded) collecting every explicit throw, then propagates each one back up the call chain, testing the enclosing try/catch at the throw and at every call site on the way out. Each item reports escapes, the path of methods from the analysed method to the one that raises it, and — when it is stopped — caughtIn, caughtFile, caughtLine. A handler with a when filter sets hasFilter and the exception is still reported as escaping, because the filter may decline at runtime. origin is thrown for a real throw site in source, or documented for an exception XML doc tag on a metadata (BCL/NuGet) callee — set includeDocumented to false to drop the latter. Throws inside lambdas and local functions are excluded: they escape when that body runs, not at this method's boundary — use find_throw_sites for a plain textual scan of throws. Static analysis only: no reflection, no virtual-dispatch resolution, and no implicit runtime failures such as null dereferences. Hitting maxDepth or maxNodes sets truncated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodYesMethod symbol to analyse (e.g. `OrderService.Place` or `MyNamespace.MyClass.MyMethod`).
maxDepthNoMax callee depth to walk from the analysed method. Default 3.
maxNodesNoHard cap on methods visited. Default 500.
includeDocumentedNoInclude exceptions documented by `exception` XML tags on metadata callees. Default true.
Behavior5/5

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

No annotations are present, so the description fully carries the behavioral transparency burden. It thoroughly details the algorithm (depth-first, cycle-safe, bounded), return fields, edge cases (when filters, documented exceptions), and limitations (static analysis only, no runtime failures, truncation). This is exceptional transparency.

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?

The description is well-structured and front-loaded with the main purpose, but it is somewhat lengthy (6 sentences). However, every sentence adds necessary detail for a complex analysis tool, so it earns its length. It is not excessively verbose.

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 lacking an output schema, the description fully explains the return values (escapes, path, caughtIn, etc.) and covers the algorithm, limitations, edge cases, and truncation behavior. For a tool of this complexity, the description provides complete contextual information for correct usage.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value by explaining the meaning of parameters beyond the schema (e.g., maxDepth controls callee walking depth, maxNodes caps visited methods, includeDocumented filters documented exceptions). It provides context that the schema's descriptions alone do not fully convey.

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 uses specific language: 'Which exceptions can escape a method — the is calling this safe? question.' It clearly states the tool's purpose and actively distinguishes from sibling tool find_throw_sites, which is mentioned as the alternative for a plain textual scan of throws.

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 states when to use this tool vs alternatives: 'use find_throw_sites for a plain textual scan of throws.' It also describes limitations (no reflection, no virtual-dispatch) and exclusions (lambdas, local functions), providing clear usage guidance.

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