Fix tools with no args
This commit is contained in:
parent
6bace861b2
commit
74737223a0
1 changed files with 33 additions and 1 deletions
|
|
@ -314,7 +314,7 @@ module MCP
|
|||
end
|
||||
|
||||
def call_tool_with_args(tool, arguments)
|
||||
args = arguments.transform_keys(&:to_sym)
|
||||
args = arguments&.transform_keys(&:to_sym) || {}
|
||||
|
||||
if accepts_server_context?(tool.method(:call))
|
||||
tool.call(**args, server_context: server_context).to_h
|
||||
|
|
|
|||
Loading…
Reference in a new issue