Skip to main content
Glama
DanWahlin

Marvel MCP

by DanWahlin

get_comic_by_id

Retrieve detailed information about a specific Marvel comic using its unique ID through the Marvel MCP server.

Instructions

Fetch a single Marvel comic by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comicIdYes

Implementation Reference

  • The handler function that parses the input arguments, fetches the comic data via HTTP request using the provided comicId, parses the response with ComicDataWrapperSchema, and returns it.
    handler: async (args: any) => {
        const argsParsed = GetComicByIdSchema.parse(args);
        const res = await httpRequest(`/comics/${argsParsed.comicId}`);
        return ComicDataWrapperSchema.parse(res);
    }
  • Zod schema defining the input parameters for the tool: a required numeric comicId.
    export const GetComicByIdSchema = z.object({
      comicId: z.number(),
    });
  • The tool registration exporting the get_comic_by_id tool object with description, input schema, and handler function.
    export const get_comic_by_id = {
        description: `Fetch a single Marvel comic by ID.`,
        schema: GetComicByIdSchema,
        handler: async (args: any) => {
            const argsParsed = GetComicByIdSchema.parse(args);
            const res = await httpRequest(`/comics/${argsParsed.comicId}`);
            return ComicDataWrapperSchema.parse(res);
        }
    };

Tool Definition Quality

Score is being calculated. Check back soon.

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

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