Skip to main content
Glama

UK Data: Code utilities

find_minimum_rotated_sorted_array

Read-onlyIdempotent

Finds the minimum element in a rotated sorted array using binary search. The array was originally sorted in ascending order then rotated at some pivot point. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numsNoarray of numbers, required, the rotated sorted array to search, no units, no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive behavior, so the safety profile is covered. The description adds genuinely new context: the O(log n) binary-search approach and a 'cost: 1 credit' charge, which matters for invocation budgeting. It stops short of noting edge cases such as empty or non-rotated input.

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?

Three short sentences: purpose first, then the input precondition, then the cost note. Nothing is redundant and the most important 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 one-parameter computational tool with full schema coverage and no output schema, the description covers what it computes, the input shape it expects, and its credit cost. Minor gaps remain around degenerate inputs (empty array, non-rotated array) and the exact return shape.

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 coverage is 100%, so the single 'nums' parameter is already documented in the schema. The description reinforces the input contract by specifying it must be an ascending-sorted array rotated at a pivot, which is useful validation context but not much beyond the schema.

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?

States a specific verb and resource ('Finds the minimum element in a rotated sorted array') and adds the algorithmic method ('using binary search'). This clearly separates it from siblings like find_peak_element, binary_search, and sort_numbers, which an agent could otherwise confuse with it.

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 precondition 'originally sorted in ascending order then rotated at some pivot point' implicitly tells the agent when this tool applies, but there is no explicit steering versus alternatives (e.g. using sort_numbers or a general min) and no statement about when not to use it.

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