Skip to main content
Glama
brianellin

Bluesky MCP Server

by brianellin

like-post

Like a specific post on Bluesky using its URI. Part of the Bluesky MCP Server, enabling AI assistants to interact with social features on the ATProtocol platform.

Instructions

Like a post on Bluesky

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uriYesThe URI of the post to like

Implementation Reference

  • Handler function that fetches the post thread to get the CID and then calls agent.like() to like the post.
    async ({ uri }) => {
      if (!agent) {
        return mcpErrorResponse("Not logged in. Please check your environment variables.");
      }
    
      try {
        // First, we need to get the CID of the post
        const parts = uri.split('/');
        const repo = parts[2]; // The DID
        const collection = parts[4]; // Usually app.bsky.feed.post
        const rkey = parts[5]; // The record key
        
        const response = await agent.app.bsky.feed.getPostThread({ uri });
        
        if (!response.success || response.data.thread.$type !== 'app.bsky.feed.defs#threadViewPost') {
          return mcpErrorResponse("Failed to get post information.");
        }
        
        // Type assertion to tell TypeScript this is a post
        const threadPost = response.data.thread as any;
        const post = threadPost.post;
        const cid = post.cid;
        
        await agent.like(uri, cid);
        
        return mcpSuccessResponse("Post liked successfully!");
      } catch (error) {
        return mcpErrorResponse(`Error liking post: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • Input schema defining the 'uri' parameter as a string with description.
      uri: z.string().describe("The URI of the post to like"),
    },
  • src/index.ts:642-678 (registration)
    Registration of the 'like-post' tool using server.tool(), including name, description, schema, and handler.
    server.tool(
      "like-post",
      "Like a post on Bluesky",
      {
        uri: z.string().describe("The URI of the post to like"),
      },
      async ({ uri }) => {
        if (!agent) {
          return mcpErrorResponse("Not logged in. Please check your environment variables.");
        }
    
        try {
          // First, we need to get the CID of the post
          const parts = uri.split('/');
          const repo = parts[2]; // The DID
          const collection = parts[4]; // Usually app.bsky.feed.post
          const rkey = parts[5]; // The record key
          
          const response = await agent.app.bsky.feed.getPostThread({ uri });
          
          if (!response.success || response.data.thread.$type !== 'app.bsky.feed.defs#threadViewPost') {
            return mcpErrorResponse("Failed to get post information.");
          }
          
          // Type assertion to tell TypeScript this is a post
          const threadPost = response.data.thread as any;
          const post = threadPost.post;
          const cid = post.cid;
          
          await agent.like(uri, cid);
          
          return mcpSuccessResponse("Post liked successfully!");
        } catch (error) {
          return mcpErrorResponse(`Error liking post: ${error instanceof Error ? error.message : String(error)}`);
        }
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Like') which implies a write/mutation operation, but doesn't disclose any behavioral traits such as authentication requirements, rate limits, side effects, or what happens if the post is already liked. This is a significant gap 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.

Conciseness5/5

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

The description is extremely concise with a single sentence that directly states the tool's purpose. There's no wasted language or unnecessary elaboration, making it front-loaded and efficient.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address what the tool returns, error conditions, authentication needs, or how it interacts with the Bluesky ecosystem. Given the complexity of social media interactions, more context would be helpful.

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

Parameters3/5

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

The schema description coverage is 100%, with the single parameter 'uri' clearly documented in the schema. The description doesn't add any parameter semantics beyond what the schema provides, such as URI format examples or validation rules, so it meets the baseline for high schema coverage.

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 action ('Like') and target resource ('a post on Bluesky'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get-liked-posts' or 'get-post-likes' that involve post likes but serve different purposes.

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 prerequisites (e.g., authentication status), when not to use it, or how it differs from related tools like 'get-liked-posts' or 'get-post-likes' in the sibling list.

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

Related 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/brianellin/bsky-mcp-server'

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