Lion Cipher Lab

Measure an agent's tool-selection accuracy as its toolbox grows from 5 to 100 tools, then win it back with tool retrieval and better tool descriptions (stub model, offline)

Why it matters

Every agent platform now makes it trivial to bolt on another integration: install an MCP server and its tools appear in the model's context next to the ones you had. Each one looks harmless. Together they change the job the model is doing - it is no longer choosing between five clearly different tools, it is choosing among dozens, several of which are three vendors' copies of the same capability, and some of which sit one word away from a destructive action. When the model picks disable_user instead of lookup_user, or sinkhole_domain instead of fetch_dns_logs, a lookup becomes an outage. This…

What you'll learn

Steps in this lab

  1. The words first: agent, tool, toolbox, MCP server, context, answer key, destructive, near-duplicate, retrieval - and the fact that the chooser here is a stub
  2. Open a terminal and make a scratch folder (all three operating systems)
  3. The toolbox: 5 core tools, then siblings, then three vendors' MCP servers, then unrelated integrations - 100 in all
  4. The answer key: 300 analyst requests, each owned by one core tool
  5. The chooser is a DETERMINISTIC STUB - here is its entire behaviour, in writing
  6. Grow the toolbox and measure: the same 300 requests at 5, 10, 20, 50 and 100 tools
  7. Fix 1: tool retrieval - a pure-Python BM25 shortlist, and the chooser sees only the top k
  8. Fix 2: merge the near-duplicates, namespace the names, rewrite the descriptions - and measure each move
  9. The side effect of a good fix: namespacing made one destructive confusion worse - so gate destructive tools
  10. When NOT to add retrieval, and why this rather than that
  11. The way a pro does it differently
  12. Rerun the evidence, change one constant, and clean up

Open the full interactive lab →