Skip to content

Commit

Permalink
fix query tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Mar 4, 2025
1 parent c85f931 commit d85f68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/torii/server/src/handlers/mcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ impl McpHandler {

async fn handle_query_tool(&self, request: JsonRpcRequest) -> JsonRpcResponse {
if let Some(params) = request.params {
if let Some(query) = params.get("arguments").and_then(Value::as_str) {
if let Some(query) = params.get("query").and_then(Value::as_str) {
match sqlx::query(query).fetch_all(&*self.pool).await {
Ok(rows) => {
// Convert rows to JSON using shared mapping function
Expand Down

0 comments on commit d85f68f

Please sign in to comment.