Class BowireMcpTools
- Namespace
- Kuestenlogik.Bowire.Mcp
- Assembly
- Kuestenlogik.Bowire.Mcp.dll
MCP tool surface for Bowire. Each method is one tool the agent sees;
parameter descriptions surface as JSON-Schema descriptions in
tools/list. The class is registered with the SDK via
WithTools<BowireMcpTools>() in
BowireMcpServiceCollectionExtensions.
Three families of tool live here:
- Live calls (
discover,invoke,subscribe) hit the loaded protocol plugins directly via BowireProtocolRegistry. - State queries (
env.list,record.list) read the on-disk Bowire files under~/.bowire/. - Diagnostic (
allowlist.show) — surfaces the current security configuration so an agent can self-debug "why is my invoke failing?".
[McpServerToolType]
public sealed class BowireMcpTools
- Inheritance
-
BowireMcpTools
- Inherited Members
Constructors
BowireMcpTools(BowireProtocolRegistry, BowireMockHandleRegistry, BowireMcpConfirmationStore, BowireRecordingSession, IOptions<BowireMcpOptions>, ILogger<BowireMcpTools>)
public BowireMcpTools(BowireProtocolRegistry registry, BowireMockHandleRegistry mockHandles, BowireMcpConfirmationStore confirmations, BowireRecordingSession recordingSession, IOptions<BowireMcpOptions> options, ILogger<BowireMcpTools> logger)
Parameters
registryBowireProtocolRegistrymockHandlesBowireMockHandleRegistryconfirmationsBowireMcpConfirmationStorerecordingSessionBowireRecordingSessionoptionsIOptions<BowireMcpOptions>loggerILogger<BowireMcpTools>
Methods
AllowlistPermit(string)
[McpServerTool(Name = "bowire.allowlist.permit")]
public string AllowlistPermit(string url)
Parameters
urlstring
Returns
AllowlistShow()
[McpServerTool(Name = "bowire.allowlist.show")]
public string AllowlistShow()
Returns
Assert(int, string, string, JsonElement, string?, string?)
[McpServerTool(Name = "bowire.assert")]
public static Task<string> Assert(int stepIndex, string path, string op, JsonElement expected, string? recordingId = null, string? recordingPath = null)
Parameters
Returns
Discover(string, string?, CancellationToken)
[McpServerTool(Name = "bowire.discover")]
public Task<string> Discover(string url, string? protocol = null, CancellationToken ct = default)
Parameters
urlstringprotocolstringctCancellationToken
Returns
EnvList()
[McpServerTool(Name = "bowire.env.list")]
public static string EnvList()
Returns
HarImport(string, string?, string?, bool)
[McpServerTool(Name = "bowire.har.import")]
public static Task<string> HarImport(string harPath, string? outPath = null, string? name = null, bool redactSecrets = false)
Parameters
Returns
Invoke(string, string, string, string?, string, Dictionary<string, string>?, CancellationToken)
[McpServerTool(Name = "bowire.invoke")]
public Task<string> Invoke(string url, string service, string method, string? protocol = null, string body = "{}", Dictionary<string, string>? metadata = null, CancellationToken ct = default)
Parameters
urlstringservicestringmethodstringprotocolstringbodystringmetadataDictionary<string, string>ctCancellationToken
Returns
MockList()
[McpServerTool(Name = "bowire.mock.list")]
public string MockList()
Returns
MockStart(string?, string?, string?, string?, int, string, bool, string?, CancellationToken)
[McpServerTool(Name = "bowire.mock.start")]
public Task<string> MockStart(string? recording = null, string? schema = null, string? grpcSchema = null, string? graphqlSchema = null, int port = 0, string host = "localhost", bool confirm = false, string? confirmationToken = null, CancellationToken ct = default)
Parameters
recordingstringschemastringgrpcSchemastringgraphqlSchemastringportinthoststringconfirmboolconfirmationTokenstringctCancellationToken
Returns
MockStop(string)
[McpServerTool(Name = "bowire.mock.stop")]
public Task<string> MockStop(string handle)
Parameters
handlestring
Returns
RecordList()
[McpServerTool(Name = "bowire.record.list")]
public static string RecordList()
Returns
RecordReplay(string?, string?, bool, string?)
[McpServerTool(Name = "bowire.record.replay")]
public string RecordReplay(string? workspaceId = null, string? recordingId = null, bool confirm = false, string? confirmationToken = null)
Parameters
Returns
RecordStart(string?, string?, string?, string?, bool, string?)
[McpServerTool(Name = "bowire.record.start")]
public string RecordStart(string? workspaceId = null, string? mode = null, string? name = null, string? recordingId = null, bool confirm = false, string? confirmationToken = null)
Parameters
Returns
RecordStop(bool, string?)
[McpServerTool(Name = "bowire.record.stop")]
public string RecordStop(bool confirm = false, string? confirmationToken = null)
Parameters
Returns
Subscribe(string, string, string, string?, string, Dictionary<string, string>?, int?, CancellationToken)
[McpServerTool(Name = "bowire.subscribe")]
public Task<string> Subscribe(string url, string service, string method, string? protocol = null, string body = "{}", Dictionary<string, string>? metadata = null, int? durationMs = null, CancellationToken ct = default)
Parameters
urlstringservicestringmethodstringprotocolstringbodystringmetadataDictionary<string, string>durationMsint?ctCancellationToken