NAME
Langertha::Raider::WebTools - MCP::Server factory with web search and fetch tools (Net::Async::WebSearch + Net::Async::HTTP)
VERSION
version 0.503
DESCRIPTION
The web tools of raider: an MCP::Server with web_search and web_fetch, run on the caller's IO::Async::Loop.
build_web_tools_server
my $server = Langertha::Raider::WebTools::build_web_tools_server(
loop => $loop, # required
max_fetch_bytes => 2_000_000,
);
Returns an MCP::Server instance with two tools:
web_search(query, [limit])-- multi-provider search via Net::Async::WebSearch. DuckDuckGo is always enabled (keyless). Brave, Serper and Google are auto-added whenBRAVE_API_KEY,SERPER_API_KEY, or bothGOOGLE_API_KEY+GOOGLE_CSE_IDare set in the environment.web_fetch(url, [as_html])-- fetch a URL via Net::Async::HTTP. Returns the status, the content type and the body, cut atmax_fetch_bytes(default 2_000_000). HTML is flattened to readable text unlessas_htmlis true.limitofweb_searchdefaults to 8.
Both tools return a tool error, and send nothing, when a module Net::Async::HTTP needs to connect does not load (IO::Async::Internals::Connector; for https IO::Async::SSL, which needs IO::Socket::SSL, Net::SSLeay and the system libssl). The error names the module. For web_fetch that holds for every redirect it follows as well: an http URL that redirects to https is the same tool error.
ENVIRONMENT
BRAVE_API_KEY
Adds Brave to web_search.
SERPER_API_KEY
Adds Serper to web_search.
GOOGLE_API_KEY
With "GOOGLE_CSE_ID", adds Google Custom Search to web_search.
GOOGLE_CSE_ID
The Custom Search engine id for "GOOGLE_API_KEY".
SEE ALSO
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha-raider/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.