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
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Results per page (max 25) | |
| page | No | Page number for results | |
| term | Yes | Search term for finding studios |
Implementation Reference
- tools/search.ts:302-319 (handler)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, }; } },
- tools/search.ts:284-296 (schema)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)"), },
- tools/search.ts:281-320 (registration)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, }; } }, );