Package io.modelcontextprotocol.spec
Record Class McpSchema.CallToolRequest
java.lang.Object
java.lang.Record
io.modelcontextprotocol.spec.McpSchema.CallToolRequest
- Record Components:
name- The name of the tool to call. This must match a tool name from tools/list.arguments- Arguments to pass to the tool. These must conform to the tool's input schema.
- All Implemented Interfaces:
McpSchema.Request
- Enclosing class:
- McpSchema
public static record McpSchema.CallToolRequest(String name, Map<String,Object> arguments)
extends Record
implements McpSchema.Request
Used by the client to call a tool provided by the server.
-
Constructor Summary
ConstructorsConstructorDescriptionCallToolRequest(String name, Map<String, Object> arguments) Creates an instance of aCallToolRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-