ModelContextTool Class

A tool registered with ModelContext.RegisterTool (https://webmachinelearning.github.io/webmcp/#dictdef-modelcontexttool).

public sealed class ModelContextTool

Constructors

NameDescription
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

NameDescription
AnnotationsGets the hints that describe the behavior of the tool, or null.
DescriptionGets the natural language description of the tool (not empty).
ExecuteGets the function that executes the tool.
InputSchemaGets 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.
NameGets the name of the tool: 1 to 128 ASCII alphanumeric characters, _, - or ., unique in the document.
OutputSchemaGets the JSON Schema of the result, or null: a JavaScript object, or a JsonNode. It is serialized to JSON when the tool is registered.
TitleGets the human-readable title of the tool, or null.

Gets the hints that describe the behavior of the tool, or null.

public ToolAnnotations? Annotations { get; init; }

Gets the natural language description of the tool (not empty).

public required string Description { get; init; }

Gets the function that executes the tool.

public required ToolExecuteCallback Execute { get; init; }

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.

public object? InputSchema { get; init; }

Gets the name of the tool: 1 to 128 ASCII alphanumeric characters, _, - or ., unique in the document.

public required string Name { get; init; }

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.

public object? OutputSchema { get; init; }

Gets the human-readable title of the tool, or null.

public string? Title { get; init; }