Skip to main content
Glama

roslyn:get_method_source_batch

Retrieve source code for multiple methods in one batch call to reduce round trips when analyzing code flows in .NET/C# projects.

Instructions

Get source code for multiple methods in a single call (batch optimization).

USAGE: get_method_source_batch(methods: [{typeName: 'ServiceA', methodName: 'Process'}, {typeName: 'ServiceB', methodName: 'Handle'}]) OUTPUT: Results array with source for each method, plus errors array for any that failed. BENEFIT: One call instead of multiple - reduces round trips when tracing code flows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodsYesArray of method requests
maxMethodsNoMaximum methods to process (default: 20)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: the batch optimization benefit, the output structure (results array with source, errors array for failures), and the round-trip reduction. However, it lacks details on error handling specifics, performance limits, or authentication needs, leaving some gaps for a mutation-free read operation.

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 well-structured and front-loaded with the core purpose, followed by usage example, output details, and benefit. Every sentence earns its place by adding clarity or context without redundancy, making it efficient and easy to parse.

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 moderate complexity (batch read operation), no annotations, and no output schema, the description is mostly complete. It covers purpose, usage, output structure, and benefits, but lacks details on error types, rate limits, or response formats beyond the high-level mention. It compensates well for the missing structured data but has minor gaps.

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 description coverage is 100%, so the schema already documents both parameters ('methods' array and 'maxMethods' default). The description adds minimal value beyond the schema: it provides an example usage format for 'methods' but doesn't explain parameter semantics like the purpose of 'overloadIndex' or 'maxMethods' constraints. Baseline 3 is appropriate as the schema does most of the work.

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 specific action ('Get source code for multiple methods') and resource ('methods'), distinguishing it from the sibling tool 'roslyn:get_method_source' which presumably handles single methods. The batch optimization aspect is explicitly mentioned, making the purpose distinct and well-defined.

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?

The description provides explicit usage guidance: it specifies when to use this tool ('reduces round trips when tracing code flows') and implies an alternative (using multiple calls to 'roslyn:get_method_source' for single methods). The example usage format further clarifies the context, making it easy for an agent to decide when this batch tool is appropriate.

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