Skip to main content
Glama
vilsem-mcp
by bcsnpc

preview_visual

Preview and validate a custom ECharts visual from a Vilsem spec and model bindings; render a PNG with options and actionable critique before adding it to a PBIR report.

Instructions

Validate a Vilsem spec, query actual bound fields and return PNG plus option and actionable critique (default true). Critique uses rendered text bounds and option checks; inspect its limitations and iterate before committing. Theme defaults to the report theme when reportDir is supplied, light otherwise. Explicit spec.canvasTheme overrides unless a stored pane override requests report theme. maxRows is 1..10000 (default 200); bounded queries do not prove population coverage. This does not write a report.

Input Schema

NameRequiredDescriptionDefault
specYes
themeNo
widthNo
heightNo
localeNoen-US
maxRowsNo
bindingsYes
critiqueNo
reportDirNo
connectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / bindings / properties / measures / maxItems
      Previous value: -3New value: +6
    • addedInput schema / properties / critique
      Added value: +{
      +  "default": true,
      +  "type": "boolean"
      +}
    • addedInput schema / properties / locale
      Added value: +{
      +  "default": "en-US",
      +  "maxLength": 64,
      +  "minLength": 2,
      +  "type": "string"
      +}
    • addedInput schema / properties / maxRows
      Added value: +{
      +  "default": 200,
      +  "maximum": 10000,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / reportDir
      Added value: +{
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / theme
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "report",
      +        "light",
      +        "dark"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    }
      +  ]
      +}
  2. First observedv0.6.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the load and does so well: it declares critique defaults to true, explains the theme resolution precedence chain (report theme when reportDir supplied, explicit spec.canvasTheme overrides, stored pane override wins), and warns that bounded queries do not prove population coverage. Gaps remain around render cost/latency and permissions, but the mutability and defaulting behaviour are unusually well disclosed.

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?

Front-loaded with the core action and output, and no sentence is filler — each one adds either a default, a precedence rule, or a caveat. Some sentences pack multiple clauses (theme resolution) and read as terse internal shorthand, costing a bit of scannability.

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

Completeness3/5

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

For a 10-parameter tool with nested objects, no annotations and no output schema, the description covers the render/critique outcome and the tricky defaulting behaviour, but leaves the shape of the returned PNG payload and the era/critique result unexplained, and says nothing about bindings semantics. Adequate to call it, not quite enough to call it confidently the first time.

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 0%, so the description must compensate and it partly does: theme, reportDir, critique and maxRows (1..10000, default 200) all get meaning and precedence rules beyond the bare schema. However width, height, locale, connectionId and especially the nested bindings.measures/dimensions structure are left entirely to the schema, and "bindings" is the most complex parameter present.

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?

States specific verbs and outputs: validate a spec, query bound fields, return a PNG plus critique, and explicitly negates a neighbouring capability ("This does not write a report"). It is distinguishable from commit_visual/validate_spec by the rendering-plus-critique output, though it never names a sibling, and the phrase "plus option and actionable critique" is awkward enough to blur what exactly is returned.

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?

Gives real workflow direction: "inspect its limitations and iterate before committing," which tells the agent to loop on previews before persisting. It also signals the tool is non-writing. It stops short of routing to alternatives such as preview_variants or validate_spec, so the agent must infer which preview/validation tool to pick.

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