McpToolFilter Class
- java.
lang. Object - com.
azure. ai. agents. models. McpToolFilter
- com.
Implements
public final class McpToolFilter
implements JsonSerializable<McpToolFilter>
MCP tool filter A filter object to specify which tools are allowed.
Constructor Summary
| Constructor | Description |
|---|---|
| McpToolFilter() |
Creates an instance of Mcp |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Mcp |
fromJson(JsonReader jsonReader)
Reads an instance of Mcp |
| List<String> |
getToolNames()
Get the tool |
| Boolean |
isReadOnly()
Get the read |
|
Mcp |
setReadOnly(Boolean readOnly)
Set the read |
|
Mcp |
setToolNames(List<String> toolNames)
Set the tool |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
McpToolFilter
public McpToolFilter()
Creates an instance of McpToolFilter class.
Method Details
fromJson
public static McpToolFilter fromJson(JsonReader jsonReader)
Reads an instance of McpToolFilter from the JsonReader.
Parameters:
Returns:
Throws:
getToolNames
public List<String> getToolNames()
Get the toolNames property: MCP allowed tools List of allowed tool names.
Returns:
isReadOnly
public Boolean isReadOnly()
Get the readOnly property: Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema\#toolannotations-readonlyhint), it will match this filter.
Returns:
setReadOnly
public McpToolFilter setReadOnly(Boolean readOnly)
Set the readOnly property: Indicates whether or not a tool modifies data or is read-only. If an MCP server is [annotated with `readOnlyHint`](https://modelcontextprotocol.io/specification/2025-06-18/schema\#toolannotations-readonlyhint), it will match this filter.
Parameters:
Returns:
setToolNames
public McpToolFilter setToolNames(List<String> toolNames)
Set the toolNames property: MCP allowed tools List of allowed tool names.
Parameters:
Returns: