Skip to main content
Glama

Like Article

like_article

Enable users to like specific articles on Emlog blogs by submitting the article ID, liker’s name, and avatar URL via the Emlog MCP Server interface.

Instructions

Like an article

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
avatarNoAvatar URL of the person liking
gidYesThe ID of the article to like
nameNoName of the person liking

Implementation Reference

  • MCP tool handler: destructures input params, calls emlogClient.likeArticle(), returns success message or error.
    async ({ gid, name, avatar }) => {
      try {
        await emlogClient.likeArticle(gid, name, avatar);
        return {
          content: [{
            type: "text",
            text: `Successfully liked article with ID: ${gid}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: `Error: ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    }
  • Input schema using Zod: gid (number, required), name/avatar (string, optional).
    inputSchema: {
      gid: z.number().describe("The ID of the article to like"),
      name: z.string().optional().describe("Name of the person liking"),
      avatar: z.string().optional().describe("Avatar URL of the person liking")
    }
  • src/index.ts:357-387 (registration)
    Registration of the 'like_article' tool with McpServer using title, description, inputSchema, and handler function.
    server.registerTool(
      "like_article",
      {
        title: "Like Article",
        description: "Like an article",
        inputSchema: {
          gid: z.number().describe("The ID of the article to like"),
          name: z.string().optional().describe("Name of the person liking"),
          avatar: z.string().optional().describe("Avatar URL of the person liking")
        }
      },
      async ({ gid, name, avatar }) => {
        try {
          await emlogClient.likeArticle(gid, name, avatar);
          return {
            content: [{
              type: "text",
              text: `Successfully liked article with ID: ${gid}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: `Error: ${error instanceof Error ? error.message : String(error)}`
            }],
            isError: true
          };
        }
      }
    );
  • EmlogClient helper method: sends POST to /index.php?action=addlike with gid, optional name/avatar, returns like id.
    async likeArticle(gid: number, name?: string, avatar?: string): Promise<{ id: number }> {
      const formData = new URLSearchParams();
      formData.append('gid', String(gid));
      if (name) formData.append('name', name);
      if (avatar) formData.append('avatar', avatar);
      const response = await this.api.post('/index.php?action=addlike', formData);
      return response.data.data;
    }
Behavior1/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 but fails to do so. It doesn't reveal if this is a read-only or mutative operation, what permissions are required, potential side effects, or response format, leaving critical behavioral traits unspecified.

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, 'Like an article,' which is front-loaded and wastes no words. While it lacks substance, it earns full marks for brevity and structure, as every word serves the minimal purpose stated.

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

Completeness1/5

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

Given the complexity of a mutative tool with no annotations and no output schema, the description is completely inadequate. It fails to explain what 'liking' entails, the expected outcome, or how it integrates with sibling tools, leaving significant gaps in understanding the tool's role and behavior.

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 input schema has 100% description coverage, documenting all three parameters clearly, so the description doesn't need to add parameter details. However, it also doesn't provide any additional context or meaning beyond the schema, such as explaining the relationship between parameters, resulting in a baseline score.

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

Purpose2/5

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

The description 'Like an article' is a tautology that merely restates the tool name and title without adding specificity. It doesn't distinguish this tool from sibling tools like 'add_comment' or 'update_article' in terms of action or resource, leaving the purpose vague beyond the basic verb-noun pairing.

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

Usage Guidelines1/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, context, or exclusions, such as whether it's for authenticated users only or how it differs from related actions like commenting or updating articles, making it misleadingly simplistic.

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/eraincc/emlog-mcp'

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