Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
McpServerToolAttribute.cs
1using System;
3
5{
10 [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
11 public class McpServerToolAttribute : Attribute
12 {
34 public McpServerToolAttribute(string Title, string Description, string IconsMethod,
36 bool OpenWorldAccess)
38 Idempotent, OpenWorldAccess, Array.Empty<KeyValuePair<string, object>>())
39 {
40 }
41
65 public McpServerToolAttribute(string Title, string Description, string IconsMethod,
67 bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1)
70 new KeyValuePair<string, object>(MetaDataKey1, MetaDataValue1))
71 {
72 }
73
99 public McpServerToolAttribute(string Title, string Description, string IconsMethod,
101 bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1,
102 string MetaDataKey2, object MetaDataValue2)
105 new KeyValuePair<string, object>(MetaDataKey1, MetaDataValue1),
106 new KeyValuePair<string, object>(MetaDataKey2, MetaDataValue2))
107 {
108 }
109
139 bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1,
140 string MetaDataKey2, object MetaDataValue2,
141 string MetaDataKey3, object MetaDataValue3)
144 new KeyValuePair<string, object>(MetaDataKey1, MetaDataValue1),
145 new KeyValuePair<string, object>(MetaDataKey2, MetaDataValue2),
146 new KeyValuePair<string, object>(MetaDataKey3, MetaDataValue3))
147 {
148 }
149
181 bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1,
182 string MetaDataKey2, object MetaDataValue2,
183 string MetaDataKey3, object MetaDataValue3,
184 string MetaDataKey4, object MetaDataValue4)
187 new KeyValuePair<string, object>(MetaDataKey1, MetaDataValue1),
188 new KeyValuePair<string, object>(MetaDataKey2, MetaDataValue2),
189 new KeyValuePair<string, object>(MetaDataKey3, MetaDataValue3),
190 new KeyValuePair<string, object>(MetaDataKey4, MetaDataValue4))
191 {
192 }
193
227 bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1,
228 string MetaDataKey2, object MetaDataValue2,
229 string MetaDataKey3, object MetaDataValue3,
230 string MetaDataKey4, object MetaDataValue4,
231 string MetaDataKey5, object MetaDataValue5)
234 new KeyValuePair<string, object>(MetaDataKey1, MetaDataValue1),
235 new KeyValuePair<string, object>(MetaDataKey2, MetaDataValue2),
236 new KeyValuePair<string, object>(MetaDataKey3, MetaDataValue3),
237 new KeyValuePair<string, object>(MetaDataKey4, MetaDataValue4),
238 new KeyValuePair<string, object>(MetaDataKey5, MetaDataValue5))
239 {
240 }
241
266 bool OpenWorldAccess, params KeyValuePair<string, object>[] MetaData)
267 {
268 this.Title = Title;
269 this.Description = Description;
270 this.IconsMethod = IconsMethod;
271 this.CanModifyEnvironment = CanModifyEnvironment;
272 this.CanDestroyEnvironment = CanDestroyEnvironment;
273 this.Idempotent = Idempotent;
274 this.OpenWorldAccess = OpenWorldAccess;
275 this.MetaData = MetaData;
276 }
277
281 public string Title { get; }
282
289 public string Description { get; }
290
296 public string IconsMethod { get; }
297
302 public bool CanModifyEnvironment { get; }
303
311 public bool CanDestroyEnvironment { get; }
312
320 public bool Idempotent { get; }
321
326 public bool OpenWorldAccess { get; }
327
331 public KeyValuePair<string, object>[] MetaData { get; }
332 }
333}
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
bool OpenWorldAccess
If true, this tool may interact with an "open world" of external entities.If false,...
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1, string MetaDataKey2, object MetaDataValue2, string MetaDataKey3, object MetaDataValue3)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
KeyValuePair< string, object >[] MetaData
Meta-data associated with tool.
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1, string MetaDataKey2, object MetaDataValue2)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess, params KeyValuePair< string, object >[] MetaData)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1, string MetaDataKey2, object MetaDataValue2, string MetaDataKey3, object MetaDataValue3, string MetaDataKey4, object MetaDataValue4)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
McpServerToolAttribute(string Title, string Description, string IconsMethod, bool CanModifyEnvironment, bool CanDestroyEnvironment, bool Idempotent, bool OpenWorldAccess, string MetaDataKey1, object MetaDataValue1, string MetaDataKey2, object MetaDataValue2, string MetaDataKey3, object MetaDataValue3, string MetaDataKey4, object MetaDataValue4, string MetaDataKey5, object MetaDataValue5)
Defines a method in an HttpMcpServerResource implementation as a recipient of an MCP Server Tool invo...
bool CanModifyEnvironment
If the tool can modify the environment. If false, the tool is expected to be read-only and not cause ...
string Description
A human-readable description of the tool.
string IconsMethod
Name of method that returns an Icon?, an an Icon[]? or an Icons? resource representing the prompt....
bool CanDestroyEnvironment
If true, the tool may perform destructive updates to its environment. If false, the tool performs onl...
bool Idempotent
If true, calling the tool repeatedly with the same arguments will have no additional effect on its en...