fetch_url
Get the raw text content of any URL, truncated to a configured limit. Use this tool to extract and read web page text for research or data processing.
Instructions
Fetch the raw text of a URL, truncated to the configured limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/friday_mcp_server/tools/web.py:57-63 (handler)The actual handler for the 'fetch_url' tool. Uses httpx to fetch a URL asynchronously and truncates the response text to the configured max_fetch_chars limit.
@mcp.tool() async def fetch_url(url: str) -> str: """Fetch the raw text of a URL, truncated to the configured limit.""" async with httpx.AsyncClient(follow_redirects=True, timeout=15.0) as client: response = await client.get(url) response.raise_for_status() return response.text[: config.max_fetch_chars] - src/friday_mcp_server/tools/__init__.py:6-11 (registration)Registration entry point; calls web.register(mcp, config=config) which defines the fetch_url tool via the @mcp.tool() decorator.
def register_all_tools(mcp, *, config, skill_store) -> None: system.register(mcp, config=config) utils.register(mcp) web.register(mcp, config=config) workspace.register(mcp, config=config) skills.register(mcp, skill_store=skill_store) - Schema/config definition for the max_fetch_chars field that controls the truncation limit used in fetch_url.
max_fetch_chars: int