Skip to main content
Glama

GetClass

Retrieve ABAP class source code by name, including definitions, implementations, macros, and test classes. Return raw source or structured JSON for downstream compression.

Instructions

Retrieve ABAP class source code. Optionally fetch local includes (definitions, implementations, macros, testclasses). Use output_format=structured for JSON output suitable for downstream compression.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
class_nameYesName of the ABAP class
include_typesNoOptional: Include types to fetch. Default: ['main']. Use 'all' for all available includes. Examples: ['main', 'implementations'], ['all']
output_formatNoOptional: Output format. 'text' (default) returns raw ABAP source. 'structured' returns parsed JSON with definition sections and method array — enables significantly better compression with JSON-aware context compressors. Use with include_types=['main'] (the default) for best results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. 'Retrieve' correctly implies a read-only operation, and it discloses that includes are fetched in a single call and that structured output is JSON. It says nothing about output size, volume of source returned for large classes, or any permission/authorization requirement, which are real concerns for a source-retrieval 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?

Two tight sentences, front-loaded with the core retrieval action, then the optional include behavior, then the output-format tip. No filler and no repetition of schema text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter read tool with no output schema and no annotations, the description covers purpose and both optional parameters adequately. It falls short on sibling disambiguation for includes and test classes and on what a caller receives for large classes, which are the main gaps an agent would need closed.

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 goes slightly beyond the schema by explaining why 'structured' matters (JSON-aware compression) and by implying the default recommendation of structured with the default include type. It still adds no meaning for class_name or for the interaction between include_types and output_format beyond what the schema states.

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?

States a specific verb and resource ('Retrieve ABAP class source code') and enumerates the optional include types, so the agent knows exactly what comes back. However, it never distinguishes itself from close siblings like GetClassInclude, GetClassTests, or ExportClassToFile, even though it visibly overlaps with them by offering include fetching.

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 gives conditional guidance for one parameter ('Use output_format=structured for JSON output suitable for downstream compression') which implies when to prefer structured output. It offers no guidance on when to call this tool rather than GetClassInclude for includes, GetClassTests for test classes, or ExportClassToFile for persistence, so selection among siblings is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.