Skip to main content
Glama

send_image

Create and publish a Bluesky post with an image, including text content and alternative text for accessibility.

Instructions

Send a post with a single image.

Args:
    ctx: MCP context
    text: Text content of the post
    image_data: Base64-encoded image data
    image_alt: Alternative text description for the 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
textYes
image_dataYes
image_altYes
profile_identifyNo
reply_toNo
langsNo
facetsNo

Implementation Reference

  • The main handler function for the 'send_image' tool. Decorated with @mcp.tool(), it decodes base64-encoded image data, constructs a Bluesky post with the image and optional parameters, sends it via the authenticated Bluesky client, and returns the post URI/CID on success or an error message.
    @mcp.tool()
    def send_image(
        ctx: Context,
        text: str,
        image_data: str,
        image_alt: str,
        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 a single image.
    
        Args:
            ctx: MCP context
            text: Text content of the post
            image_data: Base64-encoded image data
            image_alt: Alternative text description for the 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)
    
            # Decode base64 image
            try:
                image_bytes = base64.b64decode(image_data)
            except Exception as e:
                return {
                    "status": "error",
                    "message": f"Failed to decode image data: {str(e)}",
                }
    
            # Send the post with image
            post_response = bluesky_client.send_image(
                text=text,
                image=image_bytes,
                image_alt=image_alt,
                profile_identify=profile_identify,
                reply_to=reply_to,
                langs=langs,
                facets=facets,
            )
    
            return {
                "status": "success",
                "message": "Post with image created successfully",
                "post_uri": post_response.uri,
                "post_cid": post_response.cid,
            }
        except Exception as e:
            error_msg = f"Failed to create post with image: {str(e)}"
            return {"status": "error", "message": error_msg}
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a post-creation tool ('Send a post'), implying a write/mutation operation, but doesn't mention authentication requirements, rate limits, error conditions, or what 'Status of the post creation' actually means. The description lacks crucial behavioral context for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, Args, Returns) and front-loaded the core functionality. Every sentence earns its place, though the 'Args:' section could be slightly more concise. The structure efficiently communicates the tool's capabilities without unnecessary verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with 7 parameters, no annotations, and no output schema, the description provides good parameter documentation but lacks critical behavioral context. It doesn't explain authentication needs, error handling, rate limits, or what the return value contains. The parameter coverage is strong, but the overall context for a post-creation tool remains incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides excellent parameter semantics through the 'Args:' section, which documents all 7 parameters with clear explanations. Since schema description coverage is 0%, this comprehensive parameter documentation fully compensates for the schema's lack of descriptions. Each parameter's purpose is clearly explained, adding significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Send a post with a single image.' It specifies the verb ('send') and resource ('post with a single image'), making it distinct from sibling tools like 'send_post' (text-only) and 'send_images' (multiple images). However, it doesn't explicitly differentiate from 'send_video' or other media-sending tools beyond the single-image focus.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'send_image' over 'send_post' (text-only), 'send_images' (multiple images), or 'send_video'. There's no discussion of prerequisites, constraints, or typical use cases beyond the basic functionality.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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