Files
xAiModels/Attributes/XAiMcpToolAttribute.cs

40 lines
1.1 KiB
C#

using System;
namespace xAiModels.Attributes
{
/// <summary>
/// Decorate and Describe Specified MCP Tool to LLM ...
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class XAiMcpToolAttribute : Attribute
{
/// <summary>
/// Tools Unique Name (Default: Method Name) ...
/// </summary>
/// <value></value>
public string Name { get; }
/// <summary>
/// Tools Description for LLM ...
/// </summary>
/// <value></value>
public string Description { get; set; }
/// <summary>
/// Specify it's Required to Authenticated or not ...
/// </summary>
/// <value></value>
public bool RequiresAuthentication { get; set; } = false;
/// <summary>
/// Authorization and Policiy ...
/// </summary>
/// <value></value>
public string RequiredPolicy { get; set; } = string.Empty;
public XAiMcpToolAttribute(string name = null)
{
Name = name;
}
}
}