Skip to main content
Glama

UK Data: Code utilities

merge_sorted_lists

Read-onlyIdempotent

Merges two sorted lists into a single sorted list maintaining ascending order. Returns the merged sorted list. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
list1Noarray, required, first sorted list
list2Noarray, required, second sorted list

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds the ascending-order guarantee and, usefully, a 'cost: 1 credit' note not present in annotations. It does not say what happens if inputs are unsorted or how the string form of a list is interpreted.

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, front-loaded with purpose, then return value, then cost. Every sentence carries information and nothing is padded.

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 pure-list transformation with only two parameters, this is nearly sufficient: purpose, ordering guarantee, return value and cost are all stated, and no output schema is needed. The only gap is undefined behavior on unsorted input or on the string parameter variant.

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 100%, so baseline is 3. The description reiterates that both inputs are sorted lists but adds nothing about the two accepted shapes (array of strings or a bare string) revealed by the schema, leaving that ambiguity untouched.

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 and resource ('Merges two sorted lists into a single sorted list') plus the resulting ordering, which is unmistakable against siblings like sort_numbers, flatten_list or merge_dictionaries. It stops short of explicitly naming any sibling, so a 4 rather than a 5.

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?

Usage is implied only: the caller learns the inputs must already be sorted, which functions as a precondition, but there is no statement of when to prefer this over a general sort or another merge helper, and no exclusion cases.

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