asset_create
Import an image from an absolute path into the GravityPort library and attach prompt recipe metadata; duplicate image bytes return the existing asset.
Instructions
Copy an image into the GravityPort library and save prompt recipe metadata. The image path must be an absolute path on this machine. Symbolic links are rejected. Only supported image and video formats are imported. Identical bytes already in the library (outside Trash) return the existing asset with deduplicated: true instead of creating a copy.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"imagePath": "<imagePath>"
},
"name": "asset_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags saved with the asset; searchable. | |
| group | No | Group the asset is filed under; grouping, not a project. | |
| ratio | No | ||
| skill | No | ||
| style | No | ||
| theme | No | ||
| prompt | No | ||
| rating | No | Star rating from 0 (unrated) to 5. | |
| source | No | Optional generation provenance, such as generation_tool, model, codex_session_id, or codex_thread_id. The original image path and Codex task ID are detected automatically. | |
| category | No | Category label shown in the app. | |
| favorite | No | Mark the asset as a favorite. | |
| imagePath | Yes | Absolute path of the image on this machine. | |
| references | No | ||
| sourceType | No | Optional source type. Defaults to codex-generated for images under <CODEX_HOME>/generated_images (normally the user's .codex/generated_images), and to mcp-agent (an image saved by an AI assistant, shown as "AI 助手" in the App) for everything else. | |
| user_prompt | No | Optional user request kept separately from the effective generation prompt. | |
| version_change | No | ||
| business_fields | No | Stored with the asset but not searchable; put anything that should be findable via search into tags instead. | |
| negative_prompt | No | ||
| parent_asset_id | No |