ModelContextTool Class
A tool registered with ModelContext.RegisterTool (https://webmachinelearning.github.io/webmcp/#dictdef-modelcontexttool).
public sealed class ModelContextToolConstructors
| Name | Description |
|---|---|
| ModelContextTool() |
ModelContextTool()
- Obsolete: Constructors of types with required members are not supported in this version of your compiler.
[Obsolete("Constructors of types with required members are not supported in this version of your compiler.", true)]
public ModelContextTool()No documentation is available.
Properties
| Name | Description |
|---|---|
| Annotations | Gets the hints that describe the behavior of the tool, or null. |
| Description | Gets the natural language description of the tool (not empty). |
| Execute | Gets the function that executes the tool. |
| InputSchema | Gets the JSON Schema of the input arguments, or null: a JavaScript object, or a JsonNode. It is serialized to JSON when the tool is registered. |
| Name | Gets the name of the tool: 1 to 128 ASCII alphanumeric characters, _, - or ., unique in the document. |
| OutputSchema | Gets the JSON Schema of the result, or null: a JavaScript object, or a JsonNode. It is serialized to JSON when the tool is registered. |
| Title | Gets the human-readable title of the tool, or null. |
Annotations
ModelContextTypes.csGets the hints that describe the behavior of the tool, or null.
public ToolAnnotations? Annotations { get; init; }Description
ModelContextTypes.csGets the natural language description of the tool (not empty).
public required string Description { get; init; }Property value
See also
Execute
ModelContextTypes.csGets the function that executes the tool.
public required ToolExecuteCallback Execute { get; init; }InputSchema
ModelContextTypes.csGets the name of the tool: 1 to 128 ASCII alphanumeric characters, _, - or ., unique in the document.
public required string Name { get; init; }OutputSchema
ModelContextTypes.csTitle
ModelContextTypes.csGets the human-readable title of the tool, or null.
public string? Title { get; init; }