Search CMS Media
search_cms_mediaSearches the images already in one of the connected CMS's media collections, newest first, 24 per page. get_website_cms lists the collections Mark can read (mediaCollections); left out, Mark uses the default, and the reply names the collection it searched. Use a result as a website post's cover with save_post meta.cover = { source: "cms", mediaId, collection }, or attach it to a social post with save_post meta.cmsImages = [{ mediaId, collection }]: Mark keeps a reference, never a copy, and a social post's image is copied to the platform when the post is scheduled. To put one in a website post's body, add on its own line with the result's url (the original file): on a rich-text (lexical) mapping Mark publishes it as that media document, uploading nothing.
Does not change anything; reads from the customer's CMS. These ids are not Mark asset ids. Related: save_post, get_website_cms, search_assets.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_cms_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number, from 1. | |
| query | No | Matches file name or alt text. | |
| channel | No | For a website cover, its channel (blog, faq, competitor_page): limits the search to the collections that channel's cover field accepts. Leave it out for a social post or a body image. | |
| collection | No | Media collection slug from get_website_cms mediaCollections. Left out, the default (where new media goes, else the first readable). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| collection | Yes | ||
| hasNextPage | Yes |