Make your AI a shadcn expert

list_blocks_in_category

Every block slug inside one category — hero, pricing, cta, and 53 more. Pipe the output straight into get_item, get_item_source, or get_install_command.

Once the agent has a category (via list_block_categories), this tool returns every slug inside it — sorted alphabetically, ready for downstream calls. Cheaper than scanning the full 6000-block index and more accurate than matching on title substrings.

When to use it

  • The agent committed to a category ("let's add a pricing section") and needs to see the candidates.
  • Building a "compare blocks in the same category" prompt.
  • Before calling get_item or get_install_command — you need an exact slug.

Arguments

NameTypeRequiredDefaultNotes
categorystringCategory slug from list_block_categories — e.g. hero, pricing, cta
limitnumber (1–500)allOptional slice — omit to return every slug in the category

Example prompts

use shadcnio to list every pricing block
use shadcnio to list five hero blocks and give me the source of the one that sounds most suited to a dev tool landing page
use shadcnio and compare the first 3 cta blocks — summarize their layouts from the source

Response shape

{
"category": "pricing",
"count": 5,
"totalInCategory": 40,
"slugs": [
  "pricing-basic-toggle",
  "pricing-featured-hero-shelves",
  "pricing-grouped-comparison-table",
  "pricing-metric-hero-tiles",
  "pricing-split-highlight"
]
}
  • count = slugs returned (respects limit).
  • totalInCategory = total in the category — compare against count to know if you truncated.
  • Every slug is installable via get_install_command with no further resolution.

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_blocks_in_category",
    "arguments": { "category": "pricing", "limit": 5 }
  }
}' | jq '.result.content[0].text | fromjson | .slugs'

FAQ

Was this page helpful?

Sign in to leave feedback.