Table of Contents

Class HttpPostTool

Namespace
LMKit.Agents.Tools.BuiltIn.Net
Assembly
LM-Kit.NET.dll

Makes an HTTP POST request to send data to a URL.

Enables agents to submit data to REST APIs, web services, and other HTTP endpoints that accept POST requests.

public sealed class HttpPostTool : IBuiltInTool, ITool, IToolMetadata, IDisposable
Inheritance
HttpPostTool
Implements
Inherited Members

Examples

Posting a webhook payload from inside an agent (with explicit approval):

using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Net;

var agent = Agent.CreateBuilder(model) .WithTools(t => t.Register(new HttpPostTool())) .WithPermissionPolicy(p => p.RequireApproval("http_post")) .Build();

var result = await agent.RunAsync( "POST {"event":"deploy","status":"ok"} to https://hooks.example.com/notify.");

Constructors

HttpPostTool()

Initializes a new instance with default settings.

HttpPostTool(HttpToolOptions)

Initializes a new instance with custom options.

HttpPostTool(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

Dispose()
InvokeAsync(string, CancellationToken)

Executes the tool with the specified JSON arguments.

Share