Skip to main content
Glama
Hollway

mcp-abap-abap-adt-api

by Hollway

callFunction

Invoke an ABAP function module by name with parameter values and receive its results, return code, and row counts. Validates inputs first; executes on target system and rolls back unless commit is set.

Instructions

Call a function module with values and get what it returned, as data. Takes the module name alone - the function group is looked up - reads its signature, generates the call and runs it through a throwaway class in $TMP. The answer carries the exporting, changing and tables parameters by name, sy-subrc turned back into the name of the classic exception it stood for, a class-based exception with its text, and the true row count of every table. Values are checked against the signature before anything is sent: an unknown parameter name and a missing mandatory one are refused with the list of what the module takes. IMPORTANT: this executes the module on the target system as the connected user. Nothing it changed is kept - the call is followed by ROLLBACK WORK - unless commit is set, and a module that commits internally cannot be taken back at all. It counts as a writing tool and is refused in read-only mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFunction module, e.g. Z_APP_GET_INVOICE. The group is found by search.
commitNoKeep what the call did: COMMIT WORK AND WAIT instead of ROLLBACK WORK. Default false. Ask before setting this on a module that posts.
dryRunNoReturn the generated class source without touching the system - the way to see what would run.
valuesNoValues by parameter name: {"IV_LGNUM": "101", "IT_ITEMS": [{"MATNR": "4711"}]}. A structure is an object, a table an array; a scalar can be a string, a number or a boolean. Only importing, changing and tables parameters can be supplied.
maxRowsNoRows of each table kept in the answer, default 20. The true count is reported either way.
keepClassNoLeave the generated class on the system instead of deleting it. Default false.
snippetClassNoName for the throwaway class. Default ZMCP_CALL_<timestamp in base 36>.
functionGroupNoThe group, when the search does not find the module.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.2/5.0
Behavior5/5

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

The description goes well beyond the annotations (readOnlyHint=false, destructiveHint=false) by detailing side effects: it executes on the target system as the connected user, rolls back changes unless commit is set, warns that modules with internal commits cannot be rolled back, and states it is a writing tool refused in read-only mode. It also discloses input validation behavior and output structure, providing rich behavioral context beyond the annotations.

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 lengthy but well-structured, starting with a clear purpose, then mechanics, output details, validation, and finally safety. Every sentence adds useful information for a complex tool with 8 parameters. While it could be trimmed, the density of technical details is appropriate for a low-level function module caller in an ABAP environment.

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

Completeness5/5

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

The description covers all critical aspects an agent needs to invoke the tool correctly: how to specify the module (name), what happens with signature validation, output format (exporting/changing/tables, exceptions, row counts), side effects (rollback, commit, internal commits), and the restriction to read-only mode. Combined with a fully described input schema)Skiping nothing major is missing. The lack of an output schema is compensated by a detailed description of the return value structure.

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 description coverage is 100%, so the baseline for parameter semantics is 3. However, the description adds meaningful context that goes beyond the schema: it explains the role of commit (default rollback, override to keep changes) and clarifies that values are validated against the signature before sending. While dryRun, maxRows, keepClass, and snippetClass are not elaborated in the description, the schema descriptions for those parameters are already sufficient, so the description still adds value for the core parameters.

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 opens with a clear, specific statement: 'Call a function module with values and get what it returned, as data.' It identifies the exact resource (function module) and differentiates from sibling tools like callMethod by naming the resource type. The subsequent details about looking up the function group and generating the call reinforce the purpose.

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 explains what the tool does but never states when to use it over alternatives. It does not mention any exclusions, prerequisites, or comparisons to sibling tools such as callMethod, runClass, or runSnippet. The only contextual clue is the function module emphasis, which implies a use case but is not explicit.

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

Deploy Server

Other Tools