Class BitwiseBitsTool
A built-in tool for bit manipulation operations.
Shift, count, get/set/clear/toggle individual bits.
public sealed class BitwiseBitsTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
BitwiseBitsTool
- Implements
- Inherited Members
Examples
Registering bitwise bit-manipulation on an agent that helps with low-level encoding:
using LMKit.Model;
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Numeric;
using var model = LM.LoadFromModelID("qwen3:8b");
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new BitwiseBitsTool()))
.Build();
var result = await agent.RunAsync("How many bits are set in 0b1011_0101?");
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.