Skip to main content
Glama
gavxm
by gavxm

anilist_feed

Read-onlyIdempotent

Retrieve recent activity from an AniList user's feed, including text posts and anime/manga list updates. Filter by activity type and paginate results.

Instructions

Get recent activity from a user's AniList feed. Shows text posts and list updates (anime/manga status changes). Returns numbered entries with author, date, and content. Supports pagination and type filtering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameNoAniList username. Falls back to configured default if not provided.
typeNoFilter by activity typeALL
limitNoNumber of activities to return (default 10, max 25)
pageNoPage number for pagination (default 1)

Implementation Reference

  • Registration of the 'anilist_feed' tool via server.addTool() in the registerSocialTools function, including its name, description, parameters (FeedInputSchema), annotations, and the execute handler.
    export function registerSocialTools(server: FastMCP): void {
      // === Activity Feed ===
    
      server.addTool({
        name: "anilist_feed",
        description:
          "Get recent activity from a user's AniList feed. " +
          "Shows text posts and list updates (anime/manga status changes). " +
          "Returns numbered entries with author, date, and content. Supports pagination and type filtering.",
        parameters: FeedInputSchema,
        annotations: {
          title: "Activity Feed",
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
        execute: async (args) => {
          try {
            const username = getDefaultUsername(args.username);
    
            // Resolve username to numeric ID for the activity query
            const userData = await anilistClient.query<UserStatsResponse>(
              USER_STATS_QUERY,
              { name: username },
              { cache: "stats" },
            );
            const userId = userData.User.id;
    
            const variables: Record<string, unknown> = {
              userId,
              page: args.page,
              perPage: args.limit,
            };
            if (args.type !== "ALL") variables.type = args.type;
    
            const data = await anilistClient.query<ActivityFeedResponse>(
              ACTIVITY_FEED_QUERY,
              variables,
              { cache: "search" },
            );
    
            const { activities, pageInfo } = data.Page;
    
            if (!activities.length) {
              return `No recent activity for ${username}.`;
            }
    
            const header = `Activity feed for ${username}`;
            const lines = activities.map((a, i) => formatActivity(a, i + 1));
    
            const footer = paginationFooter(
              args.page,
              args.limit,
              pageInfo.total,
              pageInfo.hasNextPage,
            );
    
            return (
              [header, "", ...lines].join("\n") + (footer ? `\n\n${footer}` : "")
            );
          } catch (error) {
            return throwToolError(error, "fetching activity feed");
          }
        },
      });
  • The execute handler for anilist_feed: resolves username to user ID via an AniList query, fetches activity feed with pagination/type filtering, formats results using formatActivity(), and returns a formatted string with header, entries, and pagination footer.
    execute: async (args) => {
      try {
        const username = getDefaultUsername(args.username);
    
        // Resolve username to numeric ID for the activity query
        const userData = await anilistClient.query<UserStatsResponse>(
          USER_STATS_QUERY,
          { name: username },
          { cache: "stats" },
        );
        const userId = userData.User.id;
    
        const variables: Record<string, unknown> = {
          userId,
          page: args.page,
          perPage: args.limit,
        };
        if (args.type !== "ALL") variables.type = args.type;
    
        const data = await anilistClient.query<ActivityFeedResponse>(
          ACTIVITY_FEED_QUERY,
          variables,
          { cache: "search" },
        );
    
        const { activities, pageInfo } = data.Page;
    
        if (!activities.length) {
          return `No recent activity for ${username}.`;
        }
    
        const header = `Activity feed for ${username}`;
        const lines = activities.map((a, i) => formatActivity(a, i + 1));
    
        const footer = paginationFooter(
          args.page,
          args.limit,
          pageInfo.total,
          pageInfo.hasNextPage,
        );
    
        return (
          [header, "", ...lines].join("\n") + (footer ? `\n\n${footer}` : "")
        );
      } catch (error) {
        return throwToolError(error, "fetching activity feed");
      }
    },
  • FeedInputSchema defines the input schema for anilist_feed: optional username, activity type filter (TEXT/ANIME_LIST/MANGA_LIST/ALL), limit (1-25, default 10), and page number.
    export const FeedInputSchema = z.object({
      username: usernameSchema
        .optional()
        .describe(
          "AniList username. Falls back to configured default if not provided.",
        ),
      type: z
        .enum(["TEXT", "ANIME_LIST", "MANGA_LIST", "ALL"])
        .default("ALL")
        .describe("Filter by activity type"),
      limit: z
        .number()
        .int()
        .min(1)
        .max(25)
        .default(10)
        .describe("Number of activities to return (default 10, max 25)"),
      page: pageParam,
    });
  • formatActivity() helper that formats a single activity entry for display. Handles TextActivity (truncates text to 200 chars) and ListActivity (shows status/progress/media title).
    function formatActivity(activity: Activity, index: number): string {
      const date = new Date(activity.createdAt * 1000).toLocaleDateString("en-US", {
        month: "short",
        day: "numeric",
      });
    
      if (activity.__typename === "TextActivity") {
        const text =
          activity.text.length > 200
            ? activity.text.slice(0, 200) + "..."
            : activity.text;
        return `${index}. ${activity.user.name} posted (${date}):\n   ${text}`;
      }
    
      // List activity
      const title = getTitle(activity.media.title);
      const progress = activity.progress ? ` ${activity.progress}` : "";
      return `${index}. ${activity.user.name} ${activity.status}${progress} ${title} (${date})`;
    }
  • ACTIVITY_FEED_QUERY GraphQL query used by the tool to fetch activity feed from AniList API, supporting TextActivity and ListActivity types with pagination.
    export const ACTIVITY_FEED_QUERY = `
      query ActivityFeed($userId: Int, $type: ActivityType, $page: Int, $perPage: Int) {
        Page(page: $page, perPage: $perPage) {
          pageInfo { total currentPage hasNextPage }
          activities(userId: $userId, type: $type, sort: ID_DESC) {
            ... on TextActivity {
              __typename
              id
              text
              createdAt
              user { name }
            }
            ... on ListActivity {
              __typename
              id
              status
              progress
              createdAt
              user { name }
              media {
                id
                title { romaji english native }
                type
              }
            }
          }
        }
      }
    `;
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the agent knows it's a safe read. The description adds minor behavioral context (returns numbered entries with author/date/content) but does not disclose significant traits beyond annotations. No contradictions.

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 at four sentences, front-loads the purpose, and covers key features without redundancy. A minor improvement could be combining the last two sentences ('Supports pagination and type filtering') into one, but overall effective.

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

Completeness4/5

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

Given the tool's simplicity (4 params, no output schema), the description adequately summarizes input behavior (feed type, pagination) and output format (numbered entries). It does not cover edge cases or error handling, but these are less critical for a read-only feed tool.

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?

All four parameters have descriptions in the input schema (100% coverage), so the description mainly restates features like pagination and type filtering. It adds no new semantic details beyond what the schema provides, placing it at 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 it retrieves recent activity from a user's AniList feed, specifying content types (text posts, list updates) and output format. However, it does not explicitly differentiate from sibling tools like anilist_activity, which may have overlapping functionality.

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 lacks any guidance on when to use this tool over alternatives (e.g., anilist_activity, anilist_list). There is no mention of prerequisites, exclusions, or contextual hints for selection among siblings.

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

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/gavxm/ani-mcp'

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