mirror of
https://github.com/openai/codex.git
synced 2026-09-17 12:23:33 +00:00
Restore explicit RMCP tools/call request path
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -723,7 +723,7 @@ impl RmcpClient {
|
||||
None => None,
|
||||
};
|
||||
let rmcp_params = CallToolRequestParams {
|
||||
meta,
|
||||
meta: None,
|
||||
name: name.into(),
|
||||
arguments,
|
||||
task: None,
|
||||
@@ -731,7 +731,30 @@ impl RmcpClient {
|
||||
let result = self
|
||||
.run_service_operation("tools/call", timeout, move |service| {
|
||||
let rmcp_params = rmcp_params.clone();
|
||||
async move { service.call_tool(rmcp_params).await }.boxed()
|
||||
let meta = meta.clone();
|
||||
async move {
|
||||
let result = service
|
||||
.peer()
|
||||
.send_request_with_option(
|
||||
ClientRequest::CallToolRequest(rmcp::model::CallToolRequest {
|
||||
method: Default::default(),
|
||||
params: rmcp_params,
|
||||
extensions: Default::default(),
|
||||
}),
|
||||
rmcp::service::PeerRequestOptions {
|
||||
timeout: None,
|
||||
meta,
|
||||
},
|
||||
)
|
||||
.await?
|
||||
.await_response()
|
||||
.await?;
|
||||
match result {
|
||||
ServerResult::CallToolResult(result) => Ok(result),
|
||||
_ => Err(rmcp::service::ServiceError::UnexpectedResponse),
|
||||
}
|
||||
}
|
||||
.boxed()
|
||||
})
|
||||
.await?;
|
||||
self.persist_oauth_tokens().await;
|
||||
|
||||
Reference in New Issue
Block a user