Skip to main content
Glama

get_characters_for_comic

Retrieve Marvel characters associated with a specific comic by providing the comic ID. Ideal for developers and fans exploring character details in the Marvel MCP server.

Instructions

Fetch Marvel characters for a given comic

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comicIdYes
eventsNo
limitNo
modifiedSinceNo
nameNo
nameStartsWithNo
offsetNo
orderByNo
seriesNo
storiesNo

Implementation Reference

  • The handler function that parses input arguments using the schema, makes an HTTP request to the Marvel API endpoint for characters in a specific comic, and parses the response using CharacterDataWrapperSchema.
    handler: async (args: any) => { const { comicId, ...rest } = GetComicCharactersSchema.parse(args); const res = await httpRequest(`/comics/${comicId}/characters`, serializeQueryParams(rest)); return CharacterDataWrapperSchema.parse(res); }
  • Zod schema defining the input parameters for the get_characters_for_comic tool, extending GetComicByIdSchema with additional optional filters for characters.
    export const GetComicCharactersSchema = GetComicByIdSchema.extend({ name: z.string().optional(), nameStartsWith: z.string().optional(), modifiedSince: z.string().optional(), series: z.string().optional(), events: z.string().optional(), stories: z.string().optional(), orderBy: z.string().optional(), limit: z.number().min(1).max(100).optional(), offset: z.number().optional(), });
  • Exports the tool definition object including description, input schema, and handler function, likely used for MCP tool registration.
    export const get_characters_for_comic = { description: `Fetch Marvel characters for a given comic.`, schema: GetComicCharactersSchema, handler: async (args: any) => { const { comicId, ...rest } = GetComicCharactersSchema.parse(args); const res = await httpRequest(`/comics/${comicId}/characters`, serializeQueryParams(rest)); return CharacterDataWrapperSchema.parse(res); } };

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/DanWahlin/marvel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server