Skip to main content
Glama
dnic-dev

bw-modeling-mcp

by dnic-dev

bw_query_data

Query BW data or preview provider content via BICS. Prepare by retrieving metadata to set axis layout, filters, and variables accurately.

Instructions

Execute a BW query or preview data from a provider (CompositeProvider, aDSO, etc.) via the BICS reporting endpoint. ALWAYS call the appropriate read tool first before querying data: bw_get_composite_provider for a CompositeProvider (is_provider=true), bw_get_adso for an aDSO (is_provider=true), bw_get_query for a BEx Query — this gives you the available fields, key figures, and the query structure before you attempt a data call. Then perform a GET (no state/variables) first to discover the current axis layout, characteristic ids, variables, and background filters before sending any POST. IMPORTANT — always call bw_get_filter_values before applying any filter or variable value. This is the only way to know the correct internal key format for a characteristic (e.g. date/time characteristics like 0CALMONTH, 0CALYEAR, 0CALDAY may use non-obvious formats). Never guess or assume filter value formats — always look them up first. If the GET response shows inputRequired="true", variables must be filled via POST before data is available. If unsure whether a BEx Query exists for the desired analysis, use bw_search or bw_list_contents first before falling back to a direct provider call (is_provider=true). Result is rendered as a formatted table with hierarchy indentation. KEY FIGURE STRUCTURE FILTER: to restrict which key figures appear in the result, apply filterValues directly on the structure dimension (isStructure=true) in state.infoObjects — use the technical name of the calculated or restricted key figure as the low value (e.g. "CKF_NAME" or "RKF_NAME"). Hierarchical children of the filtered member are included automatically. This is the correct approach because ad-hoc threshold filters on key figure values are not supported via the state mechanism; only structure-member selection is possible this way. CRITICAL: variable id and name values in the variablesContainer are session-specific and change between GET calls. Always extract variable id and name exactly from the variablesContainer in the GET response and use them immediately in the next POST — never reuse IDs from a previous GET call or from bw_get_query output. The variable name includes trailing spaces and a 4-digit suffix (e.g. "VARNAME 0004") that must be copied verbatim from the GET response. format="raw" returns XML.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comp_idYesBEx Query name or InfoProvider name (ADSO, HCPR, etc.) to query.
is_providerNoSet to true when comp_id is an InfoProvider name (CompositeProvider, aDSO, etc.) rather than a BEx Query name. Adds the required "!" prefix to the compid URL parameter. If unsure whether a query exists for the desired analysis, use bw_search or bw_list_contents first to check before falling back to a direct provider call.
formatNo"text" (default): structured human-readable output. "raw": raw XML response body.
stateNoAxis layout and optional per-characteristic filters. All InfoObjects from the query must be listed (even those staying on FREE axis). id values must come from the GET metadata response.
variablesNoVariable values to fill. name must match exactly as returned by GET (may contain trailing spaces). id and other metadata fields come from the GET variablesContainer response.
from_rowNoStart row for pagination (default 0).
to_rowNoEnd row for pagination (default 1000).
drill_operationsNoOptional. Expand or collapse hierarchy nodes or key figure structure nodes in the current result. Each operation targets one node by its 1-based tuple index. drill_state: 3 = expand, 2 = collapse. element_idx: which dimension within the tuple (1 = first, 2 = second, etc.) — use 2 when ROWS has multiple dimensions and the target node is on the second one. Requires the full state and variables to be sent again in the same POST (stateless endpoint). Use after an initial bw_query_data call to drill into a collapsed structure node or hierarchy node.
Behavior5/5

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

With no annotations, the description fully discloses critical behaviors: session-specific variable IDs that change between calls, trailing spaces in variable names, the need for a GET to discover layout and variables, and the key figure structure filter mechanism. It also mentions result rendering and raw XML output.

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 lengthy but front-loaded with the core action and structured with clear steps. Some redundancy exists (e.g., mentioning bw_search twice), but every sentence delivers necessary information for correct usage. Slightly overlong but justified by complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description covers prerequisites, sequence, variable handling, hierarchies, filters, pagination, drill operations, and result format. It addresses all potential agent questions for a complex query tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, yet the description adds substantial meaning: explains the workflow (GET before POST), variable ID reuse dangers, drill operations context, and how filterValues work on structure dimensions. This far exceeds the schema's basic descriptions.

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 description clearly states the tool executes a BW query or previews data from providers. It distinguishes from sibling read tools by specifying that users should call them first to get metadata. The wording is specific and unambiguous.

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?

Explicitly instructs when to use this tool versus alternatives: always call appropriate read tools first, perform GET before POST, call bw_get_filter_values before applying filters, and use bw_search or bw_list_contents when unsure. Provides step-by-step guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dnic-dev/bw-modeling-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server