Class WebReadTool
Reads the main content of a public web page as clean Markdown: the
step after web_search, which only names pages. Navigation,
scripts, forms, banners, and repeated site chrome are stripped; the
result carries the page title, the canonical URL, the source domain,
and the publication date when the page states one.
The model-facing schema is the URL alone. Every limit (timeout, redirects, response size, content cap) and the whole egress policy (public-web or allowed-hosts mode, private-address protection, pinned connections) are server-side settings on WebReadTool.Options, never the model's to choose.
public sealed class WebReadTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
WebReadTool
- Implements
- Inherited Members
Examples
Search, then read the winning page:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Net;
var agent = Agent.CreateBuilder(model)
.WithTools(t =>
{
t.Register(new WebSearchTool());
t.Register(new WebReadTool());
})
.Build();
var result = await agent.RunAsync(
"Find the latest release notes for the .NET runtime and summarize the breaking changes.");
Constructors
- WebReadTool()
Creates the tool with default options: public-web egress, chat-sized content cap.
- WebReadTool(Options)
Creates the tool with the given server-side options.
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.