Skip to main content
Glama

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

NameRequiredDescriptionDefault
api_keyNoYour ReviewWebsite API key
debugNoEnable debug mode for detailed logging
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 the summary in words
modelNoAI model to use for summarization
systemPromptNoCustom system prompt to guide the AI
urlYesThe 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

  • 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); } }
  • 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'); } }

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