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:

  1. Loads public/search-index.json on first call; subsequent calls hit the in-memory cache.
  2. Iterates the index, keeping rows where tag === type.
  3. Early-breaks at limit.

Source: lib/mcp/content-loader.ts#filterItems with query: undefined.

Arguments

NameTypeRequiredNotes
typesurface enumSee search_items for the full list
limitnumber (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 hook
use shadcnio to list all themes so I can pick one for a dark-mode landing page
use shadcnio to list 1000 blocks — I want to see the full catalog

Manual 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 the limit cap, not the full set unless you raise limit to 1000. For block drill-down prefer the category tools.
  • type is required here (unlike search_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.