Pass Context, not ToolContext (#610)
This commit is contained in:
parent
b780e5b807
commit
20ea8cbddd
3 changed files with 11 additions and 2 deletions
9
.vscode/launch.json
vendored
9
.vscode/launch.json
vendored
|
|
@ -22,6 +22,15 @@
|
|||
"jinja": true,
|
||||
"justMyCode": true,
|
||||
"cwd": "${workspaceFolder}"
|
||||
},
|
||||
{
|
||||
"name": "Run `python server.py`",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "server.py",
|
||||
"console": "integratedTerminal",
|
||||
"cwd": "/absolute/path/to/your/mcp_server",
|
||||
"args": []
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@ class Tools(_ContextComponent):
|
|||
definition=tool.definition,
|
||||
input_model=tool.input_model,
|
||||
output_model=tool.output_model,
|
||||
context=tool_context,
|
||||
context=self._ctx,
|
||||
**params,
|
||||
)
|
||||
return cast(ToolCallOutput, result)
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ class MCPServer:
|
|||
definition=tool.definition,
|
||||
input_model=tool.input_model,
|
||||
output_model=tool.output_model,
|
||||
context=tool_context,
|
||||
context=mctx if mctx is not None else tool_context,
|
||||
**input_params,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue