Files
windmill/backend/windmill-api/src/resources.rs
T
Ruben FiszelandClaude Opus 5.5 b9e0e06878 fix: recordings and mcp tools loading tweaks
Replay recordings load without credentials; the MCP tool panel lists tools over POST when requested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 18:52:56 +00:00

22 lines
841 B
Rust

#[cfg(feature = "mcp")]
use axum::routing::post;
use axum::Router;
/// Wraps the subcrate's workspaced_service with the mcp_tools routes
/// that depend on windmill-api internals.
pub fn workspaced_service() -> Router {
let router = windmill_store::resources::workspaced_service();
#[cfg(feature = "mcp")]
use crate::mcp_tools::{call_mcp_tool, get_mcp_tools};
// Listing tools sends the caller's resolved secrets to the URL the resource names, so it
// is a POST: the `SameSite=Lax` session cookie rides on a cross-site link or redirect to a
// GET, which would let anyone who can share a link pick the resource for the caller.
#[cfg(feature = "mcp")]
let router = router
.route("/mcp_tools/{*path}", post(get_mcp_tools))
.route("/mcp_call_tool/{*path}", post(call_mcp_tool));
router
}