summarize_url
Summarize web page content from any URL into concise bullet points or paragraphs using AI. Customize output length, format, and instructions for tailored summaries.
Instructions
Summarize a web page URL using AI via ReviewWeb.site API.
Input 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 | |
| model | No | AI model to use for summarization | |
| systemPrompt | No | Custom system prompt to guide the AI | |
| url | Yes | The URL to summarize |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"api_key": {
"description": "Your ReviewWebsite API key",
"type": "string"
},
"debug": {
"description": "Enable debug mode for detailed logging",
"type": "boolean"
},
"delayAfterLoad": {
"description": "Optional delay after page load in milliseconds",
"type": "number"
},
"format": {
"description": "Format of the summary (bullet points or paragraph)",
"enum": [
"bullet",
"paragraph"
],
"type": "string"
},
"instructions": {
"description": "Custom instructions for the AI on how to summarize the content",
"type": "string"
},
"maxLength": {
"description": "Maximum length of the summary in words",
"type": "number"
},
"model": {
"description": "AI model to use for summarization",
"type": "string"
},
"systemPrompt": {
"description": "Custom system prompt to guide the AI",
"type": "string"
},
"url": {
"description": "The URL to summarize",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
}
Implementation Reference
- src/tools/reviewwebsite.tool.ts:317-356 (handler)MCP tool handler that processes arguments for summarize_url, calls reviewWebsiteController.summarizeUrl, and returns formatted MCP response.async function handleSummarizeUrl(args: SummarizeUrlToolArgsType) { const methodLogger = Logger.forContext( 'tools/reviewwebsite.tool.ts', 'handleSummarizeUrl', ); methodLogger.debug(`Summarizing URL with options:`, { ...args, api_key: args.api_key ? '[REDACTED]' : undefined, }); try { const result = await reviewWebsiteController.summarizeUrl( args.url, { instructions: args.instructions, systemPrompt: args.systemPrompt, model: args.model, delayAfterLoad: args.delayAfterLoad, 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 URL`, error); return formatErrorForMcpTool(error); } }
- src/tools/reviewwebsite.tool.ts:761-765 (registration)Registration of the summarize_url tool with the MCP server, specifying name, description, input schema, and handler function.'summarize_url', `Summarize a web page URL using AI via ReviewWeb.site API.`, SummarizeUrlToolArgs.shape, handleSummarizeUrl, );
- Zod schema defining the input parameters for the summarize_url tool.export const SummarizeUrlToolArgs = z.object({ url: z.string().describe('The URL 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'), 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'), });
- Service helper function that performs the actual API request to ReviewWeb.site's /summarize/url endpoint.async function summarizeUrl( url: string, options?: SummarizeOptions, apiKey?: string, ): Promise<any> { const methodLogger = Logger.forContext( 'services/vendor.reviewwebsite.service.ts', 'summarizeUrl', ); try { methodLogger.debug('Summarizing URL', { url, options }); const response = await axios.post( `${API_BASE}/summarize/url`, { url, options, }, { headers: getHeaders(apiKey), }, ); methodLogger.debug('Successfully summarized URL'); return response.data; } catch (error) { return handleApiError(error, 'summarizeUrl'); } }