using System.ComponentModel;
namespace ModelContextProtocol.Server;
/// Provides options for controlling the creation of an .
public sealed class McpServerToolCreateOptions
{
///
/// Gets or sets optional services used in the construction of the .
///
///
/// These services will be used to determine which parameters should be satisifed from dependency injection; what services
/// are satisfied via this provider should match what's satisfied via the provider passed in at invocation time.
///
public IServiceProvider? Services { get; set; }
///
/// Gets or sets the name to use for the .
///
///
/// If , but an is applied to the method,
/// the name from the attribute will be used. If that's not present, a name based on the method's name will be used.
///
public string? Name { get; set; }
///
/// Gets or set the description to use for the .
///
///
/// If , but a is applied to the method,
/// the description from that attribute will be used.
///
public string? Description { get; set; }
///
/// Gets or sets a human-readable title for the tool.
///
public string? Title { get; set; }
///
/// Gets or sets whether the tool may perform destructive updates to its environment.
///
public bool? Destructive { get; set; }
///
/// Gets or sets whether calling the tool repeatedly with the same arguments
/// will have no additional effect on its environment.
///
public bool? Idempotent { get; set; }
///
/// Gets or sets whether this tool may interact with an "open world" of external entities.
///
public bool? OpenWorld { get; set; }
///
/// Gets or sets whether this tool does not modify its environment.
///
public bool? ReadOnly { get; set; }
///
/// Creates a shallow clone of the current instance.
///
internal McpServerToolCreateOptions Clone() =>
new McpServerToolCreateOptions()
{
Services = Services,
Name = Name,
Description = Description,
Title = Title,
Destructive = Destructive,
Idempotent = Idempotent,
OpenWorld = OpenWorld,
ReadOnly = ReadOnly
};
}