Skip to main content
Glama

extract_data_multiple

Transform multiple web page URLs into structured JSON data using AI with the ReviewWebsite API. Define instructions, specify JSON templates, and extract precise data efficiently.

Instructions

Extract structured data (JSON) from 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
instructionsYesInstructions for the AI to extract data from the websites
jsonTemplateYesJSON schema template for the extracted data output
modelNoAI model to use for extraction
systemPromptNoSystem prompt for the AI
urlsYesList of URLs to extract data from

Implementation Reference

  • MCP tool handler that processes the tool arguments, maps them to controller parameters, calls the controller, and formats the MCP response.
    async function handleExtractDataMultiple(
    	args: ExtractDataMultipleToolArgsType,
    ) {
    	const methodLogger = Logger.forContext(
    		'tools/reviewwebsite.tool.ts',
    		'handleExtractDataMultiple',
    	);
    	methodLogger.debug(`Extracting data from multiple URLs with options:`, {
    		...args,
    		api_key: args.api_key ? '[REDACTED]' : undefined,
    	});
    
    	try {
    		const result = await reviewWebsiteController.extractDataMultiple(
    			args.urls,
    			{
    				instructions: args.instructions,
    				systemPrompt: args.systemPrompt,
    				jsonTemplate: args.jsonTemplate,
    				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 extracting data from multiple URLs`, error);
    		return formatErrorForMcpTool(error);
    	}
    }
  • Zod schema defining the input arguments for the 'extract_data_multiple' tool, including URLs, instructions, JSON template, and options.
    export const ExtractDataMultipleToolArgs = z.object({
    	urls: z.array(z.string()).describe('List of URLs to extract data from'),
    	instructions: z
    		.string()
    		.describe('Instructions for the AI to extract data from the websites'),
    	jsonTemplate: z
    		.string()
    		.describe('JSON schema template for the extracted data output'),
    	systemPrompt: z.string().optional().describe('System prompt for the AI'),
    	model: z.string().optional().describe('AI model to use for extraction'),
    	delayAfterLoad: z
    		.number()
    		.optional()
    		.describe('Optional delay after page load in milliseconds'),
    	debug: z.boolean().optional().describe('Whether to enable debug mode'),
    	api_key: z.string().optional().describe('Your ReviewWebsite API key'),
    });
  • Registration of the 'extract_data_multiple' tool on the MCP server, specifying name, description, input schema, and handler function.
    	'extract_data_multiple',
    	`Extract structured data (JSON) from multiple web page URLs using AI via ReviewWeb.site API.`,
    	ExtractDataMultipleToolArgs.shape,
    	handleExtractDataMultiple,
    );
  • Core service function that performs the HTTP POST request to the ReviewWeb.site API endpoint '/extract/urls' to extract data from multiple URLs.
    async function extractDataMultiple(
    	urls: string[],
    	options: ExtractDataOptions,
    	apiKey?: string,
    ): Promise<any> {
    	const methodLogger = Logger.forContext(
    		'services/vendor.reviewwebsite.service.ts',
    		'extractDataMultiple',
    	);
    
    	try {
    		methodLogger.debug('Extracting data from multiple URLs', {
    			urls,
    			options,
    		});
    
    		const response = await axios.post(
    			`${API_BASE}/extract/urls`,
    			{
    				urls,
    				options,
    			},
    			{
    				headers: getHeaders(apiKey),
    			},
    		);
    
    		methodLogger.debug('Successfully extracted data from multiple URLs');
    		return response.data;
    	} catch (error) {
    		return handleApiError(error, 'extractDataMultiple');
    	}
    }
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. While it mentions AI extraction via a specific API, it doesn't cover important aspects like rate limits, authentication requirements (implied by 'api_key' parameter but not stated), error handling, or what happens with invalid URLs. For a tool with 8 parameters and no annotation coverage, this is a significant gap in behavioral context.

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

Conciseness5/5

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

The description is a single, efficient sentence that clearly states the tool's core functionality. It's appropriately sized for its purpose with zero wasted words. The structure is front-loaded with the essential information: what it does (extract structured data), from what (multiple web page URLs), and how (AI via specific API).

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?

For a complex tool with 8 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain the relationship between parameters (e.g., how 'instructions' and 'jsonTemplate' work together), doesn't describe the output format beyond 'JSON', and provides no behavioral context. The 100% schema coverage helps with parameters, but other critical aspects are missing.

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?

Schema description coverage is 100%, so the schema already documents all 8 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. It mentions 'structured data (JSON)' which relates to the 'jsonTemplate' parameter, but this is already covered in the schema. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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: 'Extract structured data (JSON) from multiple web page URLs using AI via ReviewWeb.site API.' It specifies the verb (extract), resource (structured data from web pages), and method (AI via specific API). However, it doesn't explicitly differentiate from sibling tools like 'extract_data' (single vs. multiple URLs) or 'scrape_url' (AI extraction vs. scraping).

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. With siblings like 'extract_data' (likely for single URLs), 'scrape_url' (non-AI scraping), and 'summarize_multiple_urls' (summarization vs. data extraction), there's no indication of which tool to choose for specific scenarios. The description only states what it does, not when it's appropriate.

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