Skip to main content
Glama
gavxm
by gavxm

anilist_profile

Read-onlyIdempotent

View an AniList user's profile to get their bio, anime and manga stats, top favourites, and account age.

Instructions

View a user's AniList profile including bio, stats, and favourites. Returns bio, anime/manga stats summary, top favourites by category, and account age.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameNoAniList username. Falls back to configured default if not provided.

Implementation Reference

  • The execute handler for the 'anilist_profile' tool. Calls the AniList API with USER_PROFILE_QUERY and formats the result using formatProfile.
      execute: async (args) => {
        try {
          const username = getDefaultUsername(args.username);
    
          const data = await anilistClient.query<UserProfileResponse>(
            USER_PROFILE_QUERY,
            { name: username },
            { cache: "stats" },
          );
    
          return formatProfile(data.User);
        } catch (error) {
          return throwToolError(error, "fetching profile");
        }
      },
    });
  • The tool registration block that adds the 'anilist_profile' tool to the server via server.addTool, with name, description, parameters (ProfileInputSchema), annotations, and the execute handler.
    server.addTool({
      name: "anilist_profile",
      description:
        "View a user's AniList profile including bio, stats, and favourites. " +
        "Returns bio, anime/manga stats summary, top favourites by category, and account age.",
      parameters: ProfileInputSchema,
      annotations: {
        title: "User Profile",
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
      execute: async (args) => {
        try {
          const username = getDefaultUsername(args.username);
    
          const data = await anilistClient.query<UserProfileResponse>(
            USER_PROFILE_QUERY,
            { name: username },
            { cache: "stats" },
          );
    
          return formatProfile(data.User);
        } catch (error) {
          return throwToolError(error, "fetching profile");
        }
      },
    });
  • ProfileInputSchema: defines input validation using Zod. Expects an optional 'username' string using the shared usernameSchema.
    export const ProfileInputSchema = z.object({
      username: usernameSchema
        .optional()
        .describe(
          "AniList username. Falls back to configured default if not provided.",
        ),
    });
  • formatProfile helper function that formats a UserProfileResponse User object into a markdown string with bio, anime/manga stats, favourites (anime, manga, characters, staff, studios), and account age.
    export function formatProfile(user: UserProfileResponse["User"]): string {
      const lines: string[] = [`# ${user.name}`, user.siteUrl, ""];
    
      // About/bio
      if (user.about) {
        lines.push(truncateDescription(user.about, 500), "");
      }
    
      // Anime stats
      const a = user.statistics.anime;
      if (a.count > 0) {
        const days = (a.minutesWatched / 1440).toFixed(1);
        lines.push(
          `## Anime: ${a.count} titles | ${a.episodesWatched} episodes | ${days} days | Mean ${a.meanScore.toFixed(1)}`,
        );
      }
    
      // Manga stats
      const m = user.statistics.manga;
      if (m.count > 0) {
        lines.push(
          `## Manga: ${m.count} titles | ${m.chaptersRead} chapters | ${m.volumesRead} volumes | Mean ${m.meanScore.toFixed(1)}`,
        );
      }
    
      // Favourites
      const fav = user.favourites;
      if (fav.anime.nodes.length) {
        lines.push(
          "",
          "Favourite Anime: " +
            fav.anime.nodes.map((n) => getTitle(n.title)).join(", "),
        );
      }
      if (fav.manga.nodes.length) {
        lines.push(
          "Favourite Manga: " +
            fav.manga.nodes.map((n) => getTitle(n.title)).join(", "),
        );
      }
      if (fav.characters.nodes.length) {
        lines.push(
          "Favourite Characters: " +
            fav.characters.nodes.map((n) => n.name.full).join(", "),
        );
      }
      if (fav.staff.nodes.length) {
        lines.push(
          "Favourite Staff: " + fav.staff.nodes.map((n) => n.name.full).join(", "),
        );
      }
      if (fav.studios.nodes.length) {
        lines.push(
          "Favourite Studios: " + fav.studios.nodes.map((n) => n.name).join(", "),
        );
      }
    
      // Account age
      const created = new Date(user.createdAt * 1000).toLocaleDateString("en-US", {
        month: "short",
        year: "numeric",
      });
      lines.push("", `Member since ${created}`);
    
      return lines.join("\n");
    }
  • USER_PROFILE_QUERY: GraphQL query that fetches user profile data including id, name, bio (about), avatar, banner, siteUrl, dates, statistics (anime/manga counts, scores, episodes/chapters/volumes), and favourites (anime, manga, characters, staff, studios).
    export const USER_PROFILE_QUERY = `
      query UserProfile($name: String) {
        User(name: $name) {
          id
          name
          about
          avatar { large }
          bannerImage
          siteUrl
          createdAt
          updatedAt
          donatorTier
          statistics {
            anime {
              count
              meanScore
              episodesWatched
              minutesWatched
            }
            manga {
              count
              meanScore
              chaptersRead
              volumesRead
            }
          }
          favourites {
            anime(perPage: 5) {
              nodes { id title { romaji english native } siteUrl }
            }
            manga(perPage: 5) {
              nodes { id title { romaji english native } siteUrl }
            }
            characters(perPage: 5) {
              nodes { id name { full } siteUrl }
            }
            staff(perPage: 5) {
              nodes { id name { full } siteUrl }
            }
            studios(perPage: 5) {
              nodes { id name siteUrl }
            }
          }
        }
      }
    `;
Behavior4/5

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

The description states 'View', which aligns with readOnlyHint=true and idempotentHint=true annotations. It adds specific return fields (bio, stats, favourites, account age) beyond annotations. However, it does not disclose any limitations or edge cases, but given the simple read operation, this is sufficient.

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 a single sentence that efficiently conveys the tool's purpose and output. It is front-loaded with the action and resource, with no unnecessary words.

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?

For a single-parameter, read-only tool with no output schema, the description provides a clear list of return items. It is complete enough for an AI agent to understand what data to expect. Minor improvement could be to mention error cases (e.g., non-existent user), but not required.

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 already describes the 'username' parameter with its fallback behavior. The description does not add new information about the parameter. Since schema coverage is 100%, baseline score of 3 is appropriate.

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

Purpose5/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: 'View a user's AniList profile' and lists the specific data it returns (bio, stats, favourites, account age). It uses a specific verb and resource, making it easy to understand what the tool does.

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 compared to alternatives. It does not mention when not to use it or differentiate from sibling tools like anilist_details or anilist_list. Usage context is absent.

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