Skip to content

Commit 5703c9f

Browse files
Update SyncMcpToolCallback.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 d67a3cd commit 5703c9f

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/SyncMcpToolCallback.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ public ToolDefinition getToolDefinition() {
100100
.build();
101101
}
102102

103+
public String getOriginalToolName() {
104+
return this.tool.name();
105+
}
106+
103107
/**
104108
* Executes the tool with the provided input.
105109
* <p>

0 commit comments

Comments
 (0)