searching-media

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Media Search

媒体搜索

Universal routing skill for searching and retrieving existing images and media.
用于搜索和检索现有图片及媒体内容的通用路由Skill。

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
此Skill用于搜索现有媒体内容,而非创建新内容。
当用户有以下需求时使用此Skill:
  • 在Salesforce CMS、Data Cloud中搜索图片
  • 查找可用于其应用的现有视觉资产
  • 从关联来源检索媒体内容
  • 为其项目浏览可用图片
  • 定位特定照片或图形
当用户有以下需求时请勿使用此Skill:
  • 使用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 response MUST be plain text only — zero tool calls. You MUST follow this sequence:
  1. First response MUST be text only: A numbered list of search sources for the user. No tool calls of any kind.
  2. Wait for user to reply with their selected option number
  3. Only then call the appropriate search tool (this is the FIRST tool call in the entire interaction)
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
    search_electronic_media
    or
    search_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.
重要提示:此为路由Skill,而非直接搜索Skill。
当用户请求查找图片时:
你的首次回复必须仅为纯文本——禁止调用任何工具。 必须遵循以下流程:
  1. 首次回复必须仅为纯文本: 向用户展示编号格式的搜索来源列表。禁止调用任何工具。
  2. 等待用户回复其选择的选项编号
  3. 仅在此时调用对应的搜索工具(这是整个交互过程中的首次工具调用)
错误示例:
  • ❌ 在用户选择来源前调用任何工具(MCP工具、文件读取、描述符检查等)
  • ❌ “检查可用的MCP工具”——请勿通过工具调用探查或发现工具
  • ❌ 直接调用
    search_electronic_media
    search_media_cms_channels
  • ❌ 读取MCP工具描述符或架构以查看可用工具
  • ❌ 未询问用户就自行决定使用哪个搜索来源
正确示例:
  • ✅ 仅回复纯文本——编号格式的搜索来源列表
  • ✅ 询问:“你想使用哪个选项?”
  • ✅ 等待用户回复其选择
  • ✅ 之后(且仅在此时)调用用户选择的工具
当此Skill被触发时,你的首次回复必须是展示搜索来源的纯文本消息。禁止调用工具,无一例外。

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 code
If 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之前调用任何工具,则未正确遵循此Skill的要求。

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:
  • search_media_cms_channels
    → If present, include "Search using keywords"
  • search_electronic_media
    → If present, include "Search using Data 360 hybrid search"
  • 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
    → 若存在,则添加**"使用关键词搜索"**
  • search_electronic_media
    → 若存在,则添加**"使用Data 360混合搜索"**
  • 始终将**"其他"**作为最后一个选项
步骤2:构建回复内容
仅添加你实际拥有对应工具的来源。按顺序编号。
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?
步骤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
search_media_cms_channels
available:
I 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
search_electronic_media
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. 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.
两种工具均可用:
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?
search_media_cms_channels
可用:
I 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?
search_electronic_media
可用:
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. Other — Provide your own URL or path

Which option would you like to use?
两种工具均不可用:
No automated media search sources are currently configured. Please provide a direct URL or asset library path.
等待用户选择后再继续。

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_channels
Process:
  1. Analyze the query — Understand what the user is searching for (subject, attributes, domain)
  2. 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)
  3. 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)
  4. Determine locale — Use format
    en_US
    ,
    es_MX
    ,
    fr_FR
    (default:
    en_US
    )
  5. 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:
  • searchKeyword
    : Join keywords with
    OR
    (space-OR-space). Use empty string if no keywords.
  • taxonomyExpression
    : Stringify JSON object
    {"OR": ["term1", "term2"]}
    . Use
    "{}"
    if no taxonomies.
  • searchLanguage
    : Locale with underscore (e.g.,
    en_US
    )
  • channelIds
    : Always empty string
  • channelType
    : Always
    "PublicUnauthenticated"
  • contentTypeFqn
    : Always
    "sfdc_cms__image"
  • pageOffset
    : Start at
    0
    , increment by
    searchLimit
    for pagination
  • searchLimit
    : Default
    5
    , adjust if user requests more
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
  }]
}
  1. Call the tool with the exact JSON payload
工具:
search_media_cms_channels
流程:
  1. 分析查询内容 — 理解用户的搜索需求(主题、属性、领域)
  2. 提取关键词 — 图片元数据中可能出现的具体名词
    • 使用领域特定同义词
    • 最多10个术语
    • 示例:
      • "luxury apartments" → apartment, villa, penthouse, residence, condo
      • "company logo" → logo, emblem, corporate logo
      • "bright room" → (若无具体名词则留空)
  3. 提取分类术语 — 描述性特质、风格、氛围、类别
    • 仅提取形容词和属性
    • 示例:
      • "luxury apartment with river view" → Luxury, Premium, Waterfront, Riverside, Panoramic
      • "bright spacious room" → Bright, Spacious, Open, Airy, Light
      • "car" → (若无描述性术语则留空)
  4. 确定语言区域 — 使用
    en_US
    es_MX
    fr_FR
    格式(默认:
    en_US
  5. 构建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-空格)连接关键词。若无关键词则留空字符串。
  • taxonomyExpression
    : 将JSON对象
    {"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
  }]
}
  1. 使用精确的JSON负载调用工具

Search using Data 360 hybrid search

使用Data 360混合搜索

Tool:
search_electronic_media
Process:
  1. Use the user's query as-is — no keyword extraction or transformation needed
  2. Call
    search_electronic_media
  3. Pass the query to the tool's
    searchQuery
    parameter
Example:
  • User query: "modern luxury apartment with natural lighting"
  • Tool call:
    search_electronic_media(searchQuery="modern luxury apartment with natural lighting")
工具:
search_electronic_media
流程:
  1. 直接使用用户的查询内容——无需提取或转换关键词
  2. 调用
    search_electronic_media
  3. 将查询内容传入工具的
    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

展示搜索结果

Parse the tool response and present ALL results as numbered options. Show the image title only — do not display the URL. When the user selects an option, use the URL internally to apply the 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 CMS
Never auto-select an image. Always wait for user choice.
解析工具响应,并将所有结果以编号选项形式展示。仅显示图片标题——请勿展示URL。用户选择选项后,在内部使用URL来应用图片。
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 CMS
请勿自动选择图片。 始终等待用户选择。

Applying the Selected Image

应用选定的图片

After the user chooses:
  1. Confirm the selection with image name and URL
  2. 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
    https://cms.example.com/media/img.jpg?oid=00D&refid=0EM&v=2
    must be used in full.
  3. Apply the URL to the user's code/component
  4. Show what was changed (file path and line number)
用户选择后:
  1. 使用图片名称和URL确认选择
  2. 使用工具返回的完整URL,包括所有查询参数。CMS和DAM的URL依赖查询参数进行身份验证、调整大小和CDN路由——移除这些参数会导致图片无法显示。例如,必须完整使用类似
    https://cms.example.com/media/img.jpg?oid=00D&refid=0EM&v=2
    的URL。
  3. 将URL应用到用户的代码/组件中
  4. 展示修改内容(文件路径和行号)

Error Handling

错误处理

ErrorResponse
Tool unavailable"The [source name] tool is unavailable. Would you like to try a different source?"
Tool returns errorShow 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 selectionRe-display options and ask again
Never silently fail. Always inform the user and offer alternatives.
错误类型回复内容
工具不可用"The [source name] tool is unavailable. Would you like to try a different source?"
工具返回错误显示错误信息,提供使用不同术语重试或选择替代来源的选项
未找到结果"No results found. Try broader keywords, removing descriptive terms, or a different source."
用户选择无效重新展示选项并再次询问
请勿静默失败。 始终告知用户并提供替代方案。

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
    pageOffset
    for pagination (increment by
    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

核心原则

  1. First response is always text-only — Present search sources without calling any tool
  2. Only show configured sources — Check your own tool list (introspection, not tool calls) and only present sources whose tools you have
  3. Wait for user selection — Never auto-select a source or image
  4. Show all results — Let the user choose the best match
  5. Confirm before applying — Verify the selection before modifying code
  6. Handle errors gracefully — Provide clear feedback and alternatives
  1. 首次回复始终为纯文本——展示搜索来源,不调用任何工具
  2. 仅展示已配置的来源——检查自身工具列表(自我检视,不调用工具),仅展示拥有对应工具的来源
  3. 等待用户选择——请勿自动选择来源或图片
  4. 展示所有结果——让用户选择最匹配的内容
  5. 应用前确认——修改代码前验证选择内容
  6. 优雅处理错误——提供清晰的反馈和替代方案