Skip to main content
Glama
bw-modeling-mcp

bw-modeling-mcp

by dnic-dev

bw_write_query

Create or modify SAP BW queries and their reusable components—layouts, filters, key figures, variables, structures, cells, exceptions, settings, and role assignments.

Instructions

Create or change a query and its reusable components: layout, filter, key figures, characteristics, cells, exceptions, settings, restricted and calculated key figures, structures, variables, role assignments. The operation enum lists every operation with what it requires; bw_describe(tool: "bw_write_query", operation: "…") gives the complete parameter definition of one.

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": {
      "operation": "<operation>"
    },
    "name": "bw_write_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
actionNo"add" to publish, "remove" to unpublish. [set_roles]
formulaNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_ckf, update_ckf]
membersNoMembers, in display order. [create_structure]
packageNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [4 of 17 operations]
currencyNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
decimalsNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_ckf, update_ckf]
reusableNoWhether the variable can be reused in multiple queries. [create_variable]
copy_fromNoTechnical name of an existing query to copy (e.g. [create]
dimensionNoFormula variables only: what the number stands for. [create_variable]
info_areaNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_rkf, create_ckf, create_structure]
iobj_nameNog. [create_variable]
operationYesOperation — one of: create: Create a new BW Query (TLOGO ELEM) on an InfoProvider in package $TMP. Requires query_name. | update_layout: Modify an existing BW Query layout: add or remove characteristics in the rows, columns, or free-characteristics area, and add or remove references to reusable… Requires query_name, operations. | update_filter: Modify an existing BW Query filter. Requires query_name, operations. | update_key_figures: Manage the key figure structure and the characteristic structure of an existing BW Query: add basic key figures, add references to reusable CKFs/RKFs (with opt… Requires query_name, operations. | update_characteristic: Set the display and access properties of the characteristics in an existing BW Query - the per-characteristic settings of the rows, columns, and free-character… Requires query_name, characteristics. | update_cells: Manage the cell definitions of an existing BW Query that has two structures (one on each axis): add reference cells (make the value at an intersection of a mem… Requires query_name, operations. | update_exceptions: Manage the exceptions (alert levels that colour data cells) of an existing BW Query: add exceptions with thresholds per alert level, change them, and remove th… Requires query_name, operations. | update_settings: Change query-level display and behaviour settings of an existing BW Query (description, zero suppression, result position, sign presentation, zero presentation… Requires query_name. | create_rkf: Create one reusable Restricted Key Figure (RKF, TLOGO ELEM) on an InfoProvider. Requires provider_name, technical_name, description, base_key_figure, restrictions. | update_rkf: Change a reusable Restricted Key Figure in place: description, base key figure and/or restrictions. Requires component_name. | create_ckf: Create a reusable Calculated Key Figure (CKF) on an InfoProvider. Requires provider_name, technical_name, description, formula. | update_ckf: Change a reusable Calculated Key Figure. Requires component_name. | create_structure: Create a reusable key figure structure on an InfoProvider — the object reporting queries embed as an axis, so that one definition drives all of them. Requires provider_name, technical_name, description. | update_structure: Change a reusable structure: add, remove or re-configure members. Requires component_name, operations. | create_variable: Create a reusable BW Variable, created active and consistent. Requires variable_name, description. | update_variable: Change a reusable BW Variable in place: description, input readiness, input type (optional / mandatory), selection type and processing type, and on a formula v… Requires variable_name. | set_roles: Publish or unpublish a BW query in a role or folder. Requires query_name, action, target_name, target_type.
structureNoStructure the operations address (default "key_figures"). [update_key_figures]
transportNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [8 of 17 operations]
input_typeNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
operationsNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [7 of 17 operations]
query_nameNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [9 of 17 operations]
representsNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
descriptionNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [10 of 17 operations]
target_nameNoFor target_type "role": the name attribute of the ROLE node (e.g. [set_roles]
target_typeNo"role" to assign at role level, "folder" to assign into a specific subfolder. [set_roles]
infoproviderNoTechnical name of the InfoProvider the query is built on (e.g. [create]
offset_startNoText variables by replacement path only: first character of the value shown, counted from 0 (default 0). [create_variable]
restrictionsNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_rkf, update_rkf]
default_valueNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
offset_lengthNoText variables by replacement path only: number of characters shown; 0 (default) shows the rest. [create_variable]
provider_nameNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_rkf, create_ckf, create_structure]
variable_nameNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
variable_typeNoWhat the variable stands for: a characteristic value (default), a whole hierarchy, hierarchy nodes, a number… [create_variable]
component_nameNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [update_rkf, update_ckf, update_structure]
document_linksNoDocument link visibility. [update_settings]
technical_nameNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_rkf, create_ckf, create_structure]
base_key_figureNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_rkf, update_rkf]
characteristicsNoOne entry per characteristic, or a single entry with infoobject "*" for all of them. [update_characteristic]
master_languageNoLanguage code for the descriptions (e.g. [create_variable]
processing_typeNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
ready_for_inputNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_variable, update_variable]
parent_role_nameNoRequired when target_type is "folder". [set_roles]
replacement_typeNoText variables by replacement path only: what the text shows of the characteristic value — the key (default),… [create_variable]
structure_targetNoContainer for the key figure structure when it is created by the first add operation (default "columns"), and… [update_key_figures]
adjust_formattingNoAdjust formatting. [update_settings]
development_classNoPackage name (e.g. [create_variable]
sign_presentationNoSign presentation (e.g. [update_settings]
transport_requestNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [7 of 17 operations]
result_position_topNoPlace the result row on top. [update_settings]
show_scaling_factorNoShow the scaling factor. [update_settings]
replacement_intervalNoText variables by replacement path only: for a range, the lower bound (default), the upper bound, or the diff… [create_variable]
replacement_variableNog. [create_variable]
result_position_leftNoPlace the result column on the left. [update_settings]
used_as_infoproviderNoRelease the query as an InfoProvider. [update_settings]
exception_aggregationNoDefined per operation — bw_describe(tool: "bw_write_query", operation: "…") gives each definition. [create_ckf, update_ckf]
zero_suppression_rowsNoSuppress zero-value rows. [update_settings]
hierarchy_display_rowsNoUniversal display hierarchy for rows. [update_settings]
zero_presentation_kindNoZero presentation kind (e.g. [update_settings]
zero_suppression_columnsNoSuppress zero-value columns. [update_settings]
hierarchy_display_columnsNoUniversal display hierarchy for columns. [update_settings]
suppress_repeated_key_valuesNoSuppress repeated key values. [update_settings]
zero_presentation_custom_valueNoCustom value shown for zeros. [update_settings]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It implies mutation ("Create or change"), but never states whether changes take effect immediately or require activation (bw_activate is a sibling), how transport requests are handled, or what permissions are needed. The schema hints at transport parameters for 8 of 17 operations, but the description itself discloses no side effects, reversibility, or failure modes.

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?

Two sentences, front-loaded and zero-waste: scope first, then the dispatch mechanism. The component enumeration in sentence one is long but earns its place because it is the only place the tool's full surface (17 operations) is summarized. The "…" ellipsis style is a minor readability cost.

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 59-parameter polymorphic write tool with no annotations and no output schema, the description does the essential job: it establishes the write surface and points the agent to bw_describe for per-operation contracts, which the rich enum already backs up. The notable gap is lifecycle semantics — whether results must be activated or transported — which an agent calling a BW write tool genuinely needs.

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?

Nominal schema coverage is 100%, but many parameter descriptions are placeholders ("Defined per operation — bw_describe(...)"). The description is what explains that this stubbing is deliberate and resolver-based, telling the agent the schema is polymorphic and must be resolved per operation. That is real meaning added beyond the structured fields; it does not, however, explain any specific parameter's format or constraints.

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 opens with a specific verb+resource ("Create or change a query") and then enumerates the scope precisely — layout, filter, key figures, characteristics, cells, exceptions, settings, RKFs/CKFs, structures, variables, role assignments. That covers all 17 operations and makes the tool's reach unmistakable. It does not differentiate against sibling write tools (bw_write_adso, bw_write_composite_provider, etc.), so it falls short of 5.

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?

It gives genuinely actionable routing guidance: the operation enum carries per-operation requirements, and bw_describe(tool: "bw_write_query", operation: "…") must be called to obtain the complete parameter definition of a single operation. That tells the agent how to drive a polymorphic 59-param tool. It gives no when-not-to-use guidance or exclusions (e.g. read paths via bw_query_data, activation via bw_activate).

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