*or at least can sometimes
*occasionally brilliant
An average LLM context holds 200,000 tokens.
That means ~250 tokens for each of your 800 endpoints.
If each tool description was about as long as the text on this slide, you've used 1/4 of memory...
just by saying hello.
It's not about less or more.
It's about the right context, carefully chosen.
"We expanded prompts from ~100 words to 2,000+ — but every word was curated.
Explicit column definitions. Precise output formats. Concrete decision rules."
You don't re-read chapters 1 to 9 before starting chapter 10.
/compact and /clear are your friends.
Summaries and decisions > raw conversation history
Models don't know about your latest library version
or last week's blog post.
The model will confidently use a deprecated API
if it doesn't know the new one exists.
Tell it to web search.
We abstract code into small, composable functions.
That's good engineering. It's bad tool design.
How we write code
getColumns()
filterBy(field, op, value)
sortBy(field, direction)
setVisibility(field, bool)
applyChanges()
How agents need tools
buildView(intent)
"Agents find needles in haystacks — by examining every piece of hay."
✗ The Trap
get_columns(), set_filter(),
set_sort(), apply_changes()
✓ The Fix
build_view(intent)
User stories, but the persona is the agent.
User story
As a nursery worker,
I want to filter inventory by status,
so I can see what's ready to ship.
Agent story
As an AI assistant,
I want to build a complete view from intent,
so I can configure the grid in one call.
AI output doesn't need to match what the product needs.
Design a translation layer. Include unit tests.
// MUI data grid needs BOTH of these, precisely correct:
columnVisibilityModel: {
name: true, sku: true, status: true,
qty: true, internalNotes: false, ...
}
orderedFields: [
"__check__", // ← system column (checkbox)
"name", "sku", // ← user columns in exact order
"status", "qty",
"actions" // ← system column (buttons)
]
AI was unreliable at producing this — forgot system columns,
wrong ordering, flipped visibility booleans.
AI returns categories
// Semantic — natural for an LLM
{
identifyingColumns: ["name", "sku"],
relevantColumns: ["status", "qty"],
insightColumns: ["updatedAt"],
hideColumns: ["internalNotes"]
}
Code translates
// Deterministic — unit tested
mergeAIColumnVisibility(categories)
→ { name: true, sku: true, ... }
anchorSystemColumns(aiOrder)
→ [__check__, ...ai..., actions]
Natural language filtering for non-technical nursery staff
useChat examples
isSearchable to 50+ column definitions across 12 gridsmergeAIColumnVisibility() and anchorSystemColumns()Curate your tools — 5–15, not 800
Curate your context — focused > bloated
Curate your workflow — checkpoints > threads
Curate your output — translation layers > direct mapping
"The most important word for MCP developers is curate." — Jeremiah Lowin