Skip to main content
Glama

send_post

Create and publish posts to Bluesky with text, images, links, mentions, and replies to specific profiles or conversations.

Instructions

Send a post to Bluesky.

Args:
    ctx: MCP context
    text: Text content of the post
    profile_identify: Optional handle or DID. Where to send post. If not provided, sends to current profile
    reply_to: Optional reply reference with 'root' and 'parent' containing 'uri' and 'cid'
    embed: Optional embed object (images, external links, records, or video)
    langs: Optional list of language codes used in the post (defaults to ['en'])
    facets: Optional list of rich text facets (mentions, links, etc.)

Returns:
    Status of the post creation with uri and cid of the created post

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
profile_identifyNo
reply_toNo
embedNo
langsNo
facetsNo

Implementation Reference

  • The handler function for the 'send_post' MCP tool. Decorated with @mcp.tool() for automatic registration and schema inference. Handles creating a Bluesky post using the atproto Client's send_post method with prepared parameters.
    @mcp.tool()
    def send_post(
        ctx: Context,
        text: str,
        profile_identify: Optional[str] = None,
        reply_to: Optional[Dict[str, Any]] = None,
        embed: Optional[Dict[str, Any]] = None,
        langs: Optional[List[str]] = None,
        facets: Optional[List[Dict[str, Any]]] = None,
    ) -> Dict:
        """Send a post to Bluesky.
    
        Args:
            ctx: MCP context
            text: Text content of the post
            profile_identify: Optional handle or DID. Where to send post. If not provided, sends to current profile
            reply_to: Optional reply reference with 'root' and 'parent' containing 'uri' and 'cid'
            embed: Optional embed object (images, external links, records, or video)
            langs: Optional list of language codes used in the post (defaults to ['en'])
            facets: Optional list of rich text facets (mentions, links, etc.)
    
        Returns:
            Status of the post creation with uri and cid of the created post
        """
        try:
            bluesky_client = get_authenticated_client(ctx)
    
            # Prepare parameters for send_post
            kwargs: Dict[str, Any] = {"text": text}
    
            # Add optional parameters if provided
            if profile_identify:
                kwargs["profile_identify"] = profile_identify
    
            if reply_to:
                kwargs["reply_to"] = reply_to
    
            if embed:
                kwargs["embed"] = embed
    
            if langs:
                kwargs["langs"] = langs
    
            if facets:
                kwargs["facets"] = facets
    
            # Create the post using the native send_post method
            post_response = bluesky_client.send_post(**kwargs)
    
            return {
                "status": "success",
                "message": "Post sent successfully",
                "post_uri": post_response.uri,
                "post_cid": post_response.cid,
            }
        except Exception as e:
            error_msg = f"Failed to send post: {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