Skip to main content
Glama

search_user

Find users on AniList by entering a search term, specifying results per page, and navigating through paginated results using the MCP server.

Instructions

Search for users on AniList

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoResults per page (max 25)
pageNoPage number for results
termYesSearch term for finding users

Implementation Reference

  • Handler function for the 'search_user' tool that performs a user search on AniList via anilist.searchEntry.user and returns JSON results or error.
    async ({ term, page, amount }) => { try { const results = await anilist.searchEntry.user(term, page, amount); return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } },
  • Zod input schema defining parameters for the 'search_user' tool: term (required string), page and amount (optional numbers with defaults).
    { term: z.string().describe("Search term for finding users"), page: z .number() .optional() .default(1) .describe("Page number for results"), amount: z .number() .optional() .default(5) .describe("Results per page (max 25)"), },
  • Registration of the 'search_user' tool on the MCP server, including name, description, input schema, metadata, and handler.
    server.tool( "search_user", "Search for users on AniList", { term: z.string().describe("Search term for finding users"), page: z .number() .optional() .default(1) .describe("Page number for results"), amount: z .number() .optional() .default(5) .describe("Results per page (max 25)"), }, { title: "AniList User Search", readOnlyHint: true, openWorldHint: true, }, async ({ term, page, amount }) => { try { const results = await anilist.searchEntry.user(term, page, amount); return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; } catch (error: any) { return { content: [{ type: "text", text: `Error: ${error.message}` }], isError: true, }; } }, );

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