Skip to main content
Glama

post_text_activity

Create or update AniList text activities by submitting activity content and ID. Requires login for authorized access to the anilist-mcp server.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAniList Activity ID (null to create new, number to update)
textYesThe content of the activity

Implementation Reference

  • Handler function that authenticates the user, calls anilist.activity.postText(text, id), and returns the result or error.
    async ({ text, id }) => {
      try {
        const auth = requireAuth(config.anilistToken);
        if (!auth.isAuthorized) {
          return auth.errorResponse;
        }
    
        const result = await anilist.activity.postText(text, 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: text (string) and id (nullable number).
    {
      text: z.string().describe("The content of the activity"),
      id: z
        .number()
        .nullable()
        .describe("AniList Activity ID (null to create new, number to update)"),
    },
  • Registration of the post_text_activity tool via server.tool(), including name, description, input schema, metadata hints, and inline handler.
    server.tool(
      "post_text_activity",
      "[Requires Login] Post a new text activity or update an existing one",
      {
        text: z.string().describe("The content of the activity"),
        id: z
          .number()
          .nullable()
          .describe("AniList Activity ID (null to create new, number to update)"),
      },
      {
        title: "Post or Update an AniList Text Activity",
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: false,
        openWorldHint: true,
      },
      async ({ text, id }) => {
        try {
          const auth = requireAuth(config.anilistToken);
          if (!auth.isAuthorized) {
            return auth.errorResponse;
          }
    
          const result = await anilist.activity.postText(text, 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 authentication requirements ('[Requires Login]') and the dual create/update functionality, but lacks details on permissions, rate limits, error handling, or what happens during updates (e.g., overwriting vs. merging). For a mutation tool, this leaves significant gaps in understanding its behavior.

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 concise and front-loaded, consisting of just two sentences that directly state the tool's function and prerequisite. There's no wasted text, and the information is presented efficiently. However, the bracketed '[Requires Login]' could be integrated more smoothly, slightly affecting structure.

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 the tool's complexity (a mutation operation with authentication needs) and lack of annotations or output schema, the description is incomplete. It doesn't explain return values, error conditions, or behavioral nuances like how updates affect existing data. For a tool that modifies data, this leaves too much unspecified for safe and effective use.

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, clearly documenting both parameters ('id' and 'text'). The description adds no additional parameter semantics beyond what's in the schema, such as format constraints or examples. Since the schema does the heavy lifting, a baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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: 'Post a new text activity or update an existing one.' It specifies the verb ('Post'/'update') and resource ('text activity'), making it easy to understand. However, it doesn't differentiate from sibling tools like 'post_message_activity' or 'update_user', which could cause confusion about when to use this specific tool.

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 minimal guidance: it mentions '[Requires Login]' as a prerequisite but offers no explicit advice on when to use this tool versus alternatives. There's no mention of when not to use it or how it differs from similar tools like 'post_message_activity' or 'update_user', leaving usage context largely implied.

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