Skip to content
This repository was archived by the owner on Jan 15, 2026. It is now read-only.

Commit 73519bf

Browse files
committed
image-builder-mcp: improve GCP image usage instructions
1 parent da51ca2 commit 73519bf

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/image_builder_mcp/server.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,8 @@ def get_compose_details(self, compose_identifier: str) -> str:
667667
"upload_status", {}).get("options", {}).get("url")
668668
upload_target = response.get("image_status", {}).get(
669669
"upload_status", {}).get("type")
670+
image_name = response.get("image_status", {}).get(
671+
"upload_status", {}).get("options", {}).get("image_name")
670672

671673
if download_url and upload_target == "oci.objectstorage":
672674
intro += """
@@ -681,6 +683,24 @@ def get_compose_details(self, compose_identifier: str) -> str:
681683
```
682684
{download_url}
683685
```
686+
"""
687+
elif image_name and upload_target == "gcp":
688+
intro += f"""
689+
[INSTRUCTION] present the two code blocks with their respective explanations below to the user.
690+
691+
To launch this image, contact your org admin to adjust your launch permissions.
692+
693+
Alternatively, launch directly from the cloud provider console.
694+
695+
Launch with Google Cloud Console:
696+
```
697+
gcloud compute instances create {image_name}-instance --image-project red-hat-image-builder --image {image_name}
698+
```
699+
700+
or copy image to your account
701+
```
702+
gcloud compute images create {image_name}-copy --source-image-project red-hat-image-builder --source-image {image_name}
703+
```
684704
"""
685705
elif download_url:
686706
intro += f"The image is available at [{download_url}]({download_url})\n"

0 commit comments

Comments
 (0)