fix(adapters): drop dead search_filter parameter from to_mcp handle_batch (PRJ-24)
The batch tool's input schema declares no query field, so the parsed search_filter was computed then discarded with 'let _ ='. Remove the parameter and the discard; call sites pass only (arguments, identity).
This commit is contained in:
@@ -208,7 +208,6 @@ impl ToMcpGateway {
|
|||||||
|
|
||||||
async fn handle_batch(
|
async fn handle_batch(
|
||||||
&self,
|
&self,
|
||||||
search_filter: Option<String>,
|
|
||||||
arguments: Option<JsonObject>,
|
arguments: Option<JsonObject>,
|
||||||
identity: Option<Identity>,
|
identity: Option<Identity>,
|
||||||
) -> CallToolResult {
|
) -> CallToolResult {
|
||||||
@@ -242,7 +241,6 @@ impl ToMcpGateway {
|
|||||||
.await;
|
.await;
|
||||||
results.push(envelope_to_value(response));
|
results.push(envelope_to_value(response));
|
||||||
}
|
}
|
||||||
let _ = search_filter;
|
|
||||||
CallToolResult::structured(serde_json::json!({ "results": results }))
|
CallToolResult::structured(serde_json::json!({ "results": results }))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -458,7 +456,7 @@ impl rmcp::handler::server::ServerHandler for ToMcpGateway {
|
|||||||
TOOL_SEARCH => this.handle_search(search_filter, identity).await,
|
TOOL_SEARCH => this.handle_search(search_filter, identity).await,
|
||||||
TOOL_SCHEMA => this.handle_schema(arguments, identity).await,
|
TOOL_SCHEMA => this.handle_schema(arguments, identity).await,
|
||||||
TOOL_CALL => this.handle_call(arguments, identity).await,
|
TOOL_CALL => this.handle_call(arguments, identity).await,
|
||||||
TOOL_BATCH => this.handle_batch(search_filter, arguments, identity).await,
|
TOOL_BATCH => this.handle_batch(arguments, identity).await,
|
||||||
unknown => {
|
unknown => {
|
||||||
let err = CallError::new(
|
let err = CallError::new(
|
||||||
"NOT_FOUND",
|
"NOT_FOUND",
|
||||||
@@ -710,11 +708,7 @@ mod tests {
|
|||||||
TOOL_SEARCH => gateway.handle_search(search_filter, identity).await,
|
TOOL_SEARCH => gateway.handle_search(search_filter, identity).await,
|
||||||
TOOL_SCHEMA => gateway.handle_schema(arguments, identity).await,
|
TOOL_SCHEMA => gateway.handle_schema(arguments, identity).await,
|
||||||
TOOL_CALL => gateway.handle_call(arguments, identity).await,
|
TOOL_CALL => gateway.handle_call(arguments, identity).await,
|
||||||
TOOL_BATCH => {
|
TOOL_BATCH => gateway.handle_batch(arguments, identity).await,
|
||||||
gateway
|
|
||||||
.handle_batch(search_filter, arguments, identity)
|
|
||||||
.await
|
|
||||||
}
|
|
||||||
unknown => {
|
unknown => {
|
||||||
let err = CallError::new(
|
let err = CallError::new(
|
||||||
"NOT_FOUND",
|
"NOT_FOUND",
|
||||||
|
|||||||
Reference in New Issue
Block a user