searching-media
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMedia Search
媒体搜索
Universal routing skill for searching and retrieving existing images and media.
用于搜索和检索现有图片及媒体内容的通用路由技能。
Scope
适用范围
This skill is for SEARCHING FOR existing media, not CREATING new media.
Use this skill when the user wants to:
- Search for images in Salesforce CMS, Data Cloud
- Find existing visual assets to use in their app
- Retrieve media from connected sources
- Browse available images for their project
- Locate specific photos or graphics
DO NOT use this skill when the user wants to:
- Generate new images with AI (use image generation tools)
- Create graphics or designs from scratch
- Edit or modify existing images
- Build custom visuals or diagrams
本技能仅用于搜索现有媒体内容,不用于创建新媒体。
当用户有以下需求时使用本技能:
- 在Salesforce CMS、Data Cloud中搜索图片
- 查找可用于应用程序的现有视觉资产
- 从关联来源检索媒体内容
- 浏览可用于项目的图片
- 定位特定照片或图形
当用户有以下需求时请勿使用本技能:
- 使用AI生成新图片(请使用图片生成工具)
- 从零开始创建图形或设计
- 编辑或修改现有图片
- 制作自定义视觉内容或图表
Before You Search
搜索前须知
CRITICAL: This is a routing skill, not a direct search skill.
When a user requests to find an image:
Your first action MUST use the ask_followup_question tool to present search sources.
- Use ask_followup_question to present available search sources as options
- Receive the user's selection from the tool response
- Then call the appropriate search tool based on their choice
Example of what NOT to do:
- ❌ Calling ANY tool before the user picks a source (MCP tools, file reads, descriptor checks, etc.)
- ❌ "Checking which MCP tools are available" — do not probe or discover tools via tool calls
- ❌ Immediately calling or
search_electronic_mediasearch_media_cms_channels - ❌ Reading MCP tool descriptors or schemas to see what's available
- ❌ Deciding which search source to use without asking
Example of what TO do:
- ✅ Respond with ONLY text — a numbered list of search sources
- ✅ Ask: "Which option would you like to use?"
- ✅ Wait for user to reply with their choice
- ✅ Then (and only then) call the tool they selected
Your first response when this skill triggers MUST be a text-only message presenting search sources. No tool calls. No exceptions.
重要提示:本技能是路由技能,而非直接搜索技能。
当用户请求查找图片时:
你的首要操作必须使用ask_followup_question工具,向用户展示搜索来源选项。
- 使用ask_followup_question展示可用的搜索来源选项
- 接收用户的选择(来自工具响应)
- 随后根据用户选择调用相应的搜索工具
错误操作示例:
- ❌ 在用户选择来源前调用任何工具(MCP工具、文件读取、描述符检查等)
- ❌ “检查可用的MCP工具”——请勿通过工具调用探查或发现工具
- ❌ 直接调用或
search_electronic_mediasearch_media_cms_channels - ❌ 读取MCP工具描述符或架构以查看可用工具
- ❌ 未询问用户就自行决定搜索来源
正确操作示例:
- ✅ 仅返回文本——列出搜索来源的编号列表
- ✅ 询问:“你想使用哪个选项?”
- ✅ 等待用户回复选择
- ✅ 然后(且仅在此时)调用用户选择的工具
当本技能触发时,你的首次回复必须是纯文本消息,展示搜索来源。禁止调用工具,无一例外。
Workflow Overview
工作流概述
The user MUST choose the search source. You CANNOT skip this step.
Copy this checklist and track your progress:
Media Search Progress:
- [ ] Step 1: Check your own tool list for available search tools (no tool calls — just inspect what's in your context)
- [ ] Step 2: Present only the available options to the user as a numbered list (plain text, no tool calls)
- [ ] Step 3: Wait for the user to reply with their selection
- [ ] Step 4: Execute the selected search method (this is the first tool call)
- [ ] Step 5: Present all results to user for selection
- [ ] Step 6: Apply selected image to codeIf you call any tool before step 4, you are not following this skill correctly.
用户必须选择搜索来源。此步骤不可跳过。
复制以下清单并跟踪进度:
Media Search Progress:
- [ ] Step 1: Check your own tool list for available search tools (no tool calls — just inspect what's in your context)
- [ ] Step 2: Present only the available options to the user as a numbered list (plain text, no tool calls)
- [ ] Step 3: Wait for the user to reply with their selection
- [ ] Step 4: Execute the selected search method (this is the first tool call)
- [ ] Step 5: Present all results to user for selection
- [ ] Step 6: Apply selected image to code如果在步骤4之前调用任何工具,则说明未正确遵循本技能要求。
Presenting Search Sources (First Response)
展示搜索来源(首次回复)
DO NOT call any tool, read any MCP descriptor, or make any external request to determine available tools.
Your tools are already loaded into your context. Look at the tool names you already have access to — this is introspection, not a tool call.
Step 1: Check your own tool list (no tool calls)
Look at the tools already in your context and check for these names:
- → If present, include "Search using keywords"
search_media_cms_channels - → If present, include "Search using Data 360 hybrid search"
search_electronic_media - Always include "Other" as the last option
Step 2: Build your response
Include ONLY the sources whose tools you actually have. Number them sequentially.
I can help you find that image. Where would you like to search?
[NUMBER]. [SEARCH SOURCE NAME] — [Brief description]
...
[NUMBER]. Other — Provide your own URL or path
Which option would you like to use?Step 3: Stop and wait
After presenting the list, STOP. Do not call any tool. Do not proceed. Wait for the user to reply with their choice.
请勿调用任何工具、读取任何MCP描述符或发起任何外部请求来确定可用工具。
你的工具已加载到上下文环境中。查看你已访问的工具名称——这是自省操作,而非工具调用。
步骤1:检查自身工具列表(无需调用工具)
查看上下文环境中的工具,检查是否有以下名称:
- → 如果存在,添加**“使用关键词搜索”**
search_media_cms_channels - → 如果存在,添加**“使用Data 360混合搜索”**
search_electronic_media - 始终将**“其他”**作为最后一个选项
步骤2:构建回复内容
仅包含你实际拥有对应工具的来源。按顺序编号。
我可以帮你查找该图片。你想从哪里搜索?
[编号]. [搜索来源名称] — [简要描述]
...
[编号]. 其他 — 提供你自己的URL或路径
你想使用哪个选项?步骤3:停止并等待
展示列表后,停止操作。请勿调用任何工具,请勿继续执行。等待用户回复选择。
Examples
示例
Both tools available:
I can help you find that image. Where would you like to search?
1. Search using Data 360 hybrid search — Semantic search across Salesforce CMS and connected DAMs
2. Search using keywords — Search Salesforce CMS by keywords and taxonomies
3. Other — Provide your own URL or path
Which option would you like to use?Only available:
search_media_cms_channelsI can help you find that image. Where would you like to search?
1. Search using keywords — Search Salesforce CMS by keywords and taxonomies
2. Other — Provide your own URL or path
Which option would you like to use?Only available:
search_electronic_mediaI can help you find that image. Where would you like to search?
1. Search using Data 360 hybrid search — Semantic search across Salesforce CMS and connected DAMs
2. Other — Provide your own URL or path
Which option would you like to use?Neither tool available:
No automated media search sources are currently configured. Please provide a direct URL or asset library path.Wait for the user to select before proceeding.
两种工具均可用:
我可以帮你查找该图片。你想从哪里搜索?
1. 使用Data 360混合搜索 — 在Salesforce CMS和关联DAM中进行语义搜索
2. 使用关键词搜索 — 通过关键词和分类法搜索Salesforce CMS
3. 其他 — 提供你自己的URL或路径
你想使用哪个选项?仅可用:
search_media_cms_channels我可以帮你查找该图片。你想从哪里搜索?
1. 使用关键词搜索 — 通过关键词和分类法搜索Salesforce CMS
2. 其他 — 提供你自己的URL或路径
你想使用哪个选项?仅可用:
search_electronic_media我可以帮你查找该图片。你想从哪里搜索?
1. 使用Data 360混合搜索 — 在Salesforce CMS和关联DAM中进行语义搜索
2. 其他 — 提供你自己的URL或路径
你想使用哪个选项?两种工具均不可用:
当前未配置自动化媒体搜索来源。请提供直接URL或资产库路径。等待用户选择后再继续。
Executing the Selected Search Method
执行选定的搜索方法
⚠️ ONLY reach this step if the user has explicitly selected an option from your numbered list.
If you haven't shown options yet, go back to the "Presenting Search Sources" section first.
After the user selects an option, execute the corresponding search method below.
⚠️ 仅当用户明确从你的编号列表中选择了一个选项后,才可进入此步骤。
如果你尚未展示选项,请先返回“展示搜索来源”部分。
用户选择选项后,执行以下对应的搜索方法。
Search using keywords
使用关键词搜索
Tool:
search_media_cms_channelsProcess:
-
Analyze the query — Understand what the user is searching for (subject, attributes, domain)
-
Extract keywords — Concrete nouns that would appear in image metadata
- Use domain-specific synonyms
- Maximum 10 terms
- Examples:
- "luxury apartments" → apartment, villa, penthouse, residence, condo
- "company logo" → logo, emblem, corporate logo
- "bright room" → (empty if no concrete nouns)
-
Extract taxonomies — Descriptive qualities, styles, moods, categories
- Only adjectives and attributes
- Examples:
- "luxury apartment with river view" → Luxury, Premium, Waterfront, Riverside, Panoramic
- "bright spacious room" → Bright, Spacious, Open, Airy, Light
- "car" → (empty if no descriptive terms)
-
Determine locale — Use format,
en_US,es_MX(default:fr_FR)en_US -
Build the JSON payload — Construct this exact structure:
json
{
"inputs": [{
"searchKeyword": "keyword1 OR keyword2 OR keyword3",
"taxonomyExpression": "{\"OR\": [\"Taxonomy1\", \"Taxonomy2\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}Field rules:
- : Join keywords with
searchKeyword(space-OR-space). Use empty string if no keywords.OR - : Stringify JSON object
taxonomyExpression. Use{"OR": ["term1", "term2"]}if no taxonomies."{}" - : Locale with underscore (e.g.,
searchLanguage)en_US - : Always empty string
channelIds - : Always
channelType"PublicUnauthenticated" - : Always
contentTypeFqn"sfdc_cms__image" - : Start at
pageOffset, increment by0for paginationsearchLimit - : Default
searchLimit, adjust if user requests more5
Examples:
Query: "luxury apartment with river view"
json
{
"inputs": [{
"searchKeyword": "apartment OR villa OR penthouse OR residence",
"taxonomyExpression": "{\"OR\": [\"Luxury\", \"Premium\", \"Waterfront\", \"Riverside\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}Query: "bright spacious room" (no concrete nouns)
json
{
"inputs": [{
"searchKeyword": "",
"taxonomyExpression": "{\"OR\": [\"Bright\", \"Spacious\", \"Open\", \"Airy\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}Query: "car images" (no descriptive terms)
json
{
"inputs": [{
"searchKeyword": "car OR automobile OR vehicle OR auto",
"taxonomyExpression": "{}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}- Call the tool with the exact JSON payload
工具:
search_media_cms_channels流程:
-
分析查询 — 理解用户的搜索目标(主题、属性、领域)
-
提取关键词 — 会出现在图片元数据中的具体名词
- 使用领域特定同义词
- 最多10个术语
- 示例:
- "luxury apartments" → apartment, villa, penthouse, residence, condo
- "company logo" → logo, emblem, corporate logo
- "bright room" → (无具体名词则留空)
-
提取分类法 — 描述性特质、风格、氛围、类别
- 仅包含形容词和属性
- 示例:
- "luxury apartment with river view" → Luxury, Premium, Waterfront, Riverside, Panoramic
- "bright spacious room" → Bright, Spacious, Open, Airy, Light
- "car" → (无描述性术语则留空)
-
确定区域设置 — 使用格式、
en_US、es_MX(默认:fr_FR)en_US -
构建JSON负载 — 严格按照以下结构构建:
json
{
"inputs": [{
"searchKeyword": "keyword1 OR keyword2 OR keyword3",
"taxonomyExpression": "{\"OR\": [\"Taxonomy1\", \"Taxonomy2\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}字段规则:
- :使用
searchKeyword(空格-OR-空格)连接关键词。若无关键词则使用空字符串。OR - :将JSON对象
taxonomyExpression转为字符串。若无分类法则使用{"OR": ["term1", "term2"]}。"{}" - :带下划线的区域设置(如
searchLanguage)en_US - :始终为空字符串
channelIds - :始终为
channelType"PublicUnauthenticated" - :始终为
contentTypeFqn"sfdc_cms__image" - :从
pageOffset开始,分页时每次增加0的值searchLimit - :默认
searchLimit,可根据用户请求调整5
示例:
查询:"luxury apartment with river view"
json
{
"inputs": [{
"searchKeyword": "apartment OR villa OR penthouse OR residence",
"taxonomyExpression": "{\"OR\": [\"Luxury\", \"Premium\", \"Waterfront\", \"Riverside\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}查询:"bright spacious room"(无具体名词)
json
{
"inputs": [{
"searchKeyword": "",
"taxonomyExpression": "{\"OR\": [\"Bright\", \"Spacious\", \"Open\", \"Airy\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}查询:"car images"(无描述性术语)
json
{
"inputs": [{
"searchKeyword": "car OR automobile OR vehicle OR auto",
"taxonomyExpression": "{}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}- 调用工具并传入严格匹配的JSON负载
Search using Data 360 hybrid search
使用Data 360混合搜索
Tool:
search_electronic_mediaProcess:
- Use the user's query as-is — no keyword extraction or transformation needed
- Call
search_electronic_media - Pass the query to the tool's parameter
searchQuery
Example:
- User query: "modern luxury apartment with natural lighting"
- Tool call:
search_electronic_media(searchQuery="modern luxury apartment with natural lighting")
工具:
search_electronic_media流程:
- 直接使用用户查询内容——无需提取关键词或进行转换
- 调用
search_electronic_media - 将查询内容传入工具的参数
searchQuery
示例:
- 用户查询:"modern luxury apartment with natural lighting"
- 工具调用:
search_electronic_media(searchQuery="modern luxury apartment with natural lighting")
Other (User-Provided URL)
其他(用户提供URL)
Ask the user to provide:
- Direct URL to the image
- Asset library path
- Specific system/location to check
请用户提供:
- 图片的直接URL
- 资产库路径
- 要检查的特定系统/位置
Presenting Search Results
展示搜索结果
Your action MUST use the tool to present search results as options.
ask_followup_question- Parse the tool response — Extract all image results (title and source)
- Use to present ALL results as selectable options. Show the image title only — do not display the URL.
ask_followup_question - Receive the user's selection from the tool response
- Then apply the selected image
I found 4 images. Which one would you like to use?
1. Luxury Apartment Exterior
Source: Salesforce CMS
2. Modern High-Rise Building
Source: Salesforce CMS
3. Waterfront Residence
Source: Salesforce CMS
4. Premium Condominium
Source: Salesforce CMSNever auto-select an image. Always wait for user choice.
你必须使用工具将搜索结果作为选项展示给用户。
ask_followup_question- 解析工具响应——提取所有图片结果(标题和来源)
- **使用**将所有结果作为可选选项展示。仅显示图片标题——请勿显示URL。
ask_followup_question - 接收用户的选择(来自工具响应)
- 随后应用选定的图片
我找到了4张图片。你想使用哪一张?
1. Luxury Apartment Exterior
Source: Salesforce CMS
2. Modern High-Rise Building
Source: Salesforce CMS
3. Waterfront Residence
Source: Salesforce CMS
4. Premium Condominium
Source: Salesforce CMS请勿自动选择图片。始终等待用户选择。
Applying the Selected Image
应用选定的图片
After the user chooses:
- Confirm the selection with image name and URL
- Use the complete URL returned by the tool, including all query parameters. CMS and DAM URLs rely on query parameters for authentication, resizing, and CDN routing — dropping them breaks the image. For example, a URL like must be used in full.
https://cms.example.com/media/img.jpg?oid=00D&refid=0EM&v=2 - Apply the URL to the user's code/component
- Show what was changed (file path and line number)
用户选择后:
- 确认所选图片的名称和URL
- 使用工具返回的完整URL,包括所有查询参数。CMS和DAM的URL依赖查询参数进行身份验证、调整尺寸和CDN路由——删除这些参数会导致图片无法正常显示。例如,类似的URL必须完整使用。
https://cms.example.com/media/img.jpg?oid=00D&refid=0EM&v=2 - 将URL应用到用户的代码/组件中
- 展示修改内容(文件路径和行号)
Error Handling
错误处理
| Error | Response |
|---|---|
| Tool unavailable | "The [source name] tool is unavailable. Would you like to try a different source?" |
| Tool returns error | Show error message, offer retry with different terms or alternative source |
| No results found | "No results found. Try broader keywords, removing descriptive terms, or a different source." |
| Invalid user selection | Re-display options and ask again |
Never silently fail. Always inform the user and offer alternatives.
| 错误 | 响应 |
|---|---|
| 工具不可用 | "[来源名称]工具当前不可用。你想尝试其他来源吗?" |
| 工具返回错误 | 显示错误信息,建议用户使用不同术语重试或选择其他来源 |
| 未找到结果 | "未找到结果。请尝试更宽泛的关键词、移除描述性术语或选择其他来源。" |
| 用户选择无效 | 重新展示选项并再次询问 |
请勿静默失败。始终告知用户并提供替代方案。
Search Behavior Notes
搜索行为说明
Search using keywords:
- Both keyword and taxonomy → results match keyword OR (keyword + taxonomy)
- Empty keyword → search by taxonomy only
- Empty taxonomy → search by keyword only
- Use for pagination (increment by
pageOffset)searchLimit
Search using Data 360 hybrid search:
- Handles natural language queries
- Semantic similarity matching
- Searches across multiple connected systems
使用关键词搜索:
- 同时使用关键词和分类法→结果匹配关键词 或(关键词+分类法)
- 关键词为空→仅按分类法搜索
- 分类法为空→仅按关键词搜索
- 使用进行分页(每次增加
pageOffset的值)searchLimit
使用Data 360混合搜索:
- 支持自然语言查询
- 语义相似度匹配
- 在多个关联系统中搜索
Key Principles
核心原则
- First response is always text-only — Present search sources without calling any tool
- Only show configured sources — Check your own tool list (introspection, not tool calls) and only present sources whose tools you have
- Wait for user selection — Never auto-select a source or image
- Show all results — Let the user choose the best match
- Confirm before applying — Verify the selection before modifying code
- Handle errors gracefully — Provide clear feedback and alternatives
- 首次回复始终为纯文本——展示搜索来源,不调用任何工具
- 仅展示已配置的来源——检查自身工具列表(自省操作,而非工具调用),仅展示拥有对应工具的来源
- 等待用户选择——请勿自动选择来源或图片
- 展示所有结果——让用户选择最匹配的内容
- 应用前确认——修改代码前验证用户选择
- 优雅处理错误——提供清晰反馈和替代方案