Skip to main content
Glama

Add slicer

add_slicer

Add a slicer or timeline to filter a PivotTable or table. Select items, hide empty ones, and connect multiple PivotTables sharing the data cache.

Instructions

Add a slicer (Insert > Slicer) or timeline that filters a PivotTable or table.

selected_items filters as clicking buttons does. A PivotTable not made by create_pivot_table keeps its old figures until Excel recalculates on open.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atYes
nameNoDefault: the field name.
pathYes
sortNoItem order.ascending
fieldYesColumn header or field, e.g. 'Months (Date)' for a date group.
sheetYesSheet for the slicer.
styleNoe.g. SlicerStyleDark2, TimeSlicerStyleLight1 (timeline).
targetYesTable or PivotTable to filter.
captionNoDefault: the field.
columnsNoButton columns.
connectNoMore PivotTables sharing the target's data cache.
timelineNoMake a timeline instead, for a date field of a PivotTable.
width_cmNoDefault: 5.1 (timeline: 9.3).
height_cmNoDefault: 7.4 (timeline: 3.8).
selected_itemsNoItems to show. Default: all.
hide_empty_itemsNoHide items without data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare it is a non-read-only, non-idempotent, non-destructive mutation. The description adds genuinely non-obvious behavior beyond that: selected_items behaves like clicking buttons, and a PivotTable not made by create_pivot_table retains stale figures until Excel recalculates on open. That recalculation caveat is valuable operational context an agent could not derive from 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?

Three tight sentences, front-loaded with the core action, and each sentence adds distinct value (purpose, selection semantics, recalculation caveat). No redundant restatement of the name.

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 16-parameter mutation tool with no output schema and annotations present, the description covers the essential non-derivable behavior. It does not detail defaults for name/caption or connect semantics, but the schema covers those, so it is nearly complete.

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 high (88%), so the schema already carries most parameter meaning (baseline 3). The description adds semantic clarification for selected_items ('filters as clicking buttons does') that goes beyond the schema text, lifting it above baseline.

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 and resource: adding a slicer or timeline that filters a PivotTable or table, with the parenthetical UI reference (Insert > Slicer) pinning the exact concept. It also references sibling create_pivot_table to distinguish behavior, so an agent can tell what this does without ambiguity.

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?

Usage is implied by the purpose (add a slicer/timeline to filter a pivot or table), but there is no explicit when-to-use versus delete_slicer or create_pivot_table, and no prerequisite/condition guidance. Adequate but leaves selection context to inference.

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