Skip to main content
Glama

post_message_activity

Send or update messages on AniList via the MCP server. Specify text, recipient, and privacy settings to manage user activities efficiently.

Instructions

[Requires Login] Post a new message activity or update an existing one

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAniList Activity ID (null to create new, number to update)
isPrivateNoSet to true if it is a private message
recipientIdYesThe target user to send the message to
textYesThe activity message text

Implementation Reference

  • The handler function for the 'post_message_activity' tool. It authenticates the user using requireAuth, calls the anilist.activity.postMessage method with the provided text, recipientId, isPrivate, and id parameters, and returns a formatted response with the result or an error.
    async ({ text, recipientId, isPrivate, id }) => {
      try {
        const auth = requireAuth(config.anilistToken);
        if (!auth.isAuthorized) {
          return auth.errorResponse;
        }
    
        const result = await anilist.activity.postMessage(
          text,
          recipientId,
          isPrivate,
          id,
        );
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error: any) {
        return {
          content: [{ type: "text", text: `Error: ${error.message}` }],
          isError: true,
        };
      }
    },
  • Zod input schema defining parameters for the 'post_message_activity' tool: text (string), recipientId (number), isPrivate (boolean, optional default false), id (number nullable).
    {
      text: z.string().describe("The activity message text"),
      recipientId: z
        .number()
        .describe("The target user to send the message to"),
      isPrivate: z
        .boolean()
        .optional()
        .default(false)
        .describe("Set to true if it is a private message"),
      id: z
        .number()
        .nullable()
        .describe("AniList Activity ID (null to create new, number to update)"),
    },
  • Registration of the 'post_message_activity' tool on the MCP server within registerActivityTools, including name, description, input schema, metadata hints, and inline handler function.
    server.tool(
      "post_message_activity",
      "[Requires Login] Post a new message activity or update an existing one",
      {
        text: z.string().describe("The activity message text"),
        recipientId: z
          .number()
          .describe("The target user to send the message to"),
        isPrivate: z
          .boolean()
          .optional()
          .default(false)
          .describe("Set to true if it is a private message"),
        id: z
          .number()
          .nullable()
          .describe("AniList Activity ID (null to create new, number to update)"),
      },
      {
        title: "Post or Update an AniList Message Activity",
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: false,
        openWorldHint: true,
      },
      async ({ text, recipientId, isPrivate, id }) => {
        try {
          const auth = requireAuth(config.anilistToken);
          if (!auth.isAuthorized) {
            return auth.errorResponse;
          }
    
          const result = await anilist.activity.postMessage(
            text,
            recipientId,
            isPrivate,
            id,
          );
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(result, null, 2),
              },
            ],
          };
        } catch (error: any) {
          return {
            content: [{ type: "text", text: `Error: ${error.message}` }],
            isError: true,
          };
        }
      },
    );
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 mentions the login requirement and create/update functionality, but fails to describe critical behavioral traits such as rate limits, authentication specifics, whether updates are destructive or reversible, or what happens to existing data during updates. This is inadequate for a mutation tool with zero annotation coverage.

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 appropriately sized with two concise sentences that front-load the login requirement and core functionality. Every sentence earns its place, though it could be slightly more structured by separating the login prerequisite from the action description.

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?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information about return values, error conditions, side effects, or how the tool interacts with sibling tools (e.g., 'delete_activity'). For a tool that modifies data, this level of documentation is insufficient.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain parameter interactions or provide examples). Baseline 3 is appropriate when the schema does the heavy lifting.

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 with specific verbs ('post' and 'update') and resource ('message activity'), distinguishing it from sibling tools like 'post_text_activity' which handles text activities rather than messages. However, it doesn't fully differentiate from 'delete_activity' in terms of operation type beyond the obvious create/update vs. delete distinction.

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

Usage Guidelines3/5

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

The description implies usage context with '[Requires Login]' and mentions creating new or updating existing activities, but lacks explicit guidance on when to use this tool versus alternatives like 'post_text_activity' or 'delete_activity'. No exclusions or prerequisites beyond login are provided.

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/yuna0x0/anilist-mcp'

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