Skip to main content
Glama

shell_sort

Sorts numeric arrays using Shell sort while tracking gap sequences, comparisons, and swaps for performance analysis.

Instructions

Sort an array using Shell sort with gap sequence tracking, comparison and swap counts.

Input Schema

NameRequiredDescriptionDefault
arrayYesArray of numbers to sort (max 100,000 elements)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.11

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations and no output schema, the description carries the full burden. It usefully discloses that output includes gap sequence tracking and comparison/swap counts, which is meaningful behavioral detail beyond the name. However, it omits whether the sort is in-place or returns a new array, and gives no return-shape or mutation semantics.

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?

A single tight sentence that front-loads the operation and algorithm with zero filler. Nothing is wasted.

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?

For a stateless computational tool with no annotations and no output schema, the description covers enough to select and call it, and hints at the returned metrics. It falls short on return structure and in-place vs copy semantics, which an agent would otherwise have to discover by running it.

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?

There is a single parameter (array) with 100% schema description coverage, including the max-100,000-element constraint. The description adds nothing beyond what the schema already supplies, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (sort) and resource (array), plus the exact algorithm (Shell sort) and its distinctive outputs (gap sequence, comparison/swap counts). This clearly separates it from the many other sort siblings like heap_sort, radix_sort, and counting_sort, though it does not explicitly name an alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to choose Shell sort over the other sorting tools in the catalog, nor any prerequisites or constraints on usage. It only says what the tool does, not when it applies.

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

Deploy Server

Other Tools