Skip to main content
Glama

convert_multiple_to_markdown

Transform multiple web page URLs into Markdown format using AI to create LLM-friendly content. Streamline content extraction and conversion for web pages via ReviewWebsite API.

Instructions

Convert multiple URLs to Markdown using AI via ReviewWeb.site API. Turn multiple web pages into LLM-friendly content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNoYour ReviewWebsite API key
debugNoWhether to enable debug mode
delayAfterLoadNoOptional delay after page load in milliseconds
maxLinksNoMaximum number of URLs to process
modelNoAI model to use for conversion
urlsYesList of URLs to convert to Markdown

Implementation Reference

  • The MCP tool handler function that executes the tool logic: extracts arguments, calls the controller method, formats the response for MCP protocol, and handles errors.
    async function handleConvertMultipleToMarkdown(
    	args: ConvertMultipleToMarkdownToolArgsType,
    ) {
    	const methodLogger = Logger.forContext(
    		'tools/reviewwebsite.tool.ts',
    		'handleConvertMultipleToMarkdown',
    	);
    	methodLogger.debug(`Converting multiple URLs to Markdown with options:`, {
    		...args,
    		api_key: args.api_key ? '[REDACTED]' : undefined,
    	});
    
    	try {
    		const result = await reviewWebsiteController.convertMultipleToMarkdown(
    			args.urls,
    			{
    				model: args.model,
    				delayAfterLoad: args.delayAfterLoad,
    				debug: args.debug,
    			},
    			{
    				api_key: args.api_key,
    			},
    		);
    
    		return {
    			content: [
    				{
    					type: 'text' as const,
    					text: result.content,
    				},
    			],
    		};
    	} catch (error) {
    		methodLogger.error(`Error converting multiple URLs to Markdown`, error);
    		return formatErrorForMcpTool(error);
    	}
    }
  • Zod schema defining the input arguments for the convert_multiple_to_markdown tool.
    export const ConvertMultipleToMarkdownToolArgs = z.object({
    	urls: z.array(z.string()).describe('List of URLs to convert to Markdown'),
    	model: z.string().optional().describe('AI model to use for conversion'),
    	delayAfterLoad: z
    		.number()
    		.optional()
    		.describe('Optional delay after page load in milliseconds'),
    	maxLinks: z
    		.number()
    		.optional()
    		.describe('Maximum number of URLs to process'),
    	debug: z.boolean().optional().describe('Whether to enable debug mode'),
    	api_key: z.string().optional().describe('Your ReviewWebsite API key'),
    });
  • Registration of the MCP tool with the server, including name, description, input schema, and handler function.
    server.tool(
    	'convert_multiple_to_markdown',
    	`Convert multiple URLs to Markdown using AI via ReviewWeb.site API.
    	Turn multiple web pages into LLM-friendly content.`,
    	ConvertMultipleToMarkdownToolArgs.shape,
    	handleConvertMultipleToMarkdown,
    );
  • Service function that makes the actual HTTP API call to ReviewWeb.site to convert multiple URLs to Markdown.
    async function convertMultipleToMarkdown(
    	urls: string[],
    	options?: ConvertToMarkdownOptions,
    	apiKey?: string,
    ): Promise<any> {
    	const methodLogger = Logger.forContext(
    		'services/vendor.reviewwebsite.service.ts',
    		'convertMultipleToMarkdown',
    	);
    
    	try {
    		methodLogger.debug('Converting multiple URLs to Markdown', {
    			urls,
    			options,
    		});
    
    		const response = await axios.post(
    			`${API_BASE}/convert/markdown/urls`,
    			{
    				urls,
    				options,
    			},
    			{
    				headers: getHeaders(apiKey),
    			},
    		);
    
    		methodLogger.debug('Successfully converted multiple URLs to Markdown');
    		return response.data;
    	} catch (error) {
    		return handleApiError(error, 'convertMultipleToMarkdown');
    	}
    }
  • Controller function that orchestrates the service call, handles API key, and formats the response.
    async function convertMultipleToMarkdown(
    	urls: string[],
    	convertOptions?: ConvertToMarkdownOptions,
    	options: ReviewWebsiteOptions = {},
    ): Promise<ControllerResponse> {
    	const methodLogger = Logger.forContext(
    		'controllers/reviewwebsite.controller.ts',
    		'convertMultipleToMarkdown',
    	);
    
    	methodLogger.debug('Converting multiple URLs to Markdown', {
    		urls,
    		convertOptions,
    	});
    
    	try {
    		const apiKey = getApiKey(options);
    		const result = await reviewWebsiteService.convertMultipleToMarkdown(
    			urls,
    			convertOptions,
    			apiKey,
    		);
    
    		return {
    			content: JSON.stringify(result, null, 2),
    		};
    	} catch (error) {
    		return handleControllerError(error, {
    			entityType: 'Markdown',
    			operation: 'converting multiple',
    			source: 'controllers/reviewwebsite.controller.ts@convertMultipleToMarkdown',
    			additionalInfo: { urlCount: urls.length },
    		});
    	}
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions using AI via an external API, which hints at potential rate limits, costs, or processing time, but doesn't specify these. It also doesn't describe what the output looks like (e.g., format, structure), error handling, or prerequisites like API key usage beyond the schema. For a tool with no annotations and complex behavior (AI processing), this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the core purpose in the first sentence. Both sentences earn their place by specifying the method and target outcome. However, it could be slightly more structured by explicitly mentioning key parameters like 'urls' or 'model' to enhance clarity without adding waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (AI processing, multiple URLs, external API), lack of annotations, and no output schema, the description is incomplete. It doesn't explain the return format, error cases, performance expectations, or how it differs from sibling tools. For a tool with these characteristics, more detail is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all six parameters with descriptions. The description adds no additional meaning about parameters beyond implying 'urls' are processed in bulk and 'model' is for AI conversion. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, as the description provides minimal extra context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: converting multiple URLs to Markdown using AI via a specific API. It specifies the verb ('convert'), resource ('multiple URLs'), and method ('using AI via ReviewWeb.site API'), which distinguishes it from simple scraping tools. However, it doesn't explicitly differentiate from sibling tools like 'convert_to_markdown' or 'summarize_multiple_urls', which likely have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions 'Turn multiple web pages into LLM-friendly content,' which implies a use case but doesn't specify when to choose this over siblings like 'convert_to_markdown' (single URL) or 'summarize_multiple_urls' (summarization vs. conversion). There are no explicit when/when-not instructions or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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