Shadcn.io is not affiliated with official shadcn/ui
list_items
Enumerate every item on a single shadcn.io surface — blocks, components, hooks, charts, and so on. Ideal when the agent wants full visibility before deciding.
list_items is the bulk-view counterpart to search_items. Same data source, same row shape — but no query, and a higher default limit. Reach for this when the agent is cataloguing rather than searching.
When to use
- The agent is about to compose a larger scaffold (a whole landing page, a component inventory) and needs to see everything on a surface.
- You're answering a "list all X" prompt.
- You want to build a filtered subset client-side ("all blocks with 'dashboard' in the title from the full list").
If the user gives a keyword, prefer search_items — it's faster to iterate and cheaper on tokens.
How it works
Identical internals to search_items minus the title filter:
- Loads
public/search-index.jsonon first call; subsequent calls hit the in-memory cache. - Iterates the index, keeping rows where
tag === type. - Early-breaks at
limit.
Source: lib/mcp/content-loader.ts#filterItems with query: undefined.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
type | surface enum | ✓ | See search_items for the full list |
limit | number (1–1000) | — | Default 500 |
Response
Same shape as search_items:
{
"count": 500,
"items": [
{ "id": "/blocks/ai-agent-workflow", "title": "React AI Agent Workflow Block", "url": "/blocks/ai-agent-workflow", "tag": "blocks" },
{ "id": "/blocks/ai-agent-task-queue", "title": "React AI Agent Task Queue Block", "url": "/blocks/ai-agent-task-queue", "tag": "blocks" }
]
}If count equals limit, you've probably truncated — raise the limit or paginate on the client.
Example prompts
use shadcnio to list every hookuse shadcnio to list all themes so I can pick one for a dark-mode landing pageuse shadcnio to list 1000 blocks — I want to see the full catalogManual invocation
curl -s -X POST "https://www.shadcn.io/api/mcp?token=YOUR_TOKEN" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_items",
"arguments": {
"type": "hooks",
"limit": 200
}
}
}' | jq '.result.content[0].text | fromjson | .count'Tips + gotchas
- Blocks are the biggest surface (~6000+ items). A full
list_items({ type: "blocks" })returns thelimitcap, not the full set unless you raiselimitto 1000. For block drill-down prefer the category tools. typeis required here (unlikesearch_items) — there's no "list everything across every surface" mode, by design. Cross-surface dumps are rarely what you want.- No sort — order mirrors the index. For alphabetical, sort on the client.
Was this page helpful?
Sign in to leave feedback.
search_items
Case-insensitive title search across every surface on shadcn.io. Returns lightweight rows so the agent can browse cheaply before committing to a component.
list_block_categories
Return the canonical, ordered list of block categories (hero, pricing, cta, dashboard, chat, …). The primary entry point for block discovery.