import{u as o,b as u,c as n}from"./vendor-query-B2UbickB.js";import{b as s}from"./index-BZu5zewH.js";function m(e={}){const r=new URLSearchParams;e.status&&r.set("status",e.status),e.search&&r.set("search",e.search),e.tags&&r.set("tags",e.tags);const t=r.toString();return o({queryKey:["mcpServers",e],queryFn:()=>s(`/mcp/servers${t?`?${t}`:""}`)})}function y(e){return o({queryKey:["mcpServers",e],queryFn:()=>s(`/mcp/servers/${e}`),enabled:!!e})}function p(){const e=u();return n({mutationFn:r=>s("/mcp/servers",{method:"POST",body:JSON.stringify(r)}),onSuccess:()=>{e.invalidateQueries({queryKey:["mcpServers"]})}})}function S(){const e=u();return n({mutationFn:({id:r,...t})=>s(`/mcp/servers/${r}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["mcpServers"]})}})}function v(){return n({mutationFn:e=>s("/mcp/servers/test-connection",{method:"POST",body:JSON.stringify(e)})})}function d(){const e=u();return n({mutationFn:r=>s(`/mcp/servers/${r}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["mcpServers"]})}})}function q(){const e=u();return n({mutationFn:r=>s(`/mcp/servers/${r}/connect`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["mcpServers"]})}})}function f(){const e=u();return n({mutationFn:r=>s(`/mcp/servers/${r}/disconnect`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["mcpServers"]})}})}function h(){return n({mutationFn:({serverId:e,toolName:r,arguments:t,execute_as:c})=>s(`/mcp/servers/${e}/tools/${r}/call`,{method:"POST",body:JSON.stringify({arguments:t,...c?{execute_as:c}:{}})})})}export{q as a,f as b,d as c,v as d,y as e,p as f,S as g,h,m as u};
//# sourceMappingURL=mcp-DMYXb9fv.js.map
