Skip to main content
Glama

send_images

Create and share a post with up to 4 images, including optional alt text, reply details, language codes, and facets, using Bluesky Social MCP.

Instructions

Send a post with multiple images (up to 4).

Args: ctx: MCP context text: Text content of the post images_data: List of base64-encoded image data (max 4) image_alts: Optional list of alt text for each image profile_identify: Optional handle or DID for the post author reply_to: Optional reply information dict with keys uri and cid langs: Optional list of language codes facets: Optional list of facets (mentions, links, etc.) Returns: Status of the post creation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
facetsNo
image_altsNo
images_dataYes
langsNo
profile_identifyNo
reply_toNo
textYes

Implementation Reference

  • The complete handler function for the 'send_images' MCP tool. It is registered via the @mcp.tool() decorator. The function validates input (1-4 base64 images), decodes them, and calls the Bluesky client's send_images method to create a post with multiple images.
    @mcp.tool() def send_images( ctx: Context, text: str, images_data: List[str], image_alts: Optional[List[str]] = None, profile_identify: Optional[str] = None, reply_to: Optional[Dict[str, Any]] = None, langs: Optional[List[str]] = None, facets: Optional[List[Dict[str, Any]]] = None, ) -> Dict: """Send a post with multiple images (up to 4). Args: ctx: MCP context text: Text content of the post images_data: List of base64-encoded image data (max 4) image_alts: Optional list of alt text for each image profile_identify: Optional handle or DID for the post author reply_to: Optional reply information dict with keys uri and cid langs: Optional list of language codes facets: Optional list of facets (mentions, links, etc.) Returns: Status of the post creation """ try: bluesky_client = get_authenticated_client(ctx) # Verify we have 1-4 images if not images_data: return { "status": "error", "message": "At least one image is required", } if len(images_data) > 4: return { "status": "error", "message": "Maximum of 4 images allowed", } # Decode all images images_bytes = [] for img_data in images_data: try: image_bytes = base64.b64decode(img_data) images_bytes.append(image_bytes) except Exception as e: return { "status": "error", "message": f"Failed to decode image data: {str(e)}", } # Send the post with images post_response = bluesky_client.send_images( text=text, images=images_bytes, image_alts=image_alts, profile_identify=profile_identify, reply_to=reply_to, langs=langs, facets=facets, ) return { "status": "success", "message": "Post with images created successfully", "post_uri": post_response.uri, "post_cid": post_response.cid, } except Exception as e: error_msg = f"Failed to create post with images: {str(e)}" return {"status": "error", "message": error_msg}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gwbischof/bluesky-social-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server