Skip to content

Adding function to fetch website#16

Merged
ribomo merged 1 commit into
mainfrom
fetch_website
Jul 2, 2026
Merged

Adding function to fetch website#16
ribomo merged 1 commit into
mainfrom
fetch_website

Conversation

@ribomo

@ribomo ribomo commented Jul 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new Exa-backed web_fetch tool (alongside the existing web_search) to allow fetching bounded Markdown content for a single approved HTTP/HTTPS URL, while refactoring Exa MCP client code into a shared provider module.

Changes:

  • Introduces WebFetchTool (web_fetch) with URL validation + explicit approval gating, and registers it by default when network tools are enabled.
  • Refactors Exa MCP client logic into a shared _ExaMcpClient, adding ExaFetchClient alongside ExaSearchClient.
  • Updates tests, registry behavior assertions, and documentation to cover both web tools and the network opt-out behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_web_search.py Adds coverage for ExaFetchClient and WebFetchTool, and updates imports for the new module layout.
tests/test_tools.py Verifies web_fetch is included in tool definitions and toggled by enable_network.
tests/test_agent.py Verifies agents expose/disable both web tools via the network toggle.
README.md Documents “Web access” (search + fetch) and the shared opt-out env var.
plain_agent/tools/web/search.py Updates search tool to use the new shared Exa provider module.
plain_agent/tools/web/providers/exa.py Refactors Exa MCP request/response handling and adds ExaFetchClient.
plain_agent/tools/web/providers/init.py Exposes provider clients/errors for web tools.
plain_agent/tools/web/fetch.py Implements the new model-facing web_fetch tool, including URL validation and approval gating.
plain_agent/tools/web/init.py Exports the approved web tools (WebSearchTool, WebFetchTool).
plain_agent/tools/web_search/init.py Removes the old web_search package export surface after the module move.
plain_agent/tools/registry.py Registers both web_search and web_fetch when network tools are enabled.
.env.example Updates the network-tools comment to mention both search and fetch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ribomo ribomo merged commit 742182b into main Jul 2, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants