Skip to main content
Glama

roslyn:analyze_data_flow

Analyze variable assignments and usage patterns within specific code regions to understand data flow, variable declarations, and capture states.

Instructions

Analyze variable assignments and usage in a code region.

Returns: variablesDeclared, alwaysAssigned, dataFlowsIn/Out, readInside/Outside, writtenInside/Outside, captured.

USAGE: analyze_data_flow("path/to/file.cs", startLine=10, endLine=25)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesAbsolute path to source file
startLineYesStart line (0-based)
endLineYesEnd line (0-based)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses the return values (e.g., 'variablesDeclared', 'dataFlowsIn/Out'), which helps understand the tool's behavior. However, it doesn't mention performance characteristics, error handling, or prerequisites like needing a loaded solution, leaving gaps in behavioral context.

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 front-loaded with the core purpose, followed by return values and a usage example—all in three concise sentences with zero waste. Each sentence adds essential information without redundancy.

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 tool with no annotations and no output schema, the description does well by listing return values and providing a usage example. However, it could better explain the analysis scope (e.g., static analysis) or link to sibling tools for context, leaving minor gaps in completeness.

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 description coverage is 100%, so the schema fully documents parameters. The description adds minimal value with a usage example that shows parameter order and format, but doesn't explain semantics beyond what the schema provides (e.g., what '0-based' means for lines). Baseline is 3, but the example slightly enhances clarity.

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 clearly states the tool's purpose with a specific verb ('analyze') and resource ('variable assignments and usage in a code region'), distinguishing it from siblings like 'analyze_control_flow' or 'analyze_method' by focusing on data flow analysis. It provides a concrete example of what gets analyzed.

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?

The description includes a usage example that implies when to use this tool (for analyzing data flow in a specific code region), but it doesn't explicitly state when to choose this over alternatives like 'analyze_control_flow' or 'analyze_method'. No exclusions or prerequisites are mentioned.

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/pzalutski-pixel/sharplens-mcp'

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