Skip to main content
Glama

analyze_control_flow

Analyze control flow in a C# method to detect unreachable code and understand branching. Returns reachability of start/end points, return statements, and exit points.

Instructions

Analyze control flow within a range of statements in a C# method. Returns reachability of start/end points, return statements, and exit points. Useful for detecting unreachable code and understanding branching.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endLineYesLast line of the statement range (1-based)
filePathYesFull path to the C# source file
startLineYesFirst line of the statement range (1-based)
Behavior3/5

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

No annotations provided, so description must disclose behavior. It indicates a read-only analysis tool returning reachability data. It does not mention side effects, permissions, or prerequisites like a loaded solution, which are relevant for an analysis tool.

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?

Description is extremely concise with two sentences that front-load the main action. Every sentence adds value without fluff.

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?

Given the tool's complexity (3 parameters, no output schema), the description covers the core purpose and return data. It lacks prerequisites and error conditions, but overall provides sufficient context for an analysis tool.

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 has 100% description coverage for all parameters. The description does not add extra meaning beyond the schema; it focuses on overall functionality. Baseline 3 is appropriate.

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?

Description clearly states the tool analyzes control flow within a C# method range and returns reachability information. Purpose is specific and avoids vagueness, though it does not explicitly differentiate from sibling tools like analyze_data_flow.

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

Usage Guidelines3/5

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

Description mentions usefulness for detecting unreachable code and understanding branching, giving context for when to use. However, it does not provide when-not-to-use guidance or mention alternative tools for related analyses.

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