Skip to main content
Glama
dnic-dev

bw-modeling-mcp

by dnic-dev

bw_query_statistics

Read SAP BW query runtime statistics (RSDDSTAT) without SAP GUI: execution counts, users, runtimes, runtime outliers, or step_uid navigation-step layer breakdown.

Instructions

Read the BW query statistics (RSDDSTAT) of any frontend, as RSRT statistics and ST03 show them, without SAP GUI. With query_name or provider: the executions in a time window (default the last 24 hours) — count, the last execution and its user, executions per user, min / median / p90 / max runtime (over the latest 5,000 when there are more), plus the breakdown of the slowest ones. With step_uid: one navigation step in full — BW runtime by layer, top events, records read and transferred, the effective "Operations in SAP HANA" setting and the data manager time per provider. Statistics must be switched on for the object (transaction RSDDSTAT). To measure one call of this server, use bw_query_data with_statistics instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoEnd of the window (default now).
fromNoStart of the window, ISO date or timestamp (UTC unless an offset is given).
hoursNoWindow length when from is not given (default 24).
slowestNoHow many of the slowest executions to break down (default 3, at most 10, 0 for none).
providerNoInfoProvider queried directly, as bw_query_data with is_provider does (e.g. "PROVIDER_NAME").
step_uidNoOne navigation step, as shown in an earlier answer.
query_nameNoQuery whose executions to read (e.g. "QUERY_NAME").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.1

TDQS

A4.6/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 organizational prerequisite (statistics enabled in RSDDSTAT), the runtime sampling rule (min/median/p90/max over the latest 5,000 when there are more), and the default window. It doesn't explicitly confirm read-only safety, but 'Read' strongly implies a non-mutating operation.

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?

Dense but well-structured, starting with what it reads and following with mode-specific behavior, prerequisite, and alternative. Every sentence carries information; it is on the longer side for a tool description but not padded.

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?

There is no output schema and no annotations, so the description compensates by enumerating the returned metrics (count, last execution and user, per-user executions, runtime percentiles, slowest breakdown; and for step_uid the per-layer runtime, top events, records, HANA setting, data manager time). An agent has enough to call and interpret it.

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 baseline is 3, but the prose adds real meaning: it explains the mutual exclusivity/roles of query_name vs provider vs step_uid and notes that slowest is capped (at most 10, 0 for none). This goes beyond the schema 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?

States a specific verb (Read) and resource (BW query statistics / RSDDSTAT), and enumerates the two distinct access modes (query_name/provider vs step_uid). It also names a sibling (bw_query_data with_statistics) so the agent can distinguish it from alternatives.

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 maps each parameter mode to its use: query_name/provider for windowed executions, step_uid for one navigation step. It states the prerequisite (statistics must be switched on via RSDDSTAT) and redirects a related need — measuring a server call — to bw_query_data with_statistics.

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