forked from Azure/azure-sdk-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpectedToolCall.cs
More file actions
41 lines (35 loc) · 1.42 KB
/
ExpectedToolCall.cs
File metadata and controls
41 lines (35 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace Azure.Sdk.Tools.Cli.Benchmarks.Models;
/// <summary>
/// Describes an expected tool call with optional input validation.
/// </summary>
public class ExpectedToolCall
{
/// <summary>Gets the expected tool name (short name without MCP prefix).</summary>
public string ToolName { get; }
/// <summary>
/// Gets the expected input key-value pairs to validate, or null to skip input validation.
/// Keys are parameter names; values are the expected values.
/// String values use case-insensitive substring matching (to handle variable path prefixes).
/// Numeric and boolean values use exact matching.
/// </summary>
public IReadOnlyDictionary<string, object?> ExpectedInputs { get; }
/// <summary>
/// Creates an expected tool call that only validates the tool was called (no input checks).
/// </summary>
public ExpectedToolCall(string toolName)
{
ToolName = toolName;
ExpectedInputs = new Dictionary<string, object?>();
}
/// <summary>
/// Creates an expected tool call that validates both the tool name and its inputs.
/// </summary>
public ExpectedToolCall(string toolName, Dictionary<string, object?> expectedInputs)
{
ToolName = toolName;
ExpectedInputs = expectedInputs;
}
public override string ToString() => ToolName;
}