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'],
      },
    },
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. It mentions extracting text but fails to detail how it handles dynamic content (implied by the 'useBrowser' parameter), error conditions, rate limits, or output format. This leaves significant gaps in understanding the tool's behavior.

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 no wasted words, making it highly efficient and front-loaded. It immediately conveys the core function without unnecessary elaboration, earning a top score for conciseness.

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 of web scraping (dynamic content, potential errors) and the lack of annotations and output schema, the description is insufficient. It does not address behavioral aspects like handling JavaScript-rendered content or return values, leaving the agent with incomplete information for 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 input schema fully documents the parameters ('url' and 'useBrowser'). The description adds no additional meaning beyond what the schema provides, such as explaining when to set 'useBrowser' to true or the expected URL format, resulting in a baseline score.

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 action ('extract') and resource ('text content from a web page'), making the purpose immediately understandable. However, it does not explicitly differentiate from sibling tools like 'scrape_html' or 'extract_tables', which could perform similar but distinct operations, preventing a perfect score.

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, such as 'scrape_html' for raw HTML or 'extract_tables' for structured data. It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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