search-registry-items

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Search Registry Items

搜索注册表项

Look up indexed shadcn registry catalog entries via full-text search on item
name
and
description
. Returns the registry namespace and
addCommandArgument
for
npx shadcn@latest add
.
Default tool call:
json
CallMcpTool({ "server": "user-shoogle", "toolName": "search_registry_items", "arguments": { "query": "button" } })
通过对项的
name
description
进行全文搜索,查找已索引的shadcn注册表目录条目。返回注册表命名空间以及用于
npx shadcn@latest add
addCommandArgument
默认工具调用:
json
CallMcpTool({ "server": "user-shoogle", "toolName": "search_registry_items", "arguments": { "query": "button" } })

Workflow

工作流程

Progress:
  • Call
    search_registry_items
    on
    user-shoogle
    with a short keyword or name fragment (not a full sentence)
  • Present matches as the output table below — never dump raw JSON
  • If multiple registries share the same name, ask which registry to use
  • Install with
    npx shadcn@latest add {addCommandArgument}
    (or the project's package runner)
  • Paginate only when needed (
    offset
    +=
    limit
    while
    pagination.hasMore
    )
Skip search when the user already gave the exact add target (e.g.
@cult-ui/gradient-button
) — go straight to
view
/
add
.
For install and composition rules after search, use the shadcn skill.
步骤:
  • user-shoogle
    上调用
    search_registry_items
    ,传入简短关键词或名称片段(非完整句子)
  • 以下面的输出表格形式展示匹配结果——绝不要直接输出原始JSON
  • 若多个注册表存在同名项,询问用户选择哪个注册表
  • 使用
    npx shadcn@latest add {addCommandArgument}
    (或项目的包管理器)进行安装
  • 仅在需要时进行分页(当
    pagination.hasMore
    为真时,
    offset
    +=
    limit
当用户已提供明确的添加目标(如
@cult-ui/gradient-button
)时,跳过搜索步骤——直接进入
view
/
add
流程。
搜索后的安装和组合规则,请参考shadcn skill

Gotchas

注意事项

  • One MCP tool only.
    user-shoogle
    exposes
    search_registry_items
    . Block and semantic MCP tools (
    search
    ,
    search_vectors
    ) are not available — use shoogle.dev/search instead. Do not use
    npx shadcn@latest search
    for this workflow.
  • Full-text on
    name
    and
    description
    .
    Matching uses full-text search across both fields — not item titles, and not semantic/vector search. A query like
    carousel
    can match items named
    carousel
    or whose description mentions carousels.
  • Keywords, not intent. Multi-concept natural-language queries like "login page with dark mode" won't work well. For semantic block discovery, send the user to shoogle.dev/search.
  • Query the item name, not the registry prefix. Use
    button
    , not
    @acme/button
    . Filter by
    registry
    in results.
  • Short fragments beat sentences. Prefer
    button
    ,
    hero
    ,
    data-table
    . Empty or whitespace queries return nothing.
  • No results? Try shorter fragments or synonyms (
    dialog
    vs
    modal
    ).
  • addCommandArgument
    is the install target.
    Use it verbatim:
    npx shadcn@latest add cult-ui/gradient-button
    . Do not reconstruct from
    @registry/name
    .
  • Pagination cap is 100. Default page size is 100; mention
    pagination.total
    when results span pages.
If MCP is unavailable, point to shoogle.dev/mcp-install. For parameter or response details, read references/TOOL-REFERENCE.md.
  • 仅使用一个MCP工具
    user-shoogle
    仅提供
    search_registry_items
    工具。区块和语义MCP工具(
    search
    search_vectors
    )不可用——请改用shoogle.dev/search。本工作流程中请勿使用
    npx shadcn@latest search
  • 仅对
    name
    description
    进行全文搜索
    。匹配基于这两个字段的全文检索——不匹配项标题,也不支持语义/向量搜索。类似
    carousel
    的查询可以匹配名为
    carousel
    的项,或描述中提及carousel的项。
  • 仅支持关键词,不支持意图查询。类似“带深色模式的登录页面”这类多概念自然语言查询效果不佳。如需语义区块发现,请引导用户访问shoogle.dev/search
  • 查询项名称,而非注册表前缀。使用
    button
    ,而非
    @acme/button
    。可在结果中按
    registry
    筛选。
  • 简短片段优于完整句子。优先使用
    button
    hero
    data-table
    这类关键词。空查询或仅含空格的查询不会返回任何结果。
  • **无结果时?**尝试更短的片段或同义词(如
    dialog
    替代
    modal
    )。
  • addCommandArgument
    是安装目标
    。直接使用该参数:
    npx shadcn@latest add cult-ui/gradient-button
    。请勿通过
    @registry/name
    重新构造。
  • 分页上限为100。默认每页显示100条结果;当结果跨页时,需提及
    pagination.total
若MCP不可用,请引导用户访问shoogle.dev/mcp-install。如需参数或响应详情,请阅读references/TOOL-REFERENCE.md

Output format

输出格式

Always respond with a markdown table:
nameregistryadd commandtypedescription
  • add command:
    npx shadcn@latest add {addCommandArgument}
    when present
  • Use
    for empty descriptions
  • End with match count and page info when relevant
Example — user asks for button components across registries:
nameregistryadd commandtypedescription
buttonshadcn
npx shadcn@latest add shadcn/button
registry:uiA clickable button component
buttoncult-ui
npx shadcn@latest add cult-ui/button
registry:uiAnimated button variants
Found 2 matches (showing 1–2 of 2). Which registry should I add from?
请始终以Markdown表格形式响应:
名称注册表添加命令类型描述
  • 添加命令:当存在
    addCommandArgument
    时,格式为
    npx shadcn@latest add {addCommandArgument}
  • 空描述使用
    填充
  • 相关时需在末尾显示匹配数量和分页信息
示例——用户询问各注册表中的按钮组件:
名称注册表添加命令类型描述
buttonshadcn
npx shadcn@latest add shadcn/button
registry:ui可点击的按钮组件
buttoncult-ui
npx shadcn@latest add cult-ui/button
registry:ui带动画效果的按钮变体
找到2个匹配项(显示第1–2条,共2条)。请问您要从哪个注册表添加?

Out of scope

超出范围的场景

NeedUse instead
Registry item by name or description
search_registry_items
(this skill)
Block keyword searchshoogle.dev/search
Semantic / layout discoveryshoogle.dev/search
Install a known itemshadcn CLI
add
/
view
Browse one registry
npx shadcn@latest search @registry -q "…"
需求替代方案
通过名称或描述查找注册表项
search_registry_items
(本skill)
区块关键词搜索shoogle.dev/search
语义/布局发现shoogle.dev/search
安装已知项shadcn CLI的
add
/
view
命令
浏览单个注册表
npx shadcn@latest search @registry -q "…"