Skip to main content
Glama

search_studio

Find studios matching a specific search term using an AniList-powered tool. Enter a query term, page number, and results per page to retrieve curated studio data efficiently.

Instructions

Search for studios based on a query term

Input Schema

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

Implementation Reference

  • Handler function that executes the search_studio tool by calling anilist.searchEntry.studio with the provided term, page, and amount parameters, returns formatted JSON results or an error message.
    async ({ term, page, amount }) => {
      try {
        const results = await anilist.searchEntry.studio(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,
        };
      }
    },
  • Input schema using Zod validators for the search_studio tool parameters: term (required string), page (optional number, default 1), amount (optional number, default 5).
    {
      term: z.string().describe("Search term for finding studios"),
      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_studio tool using server.tool(), specifying name, description, input schema, metadata, and handler function.
    server.tool(
      "search_studio",
      "Search for studios based on a query term",
      {
        term: z.string().describe("Search term for finding studios"),
        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 Studio Search",
        readOnlyHint: true,
        openWorldHint: true,
      },
      async ({ term, page, amount }) => {
        try {
          const results = await anilist.searchEntry.studio(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