Skip to main content
Glama

unpivot_keep_nulls

Preserve null-valued rows when unpivoting columns: replace nulls with a sentinel, unpivot, then restore the sentinel to null.

Instructions

Unpivot keeping NULL rows: replace nulls with a sentinel, UnpivotOtherColumns, then restore the sentinel to null - because plain unpivot silently DROPS null-valued rows. keepColumns (the columns NOT unpivoted) is comma-separated. Appends three steps to the table's M query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
sessionIdYes
keepColumnsYesthe columns to keep (not unpivot), comma-separated
partitionNameNopartition name (optional; defaults to the first partition)
Behavior4/5

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

The description discloses the algorithm (sentinel substitution, unpivot, restore) and the side effect of appending three steps to the table's M query. This goes beyond the basic operation, revealing how the tool achieves null preservation and what it modifies. No annotations are present, so this transparency is essential and well-delivered.

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 compact at three sentences, each carrying essential information: the purpose with mechanism, the parameter clarification, and the side effect. There is no redundant or filler text, and the most critical information is front-loaded.

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 tool with no output schema and no annotations, the description covers the main behavior, the reason for the behavior, a key parameter's format, and the modification side effect. It does not discuss potential sentinel collisions or error conditions, but these are not essential for basic usage. The description is robust enough for an AI agent to understand when and how to invoke the tool.

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?

The schema provides descriptions for keepColumns and partitionName, but not for table and sessionId (50% coverage). The description repeats the keepColumns semantics and adds the context that keepColumns are the columns not unpivoted, but provides no extra detail for the other parameters. With moderate schema coverage, the description adds some value but does not significantly enhance parameter understanding.

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 a specific verb 'Unpivot' and identifies the key distinction 'keeping NULL rows' and the consequence of plain unpivot dropping nulls. It clearly differentiates from sibling utilities like unpivot_other_columns by focusing on null preservation. The sentinel-based approach is also explained, making the tool's purpose unmistakable.

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?

It states the core use case (preserving null rows) and contrasts it with plain unpivot, which silently drops them. However, it does not explicitly name the alternative tool (e.g., unpivot_other_columns) or provide an explicit 'when not to use' condition. The context is clear but lacks direct sibling differentiation by name.

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/cyphonica/powerbi-pbix-mcp'

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