summarize_website
Extract and condense website content into concise summaries using AI. Customize output format, length, and processing parameters for efficient web information review.
Instructions
Summarize a website (and its internal links) using AI via ReviewWeb.site API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | Your ReviewWebsite API key | |
| debug | No | Enable debug mode for detailed logging | |
| delayAfterLoad | No | Optional delay after page load in milliseconds | |
| format | No | Format of the summary (bullet points or paragraph) | |
| instructions | No | Custom instructions for the AI on how to summarize the content | |
| maxLength | No | Maximum length of the summary in words | |
| maxLinks | No | Maximum number of pages to process | |
| model | No | AI model to use for summarization | |
| systemPrompt | No | Custom system prompt to guide the AI | |
| url | Yes | The main URL of the website to summarize |
Implementation Reference
- src/tools/reviewwebsite.tool.ts:364-404 (handler)The MCP tool handler function that implements the core logic for the 'summarize_website' tool. It processes arguments, calls the ReviewWebsite controller's summarizeWebsite method, formats the response for MCP, and handles errors.async function handleSummarizeWebsite(args: SummarizeWebsiteToolArgsType) { const methodLogger = Logger.forContext( 'tools/reviewwebsite.tool.ts', 'handleSummarizeWebsite', ); methodLogger.debug(`Summarizing website with options:`, { ...args, api_key: args.api_key ? '[REDACTED]' : undefined, }); try { const result = await reviewWebsiteController.summarizeWebsite( args.url, { 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 website`, error); return formatErrorForMcpTool(error); } }
- src/tools/reviewwebsite.tool.ts:767-772 (registration)The registration of the 'summarize_website' tool with the MCP server, specifying name, description, input schema, and handler function.server.tool( 'summarize_website', `Summarize a website (and its internal links) using AI via ReviewWeb.site API.`, SummarizeWebsiteToolArgs.shape, handleSummarizeWebsite, );
- Zod schema defining the input arguments for the 'summarize_website' tool, including URL, instructions, model options, limits, and API key.export const SummarizeWebsiteToolArgs = z.object({ url: z.string().describe('The main URL of the website 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 pages to process'), maxLength: z .number() .optional() .describe('Maximum length of the summary in words'), format: z .enum(['bullet', 'paragraph']) .optional() .describe('Format of the summary (bullet points or paragraph)'), debug: z .boolean() .optional() .describe('Enable debug mode for detailed logging'), api_key: z.string().optional().describe('Your ReviewWebsite API key'), });