Class HttpPatchTool
Makes an HTTP PATCH request to partially update a resource.
Enables agents to apply partial modifications to resources on REST APIs and other HTTP endpoints that accept PATCH requests.
public sealed class HttpPatchTool : IBuiltInTool, ITool, IToolMetadata, IDisposable
- Inheritance
-
HttpPatchTool
- Implements
- Inherited Members
Examples
Applying a JSON Merge Patch to update a record's status:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Net;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new HttpPatchTool()))
.Build();
var result = await agent.RunAsync(
"PATCH https://api.example.com/issues/42 with {"priority":"high"}.");
Constructors
- HttpPatchTool()
Initializes a new instance with default settings.
- HttpPatchTool(HttpToolOptions)
Initializes a new instance with custom options.
- HttpPatchTool(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.