Skip to main content
Glama

search_manga

Search for manga using query terms and filters like genre, tag, format, or publication date. Access results sorted by criteria such as popularity, score, or release date.

Instructions

Search for manga with query term and filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNoResults per page (max 25)
filterNoFilter object for searching manga. You MUST NOT include "{ "type": "MANGA" }" in the filter object. As it is already included in the API call. When no sorting method or any filter is specified, you SHOULD use the site default: "{ "sort": ["SEARCH_MATCH"] }". Otherwise, request is likely to fail or return no results.
pageNoPage number for results
termNoQuery term for finding manga (leave it as undefined when no query term specified.) Query term is used for searching with specific word or title in mind. You SHOULD not include things that can be found in the filter object, such as genre or tag. Those things should be included in the filter object instead. To check whether a user requested term should be considered as a query term or a filter term. It is recommended to use tools like 'get_genres' and 'get_media_tags' first.

Implementation Reference

  • Handler function that executes the search_manga tool by calling anilist.searchEntry.manga with provided term, filter, page, and amount parameters, returning JSON-stringified results or an error message.
    async ({ term, filter, page, amount }) => { try { const results = await anilist.searchEntry.manga( term, filter, 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 search_manga: optional term (string), filter (MediaFilterTypesSchema), page (number, default 1), amount (number, default 5). Includes detailed descriptions.
    { term: z .string() .optional() .describe( `Query term for finding manga (leave it as undefined when no query term specified.) Query term is used for searching with specific word or title in mind. You SHOULD not include things that can be found in the filter object, such as genre or tag. Those things should be included in the filter object instead. To check whether a user requested term should be considered as a query term or a filter term. It is recommended to use tools like 'get_genres' and 'get_media_tags' first.`, ), filter: MediaFilterTypesSchema.optional().describe( `Filter object for searching manga. You MUST NOT include "{ "type": "MANGA" }" in the filter object. As it is already included in the API call. When no sorting method or any filter is specified, you SHOULD use the site default: "{ "sort": ["SEARCH_MATCH"] }". Otherwise, request is likely to fail or return no results.`, ), 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_manga tool via server.tool(), specifying name, description, input schema, hints (title, readOnlyHint, openWorldHint), and handler function within the registerSearchTools function.
    server.tool( "search_manga", "Search for manga with query term and filters", { term: z .string() .optional() .describe( `Query term for finding manga (leave it as undefined when no query term specified.) Query term is used for searching with specific word or title in mind. You SHOULD not include things that can be found in the filter object, such as genre or tag. Those things should be included in the filter object instead. To check whether a user requested term should be considered as a query term or a filter term. It is recommended to use tools like 'get_genres' and 'get_media_tags' first.`, ), filter: MediaFilterTypesSchema.optional().describe( `Filter object for searching manga. You MUST NOT include "{ "type": "MANGA" }" in the filter object. As it is already included in the API call. When no sorting method or any filter is specified, you SHOULD use the site default: "{ "sort": ["SEARCH_MATCH"] }". Otherwise, request is likely to fail or return no results.`, ), 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 Manga Search", readOnlyHint: true, openWorldHint: true, }, async ({ term, filter, page, amount }) => { try { const results = await anilist.searchEntry.manga( term, filter, 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