Skip to main content
Glama

set_visual_sort

Set an existing visual's sort order by a field, ascending or descending, so top performers lead and blank rows fall to the bottom.

Instructions

Set the SORT ORDER of an EXISTING visual (table/matrix/chart): order its query by a field, asc or desc. kind=column|measure. Use descending=true to sort a ranking by sales/value so the top performers lead and blank-rank/zero rows fall to the bottom (the fix for 'blanks at the top'). The field should be one already shown in the visual.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNocolumn|measuremeasure
fieldYesfield (column or measure) to sort by
tableYestable that owns the sort field
pageNameYes
descendingNotrue = descending (largest first), false = ascending
visualNameYes
reportSessionIdYes
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose behavioral traits: it modifies the visual's query order, describes the effect of descending=true on blank/zero rows, and emphasizes the field must already be in the visual. It does not detail side effects or reversibility, but for a sort operation this is adequate, earning a 4.

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?

The description is three sentences long and front-loads the main purpose. It efficiently conveys key constraints and a usage tip, though the 'kind=column|measure' sentence could be more naturally integrated. No unnecessary filler, so it earns a 4.

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 7-parameter tool with no output schema and no annotations, the description covers purpose, key parameter behavior, a common pitfall fix, and a prerequisite. It doesn't address error handling or persistence, but these are less critical for a sorting operation. Overall, it is sufficiently complete for an agent to select and invoke correctly, earning a 4.

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 description coverage is 57%, and the description adds meaning for 'kind' and 'descending' (e.g., kind=column|measure and the behavior of descending). It also clarifies 'field' should be an existing visual field. However, the context parameters (reportSessionId, pageName, visualName, table) are left to the schema with no additional explanation, so the description does not fully compensate for the coverage gap.

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 sets the sort order of an existing visual (table/matrix/chart) by a field, ascending or descending. It distinguishes from sibling tools by specifying it operates on a visual's query order, not on data rows or columns.

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 for when to use the tool, including a specific use case (sorting rankings by sales/value to push blanks to the bottom) and a prerequisite (field must already be shown in the visual). However, it does not explicitly mention alternative tools or when not to use it, so it falls short of a 5.

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