Skip to main content
Glama

summarize_multiple_urls

Generate concise summaries of multiple web page URLs with AI. Input URLs and customize summarization instructions, format, and length for quick insights.

Instructions

Summarize multiple web page URLs using AI via ReviewWeb.site API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoYour ReviewWebsite API key
debugNoWhether to enable debug mode
delayAfterLoadNoOptional delay after page load in milliseconds
formatNoFormat of the summary (bullet points or paragraph)
instructionsNoCustom instructions for the AI on how to summarize the content
maxLengthNoMaximum length of each summary in words
maxLinksNoMaximum number of URLs to process
modelNoAI model to use for summarization
systemPromptNoCustom system prompt to guide the AI
urlsYesList of URLs to summarize

Implementation Reference

  • Registers the MCP tool named 'summarize_multiple_urls' with the server, specifying the description, input schema from types, and the handler function.
    server.tool( 'summarize_multiple_urls', `Summarize multiple web page URLs using AI via ReviewWeb.site API.`, SummarizeMultipleUrlsToolArgs.shape, handleSummarizeMultipleUrls, );
  • The main handler function for the 'summarize_multiple_urls' MCP tool. It logs the call, delegates to the ReviewWebsite controller's summarizeMultipleUrls method, formats the successful response as MCP content block, or returns formatted error.
    /** * @function handleSummarizeMultipleUrls * @description MCP Tool handler to summarize multiple URLs using AI * @param {SummarizeMultipleUrlsToolArgsType} args - Arguments provided to the tool * @returns {Promise<{ content: Array<{ type: 'text', text: string }> }>} Formatted response for the MCP */ async function handleSummarizeMultipleUrls( args: SummarizeMultipleUrlsToolArgsType, ) { const methodLogger = Logger.forContext( 'tools/reviewwebsite.tool.ts', 'handleSummarizeMultipleUrls', ); methodLogger.debug(`Summarizing multiple URLs with options:`, { ...args, api_key: args.api_key ? '[REDACTED]' : undefined, }); try { const result = await reviewWebsiteController.summarizeMultipleUrls( args.urls, { instructions: args.instructions, systemPrompt: args.systemPrompt, model: args.model, delayAfterLoad: args.delayAfterLoad, maxLinks: args.maxLinks, maxLength: args.maxLength, format: args.format, debug: args.debug, }, { api_key: args.api_key, }, ); return { content: [ { type: 'text' as const, text: result.content, }, ], }; } catch (error) { methodLogger.error(`Error summarizing multiple URLs`, error); return formatErrorForMcpTool(error); } }
  • Zod schema defining the input arguments for the summarize_multiple_urls tool, including urls array and various optional summarization options.
    /** * Schema for ReviewWebsite summarize multiple URLs tool arguments */ export const SummarizeMultipleUrlsToolArgs = z.object({ urls: z.array(z.string()).describe('List of URLs to summarize'), instructions: z .string() .optional() .describe( 'Custom instructions for the AI on how to summarize the content', ), systemPrompt: z .string() .optional() .describe('Custom system prompt to guide the AI'), model: z.string().optional().describe('AI model to use for summarization'), delayAfterLoad: z .number() .optional() .describe('Optional delay after page load in milliseconds'), maxLinks: z .number() .optional() .describe('Maximum number of URLs to process'), maxLength: z .number() .optional() .describe('Maximum length of each summary in words'), format: z .enum(['bullet', 'paragraph']) .optional() .describe('Format of the summary (bullet points or paragraph)'), debug: z.boolean().optional().describe('Whether to enable debug mode'), api_key: z.string().optional().describe('Your ReviewWebsite API key'), });
  • Controller handler that wraps the service call to summarizeMultipleUrls, handles API key, logs, formats response as JSON string, and error handling.
    /** * @function summarizeMultipleUrls * @description Summarize multiple URLs using AI * @memberof ReviewWebsiteController * @param {string[]} urls - URLs to summarize * @param {SummarizeOptions} summarizeOptions - Summarization options * @param {ReviewWebsiteOptions} options - Options including API key * @returns {Promise<ControllerResponse>} A promise that resolves to the standard controller response * @throws {McpError} Throws an McpError if the service call fails or returns an error */ async function summarizeMultipleUrls( urls: string[], summarizeOptions?: SummarizeOptions, options: ReviewWebsiteOptions = {}, ): Promise<ControllerResponse> { const methodLogger = Logger.forContext( 'controllers/reviewwebsite.controller.ts', 'summarizeMultipleUrls', ); methodLogger.debug('Summarizing multiple URLs', { urls, summarizeOptions }); try { const apiKey = getApiKey(options); const result = await reviewWebsiteService.summarizeMultipleUrls( urls, summarizeOptions, apiKey, ); return { content: JSON.stringify(result, null, 2), }; } catch (error) { return handleControllerError(error, { entityType: 'Summaries', operation: 'creating', source: 'controllers/reviewwebsite.controller.ts@summarizeMultipleUrls', additionalInfo: { urlCount: urls.length }, }); } }

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/mrgoonie/reviewwebsite-mcp-server'

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