Skip to main content
Glama
code-alchemist01

Development Tools MCP Server

extract_images

Extract all image URLs from web pages to collect visual assets for development projects. Handles both static and dynamic content.

Instructions

Extract all image URLs from a web page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to scrape
useBrowserNoUse browser for dynamic content

Implementation Reference

  • Registration of the 'extract_images' tool including its name, description, and input schema in the webScrapingTools array.
    {
      name: 'extract_images',
      description: 'Extract all image URLs from a web page',
      inputSchema: {
        type: 'object',
        properties: {
          url: {
            type: 'string',
            description: 'URL to scrape',
          },
          useBrowser: {
            type: 'boolean',
            description: 'Use browser for dynamic content',
            default: false,
          },
        },
        required: ['url'],
      },
    },
  • Handler dispatcher in handleWebScrapingTool for 'extract_images', delegating to dynamic or static scraper based on useBrowser flag.
    case 'extract_images': {
      if (config.useBrowser) {
        const data = await dynamicScraper.scrapeDynamicContent(config);
        return data.images;
      } else {
        return await staticScraper.extractImages(config);
      }
    }
  • StaticScraper.extractImages handler that invokes scrapeHTML and returns the extracted images.
    /**
     * Extract images from HTML
     */
    async extractImages(config: ScrapingConfig): Promise<string[]> {
      const data = await this.scrapeHTML(config);
      return data.images || [];
    }
  • Core logic for extracting image URLs using Cheerio within the scrapeHTML method.
    const images: string[] = [];
    $('img[src]').each((_, element) => {
      const src = $(element).attr('src');
      if (src) {
        try {
          const url = new URL(src, config.url);
          images.push(url.href);
        } catch {
          // Invalid URL, skip
        }
      }
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic function without details on permissions, rate limits, output format, or error handling. It fails to address how it handles dynamic content beyond the schema's 'useBrowser' parameter, leaving gaps in operational understanding.

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, direct sentence with zero wasted words, front-loading the core purpose ('Extract all image URLs from a web page'). It is appropriately sized for the tool's simplicity and efficiently communicates its intent without unnecessary elaboration.

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 lack of annotations and output schema, the description is incomplete for a tool with parameters and potential behavioral complexity. It doesn't explain return values, error cases, or how it interacts with dynamic content, leaving significant gaps in contextual understanding despite the concise purpose statement.

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 fully documents the 'url' and 'useBrowser' parameters. The description adds no additional meaning beyond implying image extraction from a web page, which aligns with the schema but doesn't enhance parameter understanding. This meets the baseline for high schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('extract') and resource ('all image URLs from a web page'), distinguishing it from siblings like extract_links, extract_text, or extract_tables by focusing exclusively on images. It uses precise language that leaves no ambiguity about what the tool does.

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 like extract_links or scrape_html, nor does it mention prerequisites such as needing a valid URL or handling dynamic content. It lacks explicit context for selection among sibling tools.

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

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/code-alchemist01/development-tools-mcp-Server'

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