Skip to main content
Glama

search_character

Find characters on AniList by entering a search term, specifying page number, and results per page (max 25).

Instructions

Search for characters based on a query term

Input Schema

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

Implementation Reference

  • The handler function for the 'search_character' tool. It performs the search using the AniList client's searchEntry.character method and returns the results as JSON or an error message.
    async ({ term, page, amount }) => {
      try {
        const results = await anilist.searchEntry.character(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_character' tool: term (required string), page and amount (optional numbers with defaults).
    {
      term: z.string().describe("Search term for finding characters"),
      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_character' tool via server.tool(), including name, description, input schema, metadata hints, and handler function.
    server.tool(
      "search_character",
      "Search for characters based on a query term",
      {
        term: z.string().describe("Search term for finding characters"),
        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 Character Search",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async ({ term, page, amount }) => {
        try {
          const results = await anilist.searchEntry.character(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,
          };
        }
      },
    );
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 states the action ('Search') but doesn't cover key traits like pagination behavior (implied by parameters but not described), rate limits, authentication needs, or what the search returns (e.g., format, fields). This leaves significant gaps for a tool with 3 parameters and no output schema.

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, efficient sentence with zero waste—it directly states the tool's function without redundancy or fluff. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 (search functionality with 3 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't explain behavioral aspects like result format, pagination, or error handling, leaving the agent with insufficient context to use the tool effectively beyond basic invocation.

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 fully documents parameters (term, amount, page). The description adds no additional meaning beyond implying a search term is used, which is already clear from the schema. Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 a specific verb ('Search') and resource ('characters'), and includes the search mechanism ('based on a query term'). It distinguishes from non-search siblings but doesn't explicitly differentiate from other search tools like search_anime or search_manga, which is why it's not a 5.

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 versus alternatives like get_character (for specific character lookup) or other search tools (e.g., search_anime). It lacks context about use cases, exclusions, or prerequisites, offering only basic functional information.

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