Skip to main content
Glama

Components Switch Type

components_switch_type
Destructive

Converts chart components between types or presets with a preview of setting changes. Validates dimensions and metrics, and blocks lossy writes unless allow_loss is set.

Instructions

Convert chart types/presets through isolated native editor transformations.

Preview exposes all changed/removed settings and before/after bindings. Optional dimensions/metrics select source fields or validated expressions before validation; omitted roles retain native conversion, empty lists clear a supported role. Metrics require explicit aggregation; aggregate expressions use AUTO (7). concept_name retains an existing local field ID. Special roles remain separate work. Non-preview writes require allow_loss when settings or fields disappear/change. Same datasource, static ungrouped non-composite charts; conditional formatting remapping and other contexts remain separate work. Requires report_refresh, page_get fingerprint and matching datasource draft/published. One journaled page write/read-back/undo. No claim of equivalent rendering or numeric results.

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": {
      "page_id": "<page_id>",
      "changes": "<changes>",
      "expected_fingerprint": "<expected_fingerprint>"
    },
    "name": "components_switch_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
changesYes
dry_runNo
page_idYes
report_idNo
allow_lossNo
expected_fingerprintYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.5

TDQS

A3.9/5.0
Behavior5/5

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

Goes far beyond the annotations (readOnlyHint=false, destructiveHint=true): it explains preview vs. non-preview behavior, that non-preview writes require allow_loss when settings disappear, that it is one journaled page write with read-back and undo, and that it requires a page_get fingerprint plus matching draft/published datasource. It even disclaims equivalence of rendering or numeric results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and every clause carries information, but the prose is telegraphic and fragmentary ('Special roles remain separate work.'), with semicolon-chained requirements that are hard to parse. Dense but not efficiently structured for an agent skimming it.

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 complex destructive mutation with 6 params and nested change objects, the description covers safety gating, prerequisites, transactional semantics, and validation flow, which is substantial. Remaining gaps are minor given a rich input schema and an output schema that documents return values.

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 description coverage is 0%, so the description must compensate, and it largely does: it explains dimensions/metrics selecting source fields vs. validated expressions, omitted roles retaining native conversion, empty lists clearing a role, aggregation requirements with AUTO (7), and concept_name reusing a local field ID. It leaves page_id, component_id, report_id and expected_fingerprint only implicitly defined (the latter via 'page_get fingerprint').

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 a specific verb and resource ('Convert chart types/presets through isolated native editor transformations'), which clearly separates it from generic mutation siblings like components_patch or components_create. The phrase 'native editor transformations' is somewhat abstract but still identifies the operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real applicability constraints ('same datasource, static ungrouped non-composite charts') and exclusions ('conditional formatting remapping and other contexts remain separate work'), which is useful scoping. However, it never names an alternative tool for the excluded cases, so the agent must guess which sibling handles unsupported contexts.

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