Skip to main content
Glama

BW Objects (write)

bw_write
Destructive

Create, change, activate, and delete BW objects through BW's own APIs with dry-run validation by default; set commit to true to write changes and record them on Workbench requests.

Instructions

Create, change, activate and delete BW objects through BW's own APIs, recorded on Workbench requests. Dry run unless commit: true.

Actions (pass action plus that action's parameters; connectionId picks the system): • create — Create a BW object through BW's own API, by default activated afterwards. This version creates InfoObjects (type IOBJ) through BAPI_IOBJ_CREATE; bw(action: "capabilities") shows what else the system and this version support. details holds BAPI6108 fields, for example a characteristic: { TYPE: "CHA", DATATP: "CHAR", INTLEN: 10, TEXTSHORT: "Short", TEXTLONG: "Long text", INFOAREA: "" }, a key figure: { TYPE: "KYF", KYFTP: "AMO", UNINM: "0CURRENCY" }; an unknown field is refused; read an existing one with bw(action: "read") to see the fields. Required: type, name, definition. Optional: package, activate, commit, transport, workItem, showAllTransports. • change — Change a BW object through BW's own API, starting from its current definition: values sets single fields, and a table given replaces that table. By default activated afterwards. This version changes InfoObjects through BAPI_IOBJ_CHANGE. Required: type, name. Optional: values, compounds, attributes, navigationAttributes, activate, commit, transport, workItem, showAllTransports. • activate — Activate a BW object's modified version through BW's own API (InfoObjects: BAPI_IOBJ_ACTIVATE_MULTIPLE). Dry run unless commit: true; records on a Workbench request when the object's package records changes. Required: type, name. Optional: commit, transport, workItem, showAllTransports. • delete — Delete a BW object through BW's own function (InfoObjects: RSDG_IOBJ_MULTI_DELETE), which refuses while other objects still use it (see bw(action: "where_used")). In a package that records changes the object is first recorded on a Workbench request, so the deletion reaches the other systems when the request is imported; an object already locked on a request uses that one. Dry run unless commit: true. Required: type, name. Optional: commit, transport, workItem, showAllTransports.

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": {
      "action": "<action>"
    },
    "name": "bw_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoObject name (e.g. ZCUSTOMER, 0MATERIAL)
typeNoBW object type (TLOGO) as BW names it: IOBJ InfoObject, ADSO DataStore object (advanced), AREA InfoArea, HCPR CompositeProvider, TRFN transformation, DTPA DTP, RSPC process chain, CUBE InfoCube, ODSO classic DSO, … (bw(action: "capabilities") lists the system's types)
actionYesWhat to do: create, change, activate, delete (see the tool description)
commitNotrue writes; default is a dry run that checks and reports only
valuesNochange: Fields to set, e.g. { TEXTLONG: "New text" } (BAPI6108 names for an InfoObject)
packageNocreate: Package of the new object (default $TMP: local, not transported)
activateNocreate: Activate after creating (default true) | change: Activate after changing (default true)
workItemNoName of the piece of work, to keep using one transport for it
compoundsNochange: Replace the compound rows
transportNoWorkbench request to record on, for an object in a package that records changes; without it the open requests are offered
attributesNochange: Replace the attribute rows
definitionNocreate: The object's definition in the fields of BW's API for its type
connectionIdNoSAP system connection ID
showAllTransportsNoOffer everyone's open Workbench requests, not just yours
navigationAttributesNochange: Replace the navigation attribute rows

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, and the description goes well beyond them: dry run unless commit: true, automatic activation after create/change, recording on a Workbench request, transport selection behavior, reuse of an already-locked request, and delete refusing while the object is still in use. It also discloses that an unknown field in the definition is refused. These are real operational consequences an agent cannot infer from the schema.

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 overview is front-loaded and each action is a scannable bullet with a Required/Optional tail, so length is justified by the four distinct operations. There is mild redundancy in repeating 'through BW's own API' in every bullet, but it serves the trust differentiator. No filler sentences.

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 15-parameter destructive tool with nested definition objects and no output schema, the description covers all four actions, defaults, transport/package implications, and one failure mode (delete refused while in use). It leaves the dry-run report contents and other error/validation outcomes unstated, and doesn't say what a successful call returns since no output schema exists. That is a modest gap rather than a blocking one.

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 coverage is 100%, so the baseline is 3, but the description adds action-to-parameter mapping that the flat schema cannot express (e.g. type/name/definition for create, values/compounds/attributes/navigationAttributes for change, only type/name for activate and delete). It also supplies concrete BAPI6108 field examples and notes that the package defaults to $TMP, that activate defaults to true, and that transport offers open requests. Marginal gap: workItem and showAllTransports are not elaborated in the description, though the schema covers them.

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 opening sentence names the exact verbs (create, change, activate, delete) and the resource (BW objects), plus the mechanism (BW's own APIs, Workbench recording). It positions itself against the read sibling by naming bw(action: "read"), bw(action: "capabilities") and bw(action: "where_used") as lookup companions. An agent can tell immediately this is the mutation tool for BW objects.

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

Usage Guidelines4/5

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

Each action bullet states its own scope, required vs. optional parameters, and the underlying API (BAPI_IOBJ_CREATE, BAPI_IOBJ_CHANGE, BAPI_IOBJ_ACTIVATE_MULTIPLE, RSDG_IOBJ_MULTI_DELETE), and delete explicitly points to where_used before attempting removal. What's missing is an explicit comparison to sibling write tools such as abap_write or transport_write for the case where the target is not a BW object. The dry-run-by-default rule and commit: true gate are stated clearly.

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