Skip to main content
Glama
code-alchemist01

Development Tools MCP Server

extract_text

Extract text content from web pages for development workflows, supporting both static and dynamic content extraction.

Instructions

Extract text content from a web page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to scrape
useBrowserNoUse browser for dynamic content

Implementation Reference

  • The extractText method in StaticScraper class, which executes the core logic for the 'extract_text' tool by scraping the HTML and returning the plain text content.
    async extractText(config: ScrapingConfig): Promise<string> {
      const data = await this.scrapeHTML(config);
      return data.text || '';
    }
  • Dispatch handler in handleWebScrapingTool function that handles the 'extract_text' tool invocation, choosing between static and dynamic scrapers based on config.
    case 'extract_text': {
      if (config.useBrowser) {
        const data = await dynamicScraper.scrapeDynamicContent(config);
        return data.text;
      } else {
        return await staticScraper.extractText(config);
      }
    }
  • Tool registration entry defining the name, description, and input schema for the 'extract_text' tool.
    {
      name: 'extract_text',
      description: 'Extract text content 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'],
      },
    },
  • Registration of the 'extract_text' tool within the webScrapingTools export array for MCP integration.
    {
      name: 'extract_text',
      description: 'Extract text content 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'],
      },
    },

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