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:
2026-08-30 22:24:03 +00:00
parent 8261fefd8f
commit 3d77ffe1d3
+2 -8
View File
@@ -208,7 +208,6 @@ impl ToMcpGateway {
async fn handle_batch(
&self,
search_filter: Option<String>,
arguments: Option<JsonObject>,
identity: Option<Identity>,
) -> CallToolResult {
@@ -242,7 +241,6 @@ impl ToMcpGateway {
.await;
results.push(envelope_to_value(response));
}
let _ = search_filter;
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_SCHEMA => this.handle_schema(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 => {
let err = CallError::new(
"NOT_FOUND",
@@ -710,11 +708,7 @@ mod tests {
TOOL_SEARCH => gateway.handle_search(search_filter, identity).await,
TOOL_SCHEMA => gateway.handle_schema(arguments, identity).await,
TOOL_CALL => gateway.handle_call(arguments, identity).await,
TOOL_BATCH => {
gateway
.handle_batch(search_filter, arguments, identity)
.await
}
TOOL_BATCH => gateway.handle_batch(arguments, identity).await,
unknown => {
let err = CallError::new(
"NOT_FOUND",