Skip to main content
Glama

dashboard.get_widget_script

dashboard_get_widget_script
Read-only

Retrieves a widget script from a Sisense dashboard export and wraps it for rendering. Provide dashboard and widget IDs to get the script.

Instructions

Build a formatted widget script helper object. Retrieves a dashboard export payload, selects a widget by index/key, and wraps its script content in a :class:SisenseScript helper for downstream rendering. Returns: SisenseScript | dict[str, str] A :class:SisenseScript instance when the widget is found and has a script. {"error": "..."} when the export fails (including status_code for HTTP failures such as missing …

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widget_idYesThe widget identifier or lookup key used in the exported widget mapping.
dashboard_idYesThe dashboard identifier to export.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds meaningful behavior: it retrieves an export payload, selects by index/key, wraps script content, and returns an error dict with status_code on export failure. This is useful context beyond the annotations.

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 compact and front-loaded with the main purpose. The return behavior is appended clearly. Minor redundancy exists ('Build...helper' and later 'wraps...helper') but it is not bloated.

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 read-only tool with two fully documented parameters and annotations, the description covers the main operation, return type, and failure mode. It does not explain the case where the widget is found but has no script, but this is a minor gap given the overall clarity.

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 coverage is 100%, so the schema already documents both parameters. The description adds minimal new meaning; it mentions selection by index/key but does not enrich the parameter definitions beyond what the schema already states.

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 uses specific verbs ('Retrieves', 'selects', 'wraps') and a clear resource (widget script for downstream rendering). It is clearly distinct from siblings like dashboard_get_dashboard_script and dashboard_get_widget_by_id, so an agent can tell what this tool does.

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?

The description clearly indicates the use case: get a widget's script wrapped in a SisenseScript helper for downstream rendering. It does not explicitly name alternatives or exclusion criteria, but the context is strong enough to guide selection among similar dashboard tools.

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