Skip to main content
Glama

UpdateUnitTest

Update an ABAP unit test run using its run identifier. Note: ADT returns an error as updating unit test runs is not supported.

Instructions

Update an ABAP Unit test run. Note: ADT does not support updating unit test runs and will return an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idYesRun identifier returned by CreateUnitTest/RunUnitTest.

Implementation Reference

  • Main handler function for UpdateUnitTest tool. Calls AdtClient.getUnitTest().update() with the run_id argument. Catches and logs errors, returning structured success/error responses.
    export async function handleUpdateUnitTest(
      context: HandlerContext,
      args: UpdateUnitTestArgs,
    ) {
      const { connection, logger } = context;
      try {
        const { run_id } = args as UpdateUnitTestArgs;
    
        if (!run_id) {
          return return_error(new Error('run_id is required'));
        }
    
        const client = createAdtClient(connection, logger);
        const unitTest = client.getUnitTest();
    
        logger?.info(`Updating unit test run: ${run_id}`);
    
        try {
          await unitTest.update({ runId: run_id });
    
          return return_response({
            data: JSON.stringify(
              {
                success: true,
                run_id,
                message: `Unit test run ${run_id} updated successfully.`,
              },
              null,
              2,
            ),
          } as AxiosResponse);
        } catch (error: any) {
          const detailedError = extractAdtErrorMessage(
            error,
            `Failed to update unit test run ${run_id}`,
          );
          logger?.error(`Error updating unit test run ${run_id}: ${detailedError}`);
          return return_error(new Error(detailedError));
        }
      } catch (error: any) {
        return return_error(error);
      }
    }
  • Tool definition including name 'UpdateUnitTest', description, availability (onprem/cloud/legacy), and inputSchema requiring 'run_id' (string).
    export const TOOL_DEFINITION = {
      name: 'UpdateUnitTest',
      available_in: ['onprem', 'cloud', 'legacy'] as const,
      description:
        'Update an ABAP Unit test run. Note: ADT does not support updating unit test runs and will return an error.',
      inputSchema: {
        type: 'object',
        properties: {
          run_id: {
            type: 'string',
            description: 'Run identifier returned by CreateUnitTest/RunUnitTest.',
          },
        },
        required: ['run_id'],
      },
    } as const;
  • TypeScript interface UpdateUnitTestArgs defining the run_id input parameter.
    interface UpdateUnitTestArgs {
      run_id: string;
    }
  • Import of handleUpdateUnitTest and its TOOL_DEFINITION from the handler file.
    import {
      handleUpdateUnitTest,
      TOOL_DEFINITION as UpdateUnitTest_Tool,
    } from '../../../handlers/unit_test/high/handleUpdateUnitTest';
  • Registration of UpdateUnitTest tool in the HighLevelHandlersGroup with its toolDefinition and handler wrapped with context.
    {
      toolDefinition: UpdateUnitTest_Tool,
      handler: withContext(handleUpdateUnitTest),
    },
Behavior3/5

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

No annotations are provided, so the description must disclose behavioral traits. It does mention that the tool will return an error due to ADT lack of support, which is a key behavior. However, it does not describe the error format or any other side effects.

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

Conciseness4/5

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

The description is concise with two short sentences, no unnecessary words. It efficiently communicates the purpose and a critical behavioral note.

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?

Given no output schema and the tool being effectively broken (returns error), the description is minimally adequate. It warns of failure but lacks details on error handling, expected behavior on success (none), or alternatives. The sibling list includes many Update tools, but no context for choosing.

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 for the single parameter 'run_id'. The description does not add any additional meaning or context beyond the schema's description. Baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Update an ABAP Unit test run' which clearly identifies the action and resource. However, the additional note that ADT does not support it and will return an error introduces ambiguity about the tool's actual functionality. It does not differentiate from sibling Update* tools.

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 explicit guidance on when to use this tool or alternatives. The note about ADT failure implies it should not be used, but there is no direct recommendation or comparison to other tools like RunUnitTest.

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