Shadcn.io is not affiliated with official shadcn/ui
get_item
Lightweight metadata for one registry item — title, description, premium flag, dependencies, file paths. Excludes source code. The cheap-to-browse retrieval tool.
get_item returns everything the agent needs to reason about a component without downloading its full source. Use it to shortlist candidates before paying the token cost of get_item_source.
When to use
- The agent has a slug (from
search_items,list_items, orlist_blocks_in_category) and wants to know: is it premium? what does it depend on? how many files? which path does it install to? - Comparing multiple candidates before picking one.
- Answering "what does X need?" questions.
If the agent has already committed and wants the source, skip straight to get_item_source.
How it works
-
Calls
getRegistryItem(name)— a universal resolver inservices/registry.tsthat probes slugs against every surface in priority order:- Icons (if the name contains a hyphen and matches a library prefix)
- Blocks (scans all 56 block categories)
- Patterns (scans
packages/examples/*/*) - Hooks (if name starts with
use-) - Themes → AI → Charts → Buttons → Shaders → Backgrounds
- Consolidated components (
packages/components/*/) - General components (
packages/*/)
The first match wins. Returns
nullif nothing resolves. -
The returned
RegistryItemis mapped to a "lite" form: everything preserved except eachfiles[i].contentis stripped (paths and targets remain). -
JSDoc metadata (
@title,@description,@premium) has already been parsed into the top-leveltitle,description,premiumfields by the resolver.
Source: lib/mcp/tools.ts#get_item + services/registry.ts#getRegistryItem.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
name | string | ✓ | Slug — e.g. hero-announcement, pricing-grouped-comparison-table, use-debounce |
Response
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "pricing-grouped-comparison-table",
"type": "registry:block",
"title": "React Grouped Comparison Table Pricing Block",
"description": "A pricing block using a grouped feature comparison table layout for tiered SaaS plans.",
"author": "shadcn.io",
"homepage": "https://www.shadcn.io/blocks/pricing-grouped-comparison-table",
"premium": true,
"dependencies": ["lucide-react"],
"registryDependencies": ["button", "badge"],
"files": [
{
"path": "blocks/pricing/pricing-grouped-comparison-table.tsx",
"type": "registry:block",
"target": "components/blocks/pricing/pricing-grouped-comparison-table.tsx"
}
]
}Key fields:
premium—trueif the JSDoc has@premium true. Non-Pro users get 403 with redacted content when they try to install this (but they can still callget_itemto see the metadata).dependencies— npm packages to install alongside (lucide-react,recharts, etc.). Inferred from import statements.registryDependencies— other shadcn registry items this depends on (button,badge). Theshadcn addCLI will install these transitively.files[].target— where the file will land on install.
For an unknown slug:
{
"content": [{ "type": "text", "text": "Registry item not found: nonexistent-slug" }],
"isError": true
}Example prompts
use shadcnio to tell me what pricing-grouped-comparison-table depends onuse shadcnio and check if hero-announcement is a premium blockuse shadcnio to list the registryDependencies for the first 5 pricing blocks so I know which primitives I'll needManual 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": "get_item",
"arguments": { "name": "pricing-grouped-comparison-table" }
}
}' | jq '.result.content[0].text | fromjson'Tips + gotchas
- Resolution order matters — if a slug could match both an icon and a block, icons win. In practice this only bites for icons (which must be formatted
{libraryId}-{iconName}). - Premium status is safe to expose — free and Pro users alike can call
get_itemand see that a block is premium. Onlyget_item_sourceenforces Pro for premium content. - Dependencies are inferred, not curated — the resolver greps the source for known package names (see
extractDependenciesinservices/registry.ts). It's mostly right, but exotic imports can be missed.shadcn addwill still fail loudly if a dep is actually required. - No pagination —
get_itemreturns the full metadata object every time. There's no way to narrow it further.
Was this page helpful?
Sign in to leave feedback.
list_popular
The most-downloaded items on shadcn.io, optionally filtered by surface. Backed by the analytics DB's (componentType, downloadCount DESC) index — fast at scale. Use it to pick battle-tested components instead of alphabetical first hits.
get_item_details
Rich, curated metadata for a registry item — marketing opening paragraph, 6 hand-picked related siblings, 6 FAQ questions. For blocks, this unlocks content the lite get_item intentionally omits.