Skip to main content
Glama

GetTransaction

Retrieve details of an ABAP transaction (t-code) to identify its program, screen, authorization object, and transaction type for analysis or documentation.

Instructions

[read-only] Retrieve ABAP transaction (t-code) details — program, screen, authorization object, and transaction type (dialog, report, OO).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transaction_nameYesName of the ABAP transaction

Implementation Reference

  • The main handler function for the GetTransaction tool. It takes a HandlerContext and args, logs, and returns a placeholder 'Not implemented' response. The real implementation (with ADT client calls) is commented out.
    export async function handleGetTransaction(
      context: HandlerContext,
      _args: any,
    ) {
      const { connection, logger } = context;
      // try {
      //     if (!args?.transaction_name) {
      //         throw new McpError(ErrorCode.InvalidParams, 'Transaction name is required');
      //     }
      //     logger?.info(`Fetching transaction info for ${args.transaction_name}`);
      //     const client = createAdtClient(connection, logger);
      //     const result = await client.readTransaction(args.transaction_name);
      //     return result;
      // } catch (error) {
      //     logger?.error(`Failed to fetch transaction ${args?.transaction_name}`, error as any);
      //     // MCP-compliant error response: always return content[] with type "text"
      //     return {
      //         isError: true,
      //         content: [
      //             {
      //                 type: "text",
      //                 text: `ADT error: ${String(error)}`
      //             }
      //         ]
      //     };
      // }
      return {
        isError: false,
        content: [{ type: 'json', json: { message: 'Not implemented' } }],
      };
    }
  • The TOOL_DEFINITION export contains the tool name 'GetTransaction', description, and inputSchema (requires a 'transaction_name' string property).
    export const TOOL_DEFINITION = {
      name: 'GetTransaction',
      available_in: ['onprem', 'cloud'] as const,
      description:
        '[read-only] Retrieve ABAP transaction (t-code) details — program, screen, authorization object, and transaction type (dialog, report, OO).',
      inputSchema: {
        type: 'object',
        properties: {
          transaction_name: {
            type: 'string',
            description: 'Name of the ABAP transaction',
          },
        },
        required: ['transaction_name'],
      },
    } as const;
  • Registration of GetTransaction in the SystemHandlersGroup: binds GetTransaction_Tool to handleGetTransaction.
    {
      toolDefinition: GetTransaction_Tool,
      handler: (args: any) => handleGetTransaction(this.context, args),
    },
  • Helper function _parseTransactionXml that parses XML (ADT transaction XML format) into a structured object with name, objectType, description, package, type.
    function _parseTransactionXml(xml: string) {
      const parser = new XMLParser({
        ignoreAttributes: false,
        attributeNamePrefix: '',
        parseAttributeValue: true,
        trimValues: true,
      });
      const result = parser.parse(xml);
    
      // ADT Transaction XML (opr:objectProperties)
      if (result['opr:objectProperties']?.['opr:object']) {
        const obj = result['opr:objectProperties']['opr:object'];
        return {
          name: obj.name,
          objectType: 'transaction',
          description: obj.text,
          package: obj.package,
          type: obj.type,
        };
      }
    
      // fallback: return raw
      return { raw: result };
    }
Behavior4/5

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

With no annotations provided, the description carries the full burden and explicitly marks the tool as read-only. It also lists the kind of details returned, which is helpful, though it does not describe potential errors or response format in detail.

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, front-loaded sentence with no unnecessary words. It efficiently communicates the tool's purpose and key details.

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 simplicity of the tool (one parameter, no output schema), the description provides sufficient context by listing the returned fields. It could be improved by hinting at the response structure, but it is adequate for a basic retrieval operation.

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 description adds no additional meaning beyond the parameter schema, which already has 100% coverage. The parameter 'transaction_name' is self-explanatory from the schema's description, so the tool description does not enhance understanding.

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 'Retrieve ABAP transaction (t-code) details' and lists specific fields (program, screen, authorization object, transaction type). This is a specific verb+resource combination that effectively distinguishes it from sibling Get* tools for other objects.

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

Usage Guidelines4/5

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

The description implies usage for retrieving transaction details but does not explicitly state when to avoid using it or suggest alternatives. The '[read-only]' prefix provides clear context for safe invocation.

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

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