We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bb4c99 commit 8d34456Copy full SHA for 8d34456
1 file changed
src/Azure.DataApiBuilder.Mcp/Core/DynamicCustomTool.cs
@@ -442,13 +442,14 @@ private JsonElement BuildInputSchemaFromConfig()
442
/// </summary>
443
private static bool IsParameterRequired(bool? configuredRequired, bool hasDefault)
444
{
445
- if (configuredRequired is not null)
+ // If the engine can supply a default when the caller omits the parameter,
446
+ // it should not be advertised as required.
447
+ if (hasDefault)
448
- return configuredRequired.Value;
449
+ return false;
450
}
451
- // No explicit config: a parameter is required unless a default is available.
- return !hasDefault;
452
+ return configuredRequired ?? true;
453
454
455
/// <summary>
0 commit comments