Skip to main content
Glama

UK Data: Code utilities

find_pairs_with_sum

Read-onlyIdempotent

Finds all unique pairs of integers in a list that sum to a specified target value. Returns pairs as arrays. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numsNoarray, required, list of integers, no unit, no default
targetNointeger, required, target sum value, no unit, no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, so the safety profile is covered. The description adds two useful facts beyond them: the return format (pairs as arrays) and a per-call cost of 1 credit, which is genuine value. It stops short of clarifying the 'unique' semantics when the input has repeated values, or what is returned when no pairs match.

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 the purpose, then return shape, then cost. No filler and nothing that could be trimmed without losing information.

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 two-parameter pure-computation tool with no output schema, the description reasonably covers behavior and return shape. Gaps remain around duplicate handling (the meaning of 'unique'), result ordering, and the empty-result case, which matter because callers cannot inspect an output schema to infer them.

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 the schema already documents both parameters, making the baseline 3. The description restates 'list of integers' and 'target value' but adds nothing about format details, and notably it does not reconcile the schema's odd typing where target is declared as a string and nums as an array of strings.

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 names a specific verb and outcome: it finds all unique integer pairs in a list summing to a target, and states the return shape (arrays of pairs). This is clearly distinguishable from generic siblings like calculate or average, though it doesn't explicitly contrast itself with near-neighbours such as find_duplicate_number or find_majority_element.

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 only implied: given a list and a target, this returns matching pairs. There is no statement of when to prefer it over other algorithmic siblings, no preconditions, and no exclusions (e.g., what to do if no pairs exist or if the list contains duplicates).

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