Skip to main content
Glama

URL Text Fetcher MCP Server

fetch_page_links

Extract all links from a web page by submitting its URL. Ideal for web scraping and analyzing page content efficiently.

Instructions

Return a list of all links on the page.

Input Schema

NameRequiredDescriptionDefault
urlYes

Input Schema (JSON Schema)

{ "properties": { "url": { "title": "Url", "type": "string" } }, "required": [ "url" ], "title": "fetch_page_linksArguments", "type": "object" }

Implementation Reference

  • The handler function that fetches the HTML content of the given URL using requests, parses it with BeautifulSoup, and returns a list of all href links from anchor tags.
    def fetch_page_links(url: str) -> List[str]: """Return a list of all links on the page.""" resp = requests.get(url, timeout=10) resp.raise_for_status() soup = BeautifulSoup(resp.text, "html.parser") return [a['href'] for a in soup.find_all('a', href=True)]
  • The @mcp.tool() decorator registers the fetch_page_links function as an MCP tool in the FastMCP server.
    @mcp.tool()

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/alexandru2882/url-text-fetcher-mcp'

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