Skip to content

Commit 1582ba6

Browse files
Update AsyncMcpToolCallback.java
Add getOriginalToolName method for AsyncMcpToolCallback in order to get easy access to the 'original' toolname before the prefix was added Signed-off-by: shishuiwuhen2009 <[email protected]>
1 parent cd25a07 commit 1582ba6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mcp/common/src/main/java/org/springframework/ai/mcp/AsyncMcpToolCallback.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public ToolDefinition getToolDefinition() {
9696
.build();
9797
}
9898

99+
public String getOriginalToolName() {
100+
return this.tool.name();
101+
}
102+
99103
/**
100104
* Executes the tool with the provided input asynchronously.
101105
* <p>

0 commit comments

Comments
 (0)