Class HttpPutTool
Makes an HTTP PUT request to replace a resource at a URL.
Enables agents to update or replace resources on REST APIs and other HTTP endpoints that accept PUT requests.
public sealed class HttpPutTool : IBuiltInTool, ITool, IToolMetadata, IDisposable
- Inheritance
-
HttpPutTool
- Implements
- Inherited Members
Examples
Replacing a resource on a REST API:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Net;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new HttpPutTool()))
.Build();
var result = await agent.RunAsync(
"PUT the JSON {"status":"closed"} to https://api.example.com/issues/42.");
Constructors
- HttpPutTool()
Initializes a new instance with default settings.
- HttpPutTool(HttpToolOptions)
Initializes a new instance with custom options.
- HttpPutTool(HttpClient, HttpToolOptions)
Initializes a new instance with an existing HttpClient.
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.