Skip to main content
Glama
BACH-AI-Tools

Power Assist MCP Server

sortbyproperty

Sort an array of objects by a specified property, with optional descending order. Handles missing properties and empty arrays.

Instructions

Accepts an Array of Objects and sorts it by the object Property specified. If any objects lack the specified property, it will still perform the sort. Optionally accepts the parameter 'descending'. If left out, it will default to ascending. If an empty Array is provided, it will be returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

The description discloses useful edge cases: objects lacking the property still sort, descending defaults to ascending, and empty arrays are returned. However, it does not disclose whether the array is mutated in place or returned as a new array, nor does it mention comparison rules like stability or case sensitivity. With no annotations, this leaves a significant gap.

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 concise: four sentences, each adding essential information (purpose, missing-property handling, optional descending default, empty-array behavior). No redundancy or filler.

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 description covers the core functionality and edge cases, but with no output schema, it should more clearly state that the sorted array is returned. It only implies this for the empty-array case. The missing detail about in-place vs. new array also leaves the tool's behavior incomplete for practical use.

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 input schema is empty, so the description carries the burden of explaining parameters. It mentions the property parameter and the optional 'descending' parameter, including the default behavior. However, it does not specify the type or format of the property parameter, so it earns the baseline 4 rather than a 5.

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 that the tool accepts an Array of Objects and sorts by a specified property. It distinguishes itself from the generic sibling 'sort' by highlighting property-based sorting and behavior with missing properties.

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?

The description implies usage for sorting an array of objects by a property, but it does not explicitly contrast with siblings like 'sort' or any when-not-to-use scenarios. There is no mention of alternatives or exclusions.

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/BACH-AI-Tools/bachai-power-assist'

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