Skip to main content
Glama

unpivot_data

Reshape wide Excel data into a long format by choosing identifier columns and value columns to melt. This enables easier analysis and visualization of unpivoted datasets.

Instructions

Melt (unpivot) wide-form data to long-form using id_vars and value_vars.

Args: file_path: Workbook path. sheet_name: Source sheet. id_vars: Columns to keep as identifiers. value_vars: Columns to melt into variable/value pairs. var_name: Name for the variable column. value_name: Name for the value column.

Returns: dict: Result summary and destination range if written.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_varsYes
var_nameNoVariable
file_pathYes
sheet_nameYes
value_nameNoValue
value_varsYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'destination range if written' but does not clarify whether the tool modifies the workbook in place, creates a new sheet, or merely returns a range. This ambiguity is a significant gap for a mutation tool.

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

Conciseness5/5

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

The description is a clean docstring-style format with a one-sentence purpose followed by a concise parameter list and a return note. Every line adds value, and the main functionality is front-loaded.

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?

The core operation and parameters are explained, but important contextual details are missing: how the output is positioned (e.g., new sheet vs. overwrite), whether the operation is reversible, and example usage. Given the tool's complexity and lack of an output schema, the description could provide more implementation specifics.

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?

The schema has no descriptions for any of the 6 parameters, but the description provides a brief, meaningful explanation for each: file_path (Workbook path), sheet_name (Source sheet), id_vars (identifiers), value_vars (melt columns), var_name, and value_name. This compensates well for the 0% schema coverage.

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 clearly states the tool's function with a specific verb ('Melt (unpivot)') and resource ('wide-form data to long-form'), and it distinguishes itself from sibling tools by referencing id_vars and value_vars directly. This is a precise, non-tautological purpose.

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 provides clear context on when to use the tool: when data needs to be reshaped from wide to long format. It does not explicitly list alternatives or exclusions, but the purpose is specific enough that a user can infer appropriate usage.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mbeps/excel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server