Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Ean Schuessler
/
mo-mcp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
93d60083
authored
2025-12-07 20:26:33 -0600
by
Ean Schuessler
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fix tools/call routing - avoid recursive calls and variable name conflicts
1 parent
3829e3be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
service/McpServices.xml
service/McpServices.xml
View file @
93d6008
...
...
@@ -169,10 +169,16 @@
actualArguments = [sessionId: sessionId]
}
// Recursively call the actual tool
return ec.service.sync().name("McpServices.mcp#ToolsCall")
.parameters([sessionId: sessionId, name: actualToolName, arguments: actualArguments])
.call()
// Route to the actual tool service, not recursive ToolsCall
def actualTargetServiceName = protocolMethodMappings[actualToolName]
if (actualTargetServiceName) {
ec.logger.info("MCP ToolsCall: Routing tools/call with name '${actualToolName}' to ${actualTargetServiceName}")
return ec.service.sync().name(actualTargetServiceName)
.parameters(actualArguments ?: [:])
.call()
} else {
throw new Exception("Unknown tool name: ${actualToolName}")
}
} else {
// For other protocol methods, call the target service with provided arguments
def serviceResult = ec.service.sync().name(targetServiceName)
...
...
Please
register
or
sign in
to post a comment