Skip to main content
Glama

GetCdsUnitTestResult

Retrieve CDS unit test run results by providing the run identifier, with optional format selection (abapunit or junit) and navigation URIs.

Instructions

Retrieve CDS unit test run result for a run_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesRun identifier returned by unit test run.
with_navigation_urisNoInclude navigation URIs in result if supported.
formatNoResult format: abapunit or junit.

Implementation Reference

  • Main handler function that executes the GetCdsUnitTestResult tool logic. Creates an ADT client, calls cdsUnitTest.read({runId}) to retrieve the unit test result, and returns the run result data.
    export async function handleGetCdsUnitTestResult(
      context: HandlerContext,
      args: GetCdsUnitTestResultArgs,
    ) {
      const { connection, logger } = context;
      try {
        const { run_id, with_navigation_uris, format } =
          args as GetCdsUnitTestResultArgs;
    
        if (!run_id) {
          return return_error(new Error('run_id is required'));
        }
    
        const client = createAdtClient(connection, logger);
        const cdsUnitTest = client.getCdsUnitTest();
    
        logger?.info(`Reading CDS unit test result for run_id: ${run_id}`);
    
        try {
          const readResult = await cdsUnitTest.read({ runId: run_id });
    
          return return_response({
            data: JSON.stringify(
              {
                success: true,
                run_id,
                run_result: readResult?.runResult,
              },
              null,
              2,
            ),
          } as AxiosResponse);
        } catch (error: any) {
          logger?.error(
            `Error reading CDS unit test result ${run_id}: ${error?.message || error}`,
          );
          return return_error(new Error(error?.message || String(error)));
        }
      } catch (error: any) {
        return return_error(error);
      }
    }
  • Tool definition with input schema for GetCdsUnitTestResult. Defines required run_id (string), optional with_navigation_uris (boolean), and optional format (enum: abapunit|junit).
    export const TOOL_DEFINITION = {
      name: 'GetCdsUnitTestResult',
      available_in: ['onprem', 'cloud', 'legacy'] as const,
      description: 'Retrieve CDS unit test run result for a run_id.',
      inputSchema: {
        type: 'object',
        properties: {
          run_id: {
            type: 'string',
            description: 'Run identifier returned by unit test run.',
          },
          with_navigation_uris: {
            type: 'boolean',
            description: 'Include navigation URIs in result if supported.',
            default: false,
          },
          format: {
            type: 'string',
            description: 'Result format: abapunit or junit.',
            enum: ['abapunit', 'junit'],
          },
        },
        required: ['run_id'],
      },
    } as const;
  • TypeScript interface for GetCdsUnitTestResultArgs (run_id, with_navigation_uris?, format?).
    interface GetCdsUnitTestResultArgs {
      run_id: string;
      with_navigation_uris?: boolean;
      format?: 'abapunit' | 'junit';
    }
  • Import of the GetCdsUnitTestResult tool definition and handler from the handler file.
    import {
      TOOL_DEFINITION as GetCdsUnitTestResult_Tool,
      handleGetCdsUnitTestResult,
    } from '../../../handlers/unit_test/high/handleGetCdsUnitTestResult';
  • Registration of the GetCdsUnitTestResult tool in the HighLevelHandlersGroup tool list, mapping toolDefinition to handler with context.
    {
      toolDefinition: GetCdsUnitTestResult_Tool,
      handler: withContext(handleGetCdsUnitTestResult),
    },
Behavior2/5

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

No annotations exist, so the description must convey behavioral traits. It only states a read operation (retrieve) but omits details like error handling, authentication needs, or the impact of parameters (e.g., format). The description is too brief to ensure safe invocation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, which is concise but lacks structure. It covers the basic purpose but omits important details. It is not overly verbose, but it could be more informative without adding significant length.

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?

No output schema is present, so the description should explain the return value or result structure. It only says 'result' without specifying format, fields, or error states. This is insufficient for a retrieval tool with moderate complexity.

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 input schema already documents all parameters effectively. The description adds no extra meaning beyond what the schema provides (run_id, with_navigation_uris, format). Baseline 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 tool retrieves CDS unit test run results for a specific run_id. The verb 'Retrieve' and resource 'CDS unit test run result' are specific, and the required parameter run_id is implied. While it doesn't explicitly differentiate from siblings like GetCdsUnitTest or GetUnitTestResult, the CDS and result focus provide sufficient distinction.

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?

No guidance is given on when to use this tool versus alternatives such as GetCdsUnitTestStatus or GetUnitTestResult. There is no mention of prerequisites, success conditions, or when not to use it.

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