Skip to main content
Glama

GetFunctionModule

Read ABAP function module source, parameters, or metadata—including BAPI and RFC-enabled modules—to inspect code and interfaces without modifying the system.

Instructions

[read-only] Reads the current source code of an ABAP function module (FUGR), BAPI and RFC-enabled ones too, with its parameter signature, or its metadata.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "function_module_name": "<function_module_name>",
      "function_group_name": "<function_group_name>"
    },
    "name": "GetFunctionModule"
  }
}

Input Schema

NameRequiredDescriptionDefault
partNoThe document to read: "source" (default) the source code, "metadata" the ADT metadata document (package, responsible, description, ...).source
versionNoThe version read: "active" (default) the activated version, "inactive" the version saved and awaiting activation, "workingArea" the version in the working area, as ADT answers it.active
end_lineNoLast line of the source to answer, included. Without it, to the last line.
start_lineNoFirst line of the source to answer, from 1. Without it, from the first line.
function_group_nameYesFunction group containing the function module.
function_module_nameYesFunction module name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / end_line
      Added value: +{
      +  "description": "Last line of the source to answer, included. Without it, to the last line.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / start_line
      Added value: +{
      +  "description": "First line of the source to answer, from 1. Without it, from the first line.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / version / description
      Previous value: -"Version of the source: \"active\" (default) for the deployed version, \"inactive\" for the modified version awaiting activation."New value: +"The version read: \"active\" (default) the activated version, \"inactive\" the version saved and awaiting activation, \"workingArea\" the version in the working area, as ADT answers it."
    • changedInput schema / properties / version / enum
      Previous value: -[
      -  "active",
      -  "inactive"
      -]New value: +[
      +  "active",
      +  "inactive",
      +  "workingArea"
      +]
  2. Changed4 schema fields changedv20.1.0
    • changedInput schema / properties / function_group_name / description
      Previous value: -"FunctionGroup name containing the function module."New value: +"Function group containing the function module."
    • changedInput schema / properties / function_module_name / description
      Previous value: -"FunctionModule name."New value: +"Function module name."
    • addedInput schema / properties / part
      Added value: +{
      +  "default": "source",
      +  "description": "The document to read: \"source\" (default) the source code, \"metadata\" the ADT metadata document (package, responsible, description, ...).",
      +  "enum": [
      +    "source",
      +    "metadata"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / version / description
      Previous value: -"Version to read: \"active\" (default) for deployed version, \"inactive\" for modified but not activated version."New value: +"Version of the source: \"active\" (default) for the deployed version, \"inactive\" for the modified version awaiting activation."
  3. Changed2 schema fields changedv16.0.0
    • changedInput schema / properties / function_group_name / description
      Previous value: -"FunctionGroup name containing the function module (e.g., Z_MY_FUNCTIONGROUP)."New value: +"FunctionGroup name containing the function module."
    • changedInput schema / properties / function_module_name / description
      Previous value: -"FunctionModule name (e.g., Z_MY_FUNCTIONMODULE)."New value: +"FunctionModule name."
  4. Changed2 schema fields changed
    • addedInput schema / properties / function_group_name
      Added value: +{
      +  "description": "FunctionGroup name containing the function module (e.g., Z_MY_FUNCTIONGROUP).",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "function_module_name"
      -]New value: +[
      +  "function_module_name",
      +  "function_group_name"
      +]
  5. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose that the operation is read-only and that it returns current source with parameter signature or metadata, but it omits permission requirements, error behavior, and whether line-range parameters apply only to source reads.

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 definition is a single front-loaded sentence with no redundant sentences. The phrasing "BAPI and RFC-enabled ones too" is slightly informal but adds useful scope information efficiently.

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?

For a read-only getter with fully documented parameters and no output schema, the description sufficiently explains that the result is either source code (including signature) or metadata. Minor gaps remain around version selection and line-range applicability, but the core behavior is clear.

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 all six parameters are already documented in the schema. The description adds only the broad correspondence between "source" and "metadata" and the mention of parameter signature; it does not clarify version semantics or line-range behavior beyond what the schema provides.

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 uses a specific verb ("Reads") and resource ("current source code of an ABAP function module") and clarifies that it covers FUGR, BAPI, and RFC-enabled modules, plus metadata. The word "current" implicitly distinguishes it from version-specific siblings such as GetFunctionModuleVersionSource, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is implied: read the current source or metadata of a function module. However, the description gives no explicit guidance on when to choose this tool over GetFunctionModuleVersionSource or GetFunctionModuleVersionDiff, nor when to prefer "source" versus "metadata" beyond the schema defaults.

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