prismic_get_media
Retrieve media assets from Prismic's Asset API using filters like asset type, keywords, and pagination controls to manage digital content.
Instructions
List media assets from Prismic Asset API.
This maps directly to GET /assets query parameters:
assetType, limit, cursor, and keyword.
Requires PRISMIC_REPOSITORY and PRISMIC_WRITE_API_TOKEN.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset_type | No | ||
| limit | No | ||
| cursor | No | ||
| keyword | No |
Implementation Reference
- prismic_content_mcp/server.py:400-418 (handler)The handler implementation for the `prismic_get_media` tool, which calls the service to list assets from the Prismic Asset API.
async def handle_prismic_get_media( *, asset_type: str | None = None, limit: int | None = None, cursor: str | None = None, keyword: str | None = None, service_factory: ServiceFactory = _build_service, ) -> dict[str, Any]: """List assets from the Prismic Asset API (`GET /assets`).""" async with service_factory() as service: media = await service.get_media( asset_type=asset_type, limit=limit, cursor=cursor, keyword=keyword, ) return {"media": media} - prismic_content_mcp/server.py:771-786 (registration)The tool registration for `prismic_get_media` using the FastMCP decorator.
@server.tool(name="prismic_get_media") async def prismic_get_media( asset_type: str | None = None, limit: int | None = None, cursor: str | None = None, keyword: str | None = None, ) -> dict[str, Any]: """List media assets from Prismic Asset API. This maps directly to `GET /assets` query parameters: `assetType`, `limit`, `cursor`, and `keyword`. Requires `PRISMIC_REPOSITORY` and `PRISMIC_WRITE_API_TOKEN`. """ return await handle_prismic_get_media( asset_type=asset_type,