Skip to main content
Glama

UK Data: Code utilities

find_missing_number

Read-onlyIdempotent

Finds the missing number in a sequence of integers from 0 to n where exactly one number is missing. Uses sum formula or XOR method. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
numsNoarray of integers, required, list containing numbers from 0 to n with one missing, no units, no default

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so safety is covered. The description adds the notable behavioral detail of a 1-credit cost and the algorithmic approach, but says nothing about output form or failure behavior when the precondition is violated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core definition in the first sentence, then constraint, then cost. 'Uses sum formula or XOR method' is implementation detail with limited value to a caller, the one mildly wasteful sentence.

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 read-only computation with no output schema, the definition supplies the precondition and cost that an agent needs. The only gap is not stating the return value's form (the missing integer, or what happens when none is missing).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the single param is documented there, but the description adds real meaning the schema lacks: the values must span 0..n and exactly one must be absent. That constraint is what makes the parameter valid input rather than just an array of numbers.

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?

Names a specific operation and resource — finding the single missing integer in a 0..n sequence — with the constraint 'exactly one number is missing', which makes it naturally distinguishable from siblings like 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?

The 'exactly one missing, range 0..n' precondition effectively defines when the tool applies and rules out other sequence puzzles, but there is no explicit routing to alternatives (e.g. find_duplicate_number) or statement of 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