Package io.meeds.mcp.server.model
Record Class McpToolGrantRequest
java.lang.Object
java.lang.Record
io.meeds.mcp.server.model.McpToolGrantRequest
- Record Components:
requestId- the call identifier, also the approval request idusername- the user the tool runs astoolName- the MCP tool name (snake case)toolInput- the call arguments as received (JSON)agentNameId- the calling agent, or null when unknownconversationId- the chat conversation, or null outside a chatclientId- the OAuth client that owns the token, may be nullretry- whether the call belongs to a retried answer
public record McpToolGrantRequest(String requestId, String username, String toolName, String toolInput, String agentNameId, String conversationId, String clientId, boolean retry)
extends Record
One tool call as the MCP server resolved it, the input of every standing
approval decision. Each field comes from the server's own resolution of the
call (the token, the trusted internal-client headers, the call input), never
from an approval answer: a grant chosen on a card is built from this record,
so the card can only pick a scope and an expiry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentNameIdrecord component.clientId()Returns the value of theclientIdrecord component.Returns the value of theconversationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therequestIdrecord component.booleanretry()Returns the value of theretryrecord component.Returns the value of thetoolInputrecord component.toolName()Returns the value of thetoolNamerecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
McpToolGrantRequest
public McpToolGrantRequest(String requestId, String username, String toolName, String toolInput, String agentNameId, String conversationId, String clientId, boolean retry) Creates an instance of aMcpToolGrantRequestrecord class.- Parameters:
requestId- the value for therequestIdrecord componentusername- the value for theusernamerecord componenttoolName- the value for thetoolNamerecord componenttoolInput- the value for thetoolInputrecord componentagentNameId- the value for theagentNameIdrecord componentconversationId- the value for theconversationIdrecord componentclientId- the value for theclientIdrecord componentretry- the value for theretryrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
toolName
Returns the value of thetoolNamerecord component.- Returns:
- the value of the
toolNamerecord component
-
toolInput
Returns the value of thetoolInputrecord component.- Returns:
- the value of the
toolInputrecord component
-
agentNameId
Returns the value of theagentNameIdrecord component.- Returns:
- the value of the
agentNameIdrecord component
-
conversationId
Returns the value of theconversationIdrecord component.- Returns:
- the value of the
conversationIdrecord component
-
clientId
Returns the value of theclientIdrecord component.- Returns:
- the value of the
clientIdrecord component
-
retry
public boolean retry()Returns the value of theretryrecord component.- Returns:
- the value of the
retryrecord component
-