Skip to main content
Glama

GetFunctionModule

Reads an ABAP function module's source code or ADT metadata from a function group, including active or inactive versions, to inspect its signature, package, and responsible.

Instructions

[read-only] Reads the ABAP function module named by function_module_name, BAPI or RFC-enabled ones included, in the function group named by function_group_name, in one request: its source code, which declares the parameter signature (part "source", the default; active or inactive version), or its ADT metadata document (part "metadata": package, responsible, description). Returns the part read. Recordable: in batch mode a call is recorded under the next number and answers with empty content; its answer is read by number after the batch ends.

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
versionNoVersion of the source: "active" (default) for the deployed version, "inactive" for the modified version awaiting activation.active
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 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."
  2. 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."
  3. 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"
      +]
  4. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the behavioral burden well: it labels the operation read-only, describes the returned document by part, and explains batch-mode recording and delayed answer retrieval. It does not cover permissions or rate limits, but the key read behavior is disclosed.

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 front-loaded with the core read operation and then adds part/version and batch semantics. It is dense but efficient; the long opening sentence is justified by the amount of relevant behavior it conveys.

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 retrieval tool with no annotations and no output schema, the description is complete enough: it specifies what can be read, the default part, version choice, and batch behavior. Minor missing details like auth requirements do not significantly hinder correct invocation.

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 parameter meanings are already well documented. The description adds minor nuance such as BAPI/RFC-enabled modules being included, but most parameter semantics are already present in the schema.

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?

Clearly states a specific verb and resource: reads an ABAP function module in a function group, including BAPI/RFC-enabled ones, and returns either source or metadata. The purpose is precise, though it does not explicitly name sibling alternatives such as GetFunctionModuleVersions or ListFunctionModules.

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?

Provides useful within-tool guidance on part selection and active/inactive versions, but does not state when to use this tool versus related siblings like GetFunctionModuleVersionSource, GetFunctionGroup, or ListFunctionModules. Usage is implied by the parameter semantics rather than explicitly routed.

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