Skip to main content
Glama

UK Data: Code utilities

find_kth_smallest

Read-onlyIdempotent

Finds the kth smallest number in an unsorted list (1-indexed, where k=1 returns the smallest element). (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
kNointeger, required, the position of the desired smallest element (1-indexed)
numsNoarray of numbers, required, the list of numbers to search

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds useful context about 1-indexing and a cost of 1 credit, but does not disclose error behavior such as what happens if k is out of range.

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 single front-loaded sentence with the cost note appended. Every element earns its place: the core operation, indexing convention, k=1 example, and cost.

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 simple two-parameter algorithmic tool with full schema coverage and rich annotations, the description is nearly complete. It could mention edge-case behavior for invalid k values, but no output schema exists and return semantics are reasonably implied.

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?

With 100% schema description coverage, the schema already documents both k and nums. The description reinforces that nums is an unsorted list and clarifies that k=1 returns the smallest element, but adds no syntax or format details beyond what the schema provides.

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?

The description states a specific verb and resource: finding the kth smallest number in an unsorted list. It clarifies 1-indexing and the k=1 case, making the operation unambiguous, though it does not explicitly contrast itself with sibling tools such as find_n_largest or sort_numbers.

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 gives no guidance on when to use this tool versus alternatives. It implies applicability to unsorted lists but does not state when-not to use it, nor mention sibling tools that could handle related tasks.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources