Skip to main content
Glama

GetTypeInfo

Retrieve detailed ABAP type information from SAP systems to understand data structures and development artifacts.

Instructions

Retrieve ABAP type information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
type_nameYesName of the ABAP type

Implementation Reference

  • The handler function for the GetTypeInfo tool. It validates the type_name argument, encodes it, and makes ADT requests first to the domain source endpoint, falling back to the data element endpoint if not found. Uses shared utilities for requests and responses.
    export async function handleGetTypeInfo(args: any) {
        try {
            if (!args?.type_name) {
                throw new McpError(ErrorCode.InvalidParams, 'Type name is required');
            }
        } catch (error) {
            return return_error(error);
        }
    
        const encodedTypeName = encodeURIComponent(args.type_name);
    
    
        try {
    
            const url = `${await getBaseUrl()}/sap/bc/adt/ddic/domains/${encodedTypeName}/source/main`;
            const response = await makeAdtRequest(url, 'GET', 30000);
            return return_response(response);
        } catch (error) {
    
            // no domain found, try data element
            try {
                const url = `${await getBaseUrl()}/sap/bc/adt/ddic/dataelements/${encodedTypeName}`;
                const response = await makeAdtRequest(url, 'GET', 30000);
                return return_response(response);
            } catch (error) {
                return return_error(error);
            }
    
        }
    }
  • Input schema for the GetTypeInfo tool, defining the required 'type_name' property.
    inputSchema: {
      type: 'object',
      properties: {
        type_name: {
          type: 'string',
          description: 'Name of the ABAP type'
        }
      },
      required: ['type_name']
    }
  • src/index.ts:225-238 (registration)
    Tool registration in the ListTools response, including name, description, and input schema.
    {
      name: 'GetTypeInfo',
      description: 'Retrieve ABAP type information',
      inputSchema: {
        type: 'object',
        properties: {
          type_name: {
            type: 'string',
            description: 'Name of the ABAP type'
          }
        },
        required: ['type_name']
      }
    },
  • src/index.ts:323-324 (registration)
    Dispatch logic in the CallToolRequest handler that routes GetTypeInfo calls to the specific handler function.
    case 'GetTypeInfo':
      return await handleGetTypeInfo(request.params.arguments);
  • src/index.ts:23-23 (registration)
    Import statement for the GetTypeInfo handler function.
    import { handleGetTypeInfo } from './handlers/handleGetTypeInfo';
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It only states what the tool does ('Retrieve'), but doesn't describe any behavioral traits such as whether it's read-only, if it requires specific permissions, error handling, or what format the information is returned in. This is inadequate for a tool with no annotation coverage.

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 a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool and front-loads the core purpose immediately.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'ABAP type information' includes, the return format, or any behavioral context needed for effective use. For a tool with no structured metadata, this minimal description leaves significant 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?

The input schema has 100% description coverage, with the single parameter 'type_name' clearly documented. The description doesn't add any parameter-specific information beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 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?

The description clearly states the verb ('Retrieve') and resource ('ABAP type information'), making the purpose unambiguous. However, it doesn't explicitly differentiate this tool from its sibling tools (like GetStructure or GetTable), which also retrieve ABAP metadata, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools retrieving different ABAP metadata (GetClass, GetFunction, GetStructure, etc.), there's no indication of when this specific tool for type information is appropriate versus other options.

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/mario-andreschak/mcp-abap-adt'

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