Skip to main content
Glama
sap-mcp

sap-mcp

by abap-studio

update_function_module

Overwrite the complete source of an existing SAP function module, with locking, write, unlock, and optional activation; production writes are refused.

Instructions

Overwrite the whole source of an EXISTING function module. Locks, PUTs, unlocks, then optionally activates. Refuses to run on production profiles. REPLACES the entire FM (FUNCTION ... ENDFUNCTION.) - read it first and send the complete result back. Prefer patch_function_module for small edits. Pass the group WITHOUT the SAPL prefix.

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": {
      "functionGroup": "<functionGroup>",
      "functionModule": "<functionModule>",
      "source": "<source>"
    },
    "name": "update_function_module"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesComplete new FM source - REPLACES the entire module
activateNoActivate after writing. Default false - activate in SE37.
transportNoTransport request. Omit only for local/$TMP objects.
functionGroupYesFunction group WITHOUT the SAPL prefix, e.g. ZABLMM_QCF_WF
functionModuleYesFunction module name, e.g. ZABLMM_QCF_WF_APPROVE

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the lock/PUT/unlock sequence, that activation is optional, the production-profile refusal, and the destructive replace semantics. It stops short of permissions needed or what happens on partial failure mid-lock, which keeps it from a 5.

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

Conciseness5/5

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

Four short sentences, front-loaded with the destructive overwrite warning before the mechanics and the alternative. No filler; each sentence adds a distinct constraint.

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 destructive, high-risk write tool with no output schema, the description covers the operation sequence, the replacement hazard, the read-first prerequisite, and the environment guard. It does not address the return value or post-write state, but the essential decision information is present.

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 five parameters are already documented, including the SAPL-prefix warning and the transport caveat. The description's only added phrase ('Pass the group WITHOUT the SAPL prefix') repeats the schema, so baseline 3 applies.

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?

States a specific verb and resource ('Overwrite the whole source of an EXISTING function module') and immediately distinguishes itself from patch_function_module and create_function_module by insisting it REPLACES the entire FUNCTION...ENDFUNCTION body. An agent can route correctly without opening the schema.

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

Usage Guidelines5/5

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

Gives an explicit alternative with a condition ('Prefer patch_function_module for small edits') and a prerequisite workflow ('read it first and send the complete result back'). Also states an environment exclusion ('Refuses to run on production profiles'), so the agent knows when the call will not proceed.

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