Buckets:

download
raw
21.8 kB
import{s as jl,n as Fl,o as Nl}from"../chunks/scheduler.2b22cead.js";import{S as Ol,i as Zl,e as s,s as i,c as r,h as Dl,a,d as l,b as o,f as zl,g as p,j as c,k as Rl,l as Gl,m as n,n as d,t as u,o as m,p as v}from"../chunks/index.1a0e8013.js";import{C as Ql,H as f,E as Yl}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.48954dcb.js";import{C as Xl}from"../chunks/CodeBlock.9942e851.js";function Vl(Nt){let h,Je,ge,Ie,T,ke,C,Ee,$,Ot="This guide explains how MCP-backed environments work end to end in OpenEnv.",Ae,x,Zt="It exists to answer a common question: if an environment exposes MCP tools, when does <code>step()</code> run, when does <code>step_async()</code> run, and when should you use <code>call_tool()</code> versus <code>step(CallToolAction(...))</code>?",Ue,w,qe,y,Dt="MCP environments in OpenEnv can be used in two layers:",We,M,Gt="<li><strong>Simulation layer</strong>: the OpenEnv training loop controls <code>reset()</code>, <code>step()</code>, and <code>state()</code>.</li> <li><strong>Tool layer</strong>: MCP tools are exposed through <code>ListToolsAction</code>, <code>CallToolAction</code>, <code>list_tools()</code>, and <code>call_tool()</code>.</li>",Se,_,Qt="If you are training or evaluating with episode control, the canonical pattern is still the OpenEnv step loop.",Be,b,Yt="If you are serving tools to an external client, the MCP layer is the interface the agent should see.",ze,L,Re,P,Xt="OpenEnv keeps a strict API split:",je,g,Vt="<li><strong>Infrastructure boundary</strong>: Gym-like control over <code>/ws</code>, <code>reset()</code>, <code>step()</code>, and <code>state()</code></li> <li><strong>Agent boundary</strong>: MCP tools over <code>/mcp</code></li>",Fe,H,Kt="This means:",Ne,J,el="<li>agents should use MCP tools</li> <li>orchestration and training infrastructure use the simulation control loop</li> <li><code>/ws</code> is not an agent-facing interface, even if it is available on the server</li>",Oe,I,Ze,k,tl="<code>MCPEnvironment</code> is still an OpenEnv environment.",De,E,ll="It does not replace the step loop. Instead, it maps MCP actions into the step loop.",Ge,A,nl="In simulation mode, MCP tool usage is represented as normal environment actions:",Qe,U,Ye,q,il="That is why an MCP-backed environment can still participate in:",Xe,W,ol="<li>rewards</li> <li><code>done</code> handling</li> <li>step counts</li> <li>trajectory logging</li>",Ve,S,Ke,B,sl="This is the main source of confusion.",et,z,al="On the server side, the WebSocket handler checks whether the environment overrides <code>step_async()</code>.",tt,R,cl="<li>if <code>step_async()</code> is overridden, the WebSocket path calls <code>step_async()</code></li> <li>otherwise, it falls back to <code>step()</code></li>",lt,j,rl="That means an async client using the WebSocket session path may execute <code>step_async()</code> without hitting your synchronous <code>step()</code> instrumentation.",nt,F,pl="So if you add debug prints only to <code>step()</code> and use an async MCP client, it can look like “step is not being invoked” even though the action is being processed normally.",it,N,dl="For debugging, check both:",ot,O,ul="<li><code>step()</code></li> <li><code>step_async()</code></li>",st,Z,ml="The same rule applies to <code>reset()</code> and <code>reset_async()</code>.",at,D,ct,G,vl="Environment-specific MCP clients such as <code>EchoEnv</code> and <code>FinQAEnv</code> inherit from <code>MCPToolClient</code>.",rt,Q,fl="Those clients target a running environment server and expose convenience methods:",pt,Y,hl="<li><code>list_tools()</code></li> <li><code>call_tool()</code> — <strong>async</strong>, must be awaited</li>",dt,X,Tl="These are helpers, not a separate environment lifecycle.",ut,V,mt,K,Cl="<code>MCPToolClient</code> and its base <code>MCPClientBase</code> only support <code>mode=&quot;production&quot;</code>; construction raises <code>ValueError</code> for other modes. For direct in-process training or eval code, instantiate the environment class and call <code>env.step(CallToolAction(...))</code> instead of using <code>MCPToolClient</code>.",vt,ee,$l="<li><code>list_tools()</code> wraps <code>step(ListToolsAction())</code> and returns the <code>list[Tool]</code> directly.</li> <li><code>call_tool(name, **kwargs)</code> returns the <strong>unwrapped tool return value</strong> directly — not the <code>CallToolObservation</code>, and not the runtime result object you would get from <code>obs.result</code>.</li> <li><code>call_tool()</code> raises <code>RuntimeError</code> on any tool error. Use <code>step(CallToolAction(...))</code> when you need to inspect <code>ToolError.error_type</code> or continue after a failed tool call.</li>",ft,te,xl="Remote <code>step(CallToolAction(...))</code> calls return a <code>StepResult</code>; the full observation is on <code>result.observation</code>, while <code>result.reward</code> carries the serialized reward field.",ht,le,Tt,ne,wl="When production MCP access is explicitly enabled on the client, the same convenience methods use the HTTP <code>/mcp</code> JSON-RPC endpoint directly.",Ct,ie,yl="That path is for tool-serving behavior, not the training loop. It bypasses reward computation, step counts, trajectory tracking, and <code>done</code> handling.",$t,oe,xt,se,Ml="Use <code>step(CallToolAction(...))</code> when you need the full <code>CallToolObservation</code>:",wt,ae,_l="<li><code>reward</code></li> <li><code>done</code></li> <li>observation metadata</li> <li><code>obs.result</code>, a runtime result object typed as <code>Any</code>; FastMCP commonly returns <code>fastmcp.client.client.CallToolResult</code> with <code>.data</code>, <code>.content</code>, and <code>.structured_content</code>, but serialized clients or custom envs may surface a dict or plain value</li> <li>trajectory-compatible behavior</li>",yt,ce,bl="Use <code>await env.call_tool(name, **kwargs)</code> when you only want the tool’s raw return value and do not need to inspect the full observation. It is async and unwraps the result for you.",Mt,re,Ll="In other words:",_t,pe,Pl="<li><code>step(...)</code> is the canonical simulation pattern</li> <li><code>call_tool()</code> is an async convenience wrapper that returns the unwrapped tool output</li>",bt,de,Lt,ue,gl="Two good references in this repo are:",Pt,me,Hl='<li><a href="../environments/echo">Echo environment</a></li> <li><a href="../environments/finqa">FinQA environment</a></li>',gt,ve,Jl="For a minimal simulation-mode example, see:",Ht,fe,Il="<li><code>examples/echo_mcp_demo.py</code></li>",Jt,he,kl="Echo is useful because it shows the MCP mechanics with almost no domain logic.",It,Te,El="FinQA is useful because it shows an MCP environment where tool calls also participate in episode progression, rewards, and terminal submission.",kt,Ce,Et,$e,Al="Think about MCP environments in OpenEnv like this:",At,xe,Ul="<li>The environment is still an OpenEnv environment.</li> <li>MCP tools are one kind of action the environment knows how to handle.</li> <li>In simulation mode, tool calls are part of the step loop.</li> <li>In production mode, MCP becomes the agent-facing boundary.</li> <li>The WebSocket simulation interface remains infrastructure-only and must not be given directly to agents.</li>",Ut,we,qt,ye,ql="If an MCP environment “doesn’t call step”, check these first:",Wt,Me,Wl="<li>Are you using an async client path that triggers <code>step_async()</code>?</li> <li>Did you instrument both <code>step()</code> and <code>step_async()</code>?</li> <li>Are you using <code>call_tool()</code> and assuming it bypasses the step loop?</li> <li>Are you expecting the MCP tool layer to behave like a separate environment lifecycle?</li>",St,_e,Sl="Usually the action is flowing correctly, but through the async WebSocket path rather than the synchronous method you were watching.",Bt,be,zt,Le,Bl='<li><a href="../reference/core">Core API</a></li> <li><a href="../environments/echo">Echo environment</a></li> <li><a href="../environments/finqa">FinQA environment</a></li>',Rt,Pe,jt,He,Ft;return T=new Ql({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),C=new f({props:{title:"MCP Environment Lifecycle",local:"mcp-environment-lifecycle",headingTag:"h1"}}),w=new f({props:{title:"The Short Answer",local:"the-short-answer",headingTag:"h2"}}),L=new f({props:{title:"The Two Boundaries",local:"the-two-boundaries",headingTag:"h2"}}),I=new f({props:{title:"How MCP Environments Handle Actions",local:"how-mcp-environments-handle-actions",headingTag:"h2"}}),U=new Xl({props:{code:"ZnJvbSUyMG9wZW5lbnYuY29yZS5lbnZfc2VydmVyLm1jcF90eXBlcyUyMGltcG9ydCUyMENhbGxUb29sQWN0aW9uJTJDJTIwTGlzdFRvb2xzQWN0aW9uJTBBJTBBb2JzJTIwJTNEJTIwZW52LnN0ZXAoTGlzdFRvb2xzQWN0aW9uKCkpJTBBJTBBb2JzJTIwJTNEJTIwZW52LnN0ZXAoJTBBJTIwJTIwJTIwJTIwQ2FsbFRvb2xBY3Rpb24oJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwdG9vbF9uYW1lJTNEJTIyZWNob19tZXNzYWdlJTIyJTJDJTBBJTIwJTIwJTIwJTIwJTIwJTIwJTIwJTIwYXJndW1lbnRzJTNEJTdCJTIybWVzc2FnZSUyMiUzQSUyMCUyMkhlbGxvJTIyJTdEJTJDJTBBJTIwJTIwJTIwJTIwKSUwQSk=",highlighted:`<span class="hljs-keyword">from</span> openenv.core.env_server.mcp_types <span class="hljs-keyword">import</span> CallToolAction, ListToolsAction
obs = env.step(ListToolsAction())
obs = env.step(
CallToolAction(
tool_name=<span class="hljs-string">&quot;echo_message&quot;</span>,
arguments={<span class="hljs-string">&quot;message&quot;</span>: <span class="hljs-string">&quot;Hello&quot;</span>},
)
)`,lang:"python",wrap:!1}}),S=new f({props:{title:"Why step() May Look Like It Is Not Running",local:"why-step-may-look-like-it-is-not-running",headingTag:"h2"}}),D=new f({props:{title:"What list_tools() and call_tool() Actually Do",local:"what-listtools-and-calltool-actually-do",headingTag:"h2"}}),V=new f({props:{title:"Client behavior",local:"client-behavior",headingTag:"h3"}}),le=new f({props:{title:"Direct MCP behavior",local:"direct-mcp-behavior",headingTag:"h3"}}),oe=new f({props:{title:"Which Pattern Should You Use?",local:"which-pattern-should-you-use",headingTag:"h2"}}),de=new f({props:{title:"Concrete Examples",local:"concrete-examples",headingTag:"h2"}}),Ce=new f({props:{title:"Recommended Mental Model",local:"recommended-mental-model",headingTag:"h2"}}),we=new f({props:{title:"Debugging Checklist",local:"debugging-checklist",headingTag:"h2"}}),be=new f({props:{title:"Related Reading",local:"related-reading",headingTag:"h2"}}),Pe=new Yl({props:{source:"https://github.com/huggingface/openenv/blob/main/docs/source/guides/mcp-environment-lifecycle.md"}}),{c(){h=s("meta"),Je=i(),ge=s("p"),Ie=i(),r(T.$$.fragment),ke=i(),r(C.$$.fragment),Ee=i(),$=s("p"),$.textContent=Ot,Ae=i(),x=s("p"),x.innerHTML=Zt,Ue=i(),r(w.$$.fragment),qe=i(),y=s("p"),y.textContent=Dt,We=i(),M=s("ul"),M.innerHTML=Gt,Se=i(),_=s("p"),_.textContent=Qt,Be=i(),b=s("p"),b.textContent=Yt,ze=i(),r(L.$$.fragment),Re=i(),P=s("p"),P.textContent=Xt,je=i(),g=s("ul"),g.innerHTML=Vt,Fe=i(),H=s("p"),H.textContent=Kt,Ne=i(),J=s("ul"),J.innerHTML=el,Oe=i(),r(I.$$.fragment),Ze=i(),k=s("p"),k.innerHTML=tl,De=i(),E=s("p"),E.textContent=ll,Ge=i(),A=s("p"),A.textContent=nl,Qe=i(),r(U.$$.fragment),Ye=i(),q=s("p"),q.textContent=il,Xe=i(),W=s("ul"),W.innerHTML=ol,Ve=i(),r(S.$$.fragment),Ke=i(),B=s("p"),B.textContent=sl,et=i(),z=s("p"),z.innerHTML=al,tt=i(),R=s("ul"),R.innerHTML=cl,lt=i(),j=s("p"),j.innerHTML=rl,nt=i(),F=s("p"),F.innerHTML=pl,it=i(),N=s("p"),N.textContent=dl,ot=i(),O=s("ul"),O.innerHTML=ul,st=i(),Z=s("p"),Z.innerHTML=ml,at=i(),r(D.$$.fragment),ct=i(),G=s("p"),G.innerHTML=vl,rt=i(),Q=s("p"),Q.textContent=fl,pt=i(),Y=s("ul"),Y.innerHTML=hl,dt=i(),X=s("p"),X.textContent=Tl,ut=i(),r(V.$$.fragment),mt=i(),K=s("p"),K.innerHTML=Cl,vt=i(),ee=s("ul"),ee.innerHTML=$l,ft=i(),te=s("p"),te.innerHTML=xl,ht=i(),r(le.$$.fragment),Tt=i(),ne=s("p"),ne.innerHTML=wl,Ct=i(),ie=s("p"),ie.innerHTML=yl,$t=i(),r(oe.$$.fragment),xt=i(),se=s("p"),se.innerHTML=Ml,wt=i(),ae=s("ul"),ae.innerHTML=_l,yt=i(),ce=s("p"),ce.innerHTML=bl,Mt=i(),re=s("p"),re.textContent=Ll,_t=i(),pe=s("ul"),pe.innerHTML=Pl,bt=i(),r(de.$$.fragment),Lt=i(),ue=s("p"),ue.textContent=gl,Pt=i(),me=s("ul"),me.innerHTML=Hl,gt=i(),ve=s("p"),ve.textContent=Jl,Ht=i(),fe=s("ul"),fe.innerHTML=Il,Jt=i(),he=s("p"),he.textContent=kl,It=i(),Te=s("p"),Te.textContent=El,kt=i(),r(Ce.$$.fragment),Et=i(),$e=s("p"),$e.textContent=Al,At=i(),xe=s("ol"),xe.innerHTML=Ul,Ut=i(),r(we.$$.fragment),qt=i(),ye=s("p"),ye.textContent=ql,Wt=i(),Me=s("ol"),Me.innerHTML=Wl,St=i(),_e=s("p"),_e.textContent=Sl,Bt=i(),r(be.$$.fragment),zt=i(),Le=s("ul"),Le.innerHTML=Bl,Rt=i(),r(Pe.$$.fragment),jt=i(),He=s("p"),this.h()},l(e){const t=Dl("svelte-u9bgzb",document.head);h=a(t,"META",{name:!0,content:!0}),t.forEach(l),Je=o(e),ge=a(e,"P",{}),zl(ge).forEach(l),Ie=o(e),p(T.$$.fragment,e),ke=o(e),p(C.$$.fragment,e),Ee=o(e),$=a(e,"P",{"data-svelte-h":!0}),c($)!=="svelte-imgxth"&&($.textContent=Ot),Ae=o(e),x=a(e,"P",{"data-svelte-h":!0}),c(x)!=="svelte-hfme07"&&(x.innerHTML=Zt),Ue=o(e),p(w.$$.fragment,e),qe=o(e),y=a(e,"P",{"data-svelte-h":!0}),c(y)!=="svelte-1e6us6d"&&(y.textContent=Dt),We=o(e),M=a(e,"UL",{"data-svelte-h":!0}),c(M)!=="svelte-14d8d6z"&&(M.innerHTML=Gt),Se=o(e),_=a(e,"P",{"data-svelte-h":!0}),c(_)!=="svelte-151yegk"&&(_.textContent=Qt),Be=o(e),b=a(e,"P",{"data-svelte-h":!0}),c(b)!=="svelte-1qo8f93"&&(b.textContent=Yt),ze=o(e),p(L.$$.fragment,e),Re=o(e),P=a(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-amolun"&&(P.textContent=Xt),je=o(e),g=a(e,"UL",{"data-svelte-h":!0}),c(g)!=="svelte-14v4dym"&&(g.innerHTML=Vt),Fe=o(e),H=a(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-1p4vv0o"&&(H.textContent=Kt),Ne=o(e),J=a(e,"UL",{"data-svelte-h":!0}),c(J)!=="svelte-1x8egja"&&(J.innerHTML=el),Oe=o(e),p(I.$$.fragment,e),Ze=o(e),k=a(e,"P",{"data-svelte-h":!0}),c(k)!=="svelte-b86j2v"&&(k.innerHTML=tl),De=o(e),E=a(e,"P",{"data-svelte-h":!0}),c(E)!=="svelte-rffmpi"&&(E.textContent=ll),Ge=o(e),A=a(e,"P",{"data-svelte-h":!0}),c(A)!=="svelte-h8oh8e"&&(A.textContent=nl),Qe=o(e),p(U.$$.fragment,e),Ye=o(e),q=a(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-15evgqz"&&(q.textContent=il),Xe=o(e),W=a(e,"UL",{"data-svelte-h":!0}),c(W)!=="svelte-1209afg"&&(W.innerHTML=ol),Ve=o(e),p(S.$$.fragment,e),Ke=o(e),B=a(e,"P",{"data-svelte-h":!0}),c(B)!=="svelte-yrqbu8"&&(B.textContent=sl),et=o(e),z=a(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-1qvswzu"&&(z.innerHTML=al),tt=o(e),R=a(e,"UL",{"data-svelte-h":!0}),c(R)!=="svelte-1hs443m"&&(R.innerHTML=cl),lt=o(e),j=a(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-1cc0ul4"&&(j.innerHTML=rl),nt=o(e),F=a(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-qshmoi"&&(F.innerHTML=pl),it=o(e),N=a(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-1o69lsa"&&(N.textContent=dl),ot=o(e),O=a(e,"UL",{"data-svelte-h":!0}),c(O)!=="svelte-1hkxn6d"&&(O.innerHTML=ul),st=o(e),Z=a(e,"P",{"data-svelte-h":!0}),c(Z)!=="svelte-7b2fh2"&&(Z.innerHTML=ml),at=o(e),p(D.$$.fragment,e),ct=o(e),G=a(e,"P",{"data-svelte-h":!0}),c(G)!=="svelte-49mxjv"&&(G.innerHTML=vl),rt=o(e),Q=a(e,"P",{"data-svelte-h":!0}),c(Q)!=="svelte-7q5enq"&&(Q.textContent=fl),pt=o(e),Y=a(e,"UL",{"data-svelte-h":!0}),c(Y)!=="svelte-1dugaf7"&&(Y.innerHTML=hl),dt=o(e),X=a(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-nyxqdw"&&(X.textContent=Tl),ut=o(e),p(V.$$.fragment,e),mt=o(e),K=a(e,"P",{"data-svelte-h":!0}),c(K)!=="svelte-1k1er2d"&&(K.innerHTML=Cl),vt=o(e),ee=a(e,"UL",{"data-svelte-h":!0}),c(ee)!=="svelte-ly6eqv"&&(ee.innerHTML=$l),ft=o(e),te=a(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-11uoxqc"&&(te.innerHTML=xl),ht=o(e),p(le.$$.fragment,e),Tt=o(e),ne=a(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-1en3uh7"&&(ne.innerHTML=wl),Ct=o(e),ie=a(e,"P",{"data-svelte-h":!0}),c(ie)!=="svelte-lcq2hq"&&(ie.innerHTML=yl),$t=o(e),p(oe.$$.fragment,e),xt=o(e),se=a(e,"P",{"data-svelte-h":!0}),c(se)!=="svelte-1ke5fxc"&&(se.innerHTML=Ml),wt=o(e),ae=a(e,"UL",{"data-svelte-h":!0}),c(ae)!=="svelte-67294v"&&(ae.innerHTML=_l),yt=o(e),ce=a(e,"P",{"data-svelte-h":!0}),c(ce)!=="svelte-11l21r8"&&(ce.innerHTML=bl),Mt=o(e),re=a(e,"P",{"data-svelte-h":!0}),c(re)!=="svelte-9cazei"&&(re.textContent=Ll),_t=o(e),pe=a(e,"UL",{"data-svelte-h":!0}),c(pe)!=="svelte-z2d9yo"&&(pe.innerHTML=Pl),bt=o(e),p(de.$$.fragment,e),Lt=o(e),ue=a(e,"P",{"data-svelte-h":!0}),c(ue)!=="svelte-1s0yekq"&&(ue.textContent=gl),Pt=o(e),me=a(e,"UL",{"data-svelte-h":!0}),c(me)!=="svelte-788fos"&&(me.innerHTML=Hl),gt=o(e),ve=a(e,"P",{"data-svelte-h":!0}),c(ve)!=="svelte-cmwpev"&&(ve.textContent=Jl),Ht=o(e),fe=a(e,"UL",{"data-svelte-h":!0}),c(fe)!=="svelte-fdx47n"&&(fe.innerHTML=Il),Jt=o(e),he=a(e,"P",{"data-svelte-h":!0}),c(he)!=="svelte-1hjvux1"&&(he.textContent=kl),It=o(e),Te=a(e,"P",{"data-svelte-h":!0}),c(Te)!=="svelte-itvl95"&&(Te.textContent=El),kt=o(e),p(Ce.$$.fragment,e),Et=o(e),$e=a(e,"P",{"data-svelte-h":!0}),c($e)!=="svelte-1ow9wng"&&($e.textContent=Al),At=o(e),xe=a(e,"OL",{"data-svelte-h":!0}),c(xe)!=="svelte-h56o9t"&&(xe.innerHTML=Ul),Ut=o(e),p(we.$$.fragment,e),qt=o(e),ye=a(e,"P",{"data-svelte-h":!0}),c(ye)!=="svelte-pi237b"&&(ye.textContent=ql),Wt=o(e),Me=a(e,"OL",{"data-svelte-h":!0}),c(Me)!=="svelte-152ui9x"&&(Me.innerHTML=Wl),St=o(e),_e=a(e,"P",{"data-svelte-h":!0}),c(_e)!=="svelte-blq74p"&&(_e.textContent=Sl),Bt=o(e),p(be.$$.fragment,e),zt=o(e),Le=a(e,"UL",{"data-svelte-h":!0}),c(Le)!=="svelte-1i32593"&&(Le.innerHTML=Bl),Rt=o(e),p(Pe.$$.fragment,e),jt=o(e),He=a(e,"P",{}),zl(He).forEach(l),this.h()},h(){Rl(h,"name","hf:doc:metadata"),Rl(h,"content",Kl)},m(e,t){Gl(document.head,h),n(e,Je,t),n(e,ge,t),n(e,Ie,t),d(T,e,t),n(e,ke,t),d(C,e,t),n(e,Ee,t),n(e,$,t),n(e,Ae,t),n(e,x,t),n(e,Ue,t),d(w,e,t),n(e,qe,t),n(e,y,t),n(e,We,t),n(e,M,t),n(e,Se,t),n(e,_,t),n(e,Be,t),n(e,b,t),n(e,ze,t),d(L,e,t),n(e,Re,t),n(e,P,t),n(e,je,t),n(e,g,t),n(e,Fe,t),n(e,H,t),n(e,Ne,t),n(e,J,t),n(e,Oe,t),d(I,e,t),n(e,Ze,t),n(e,k,t),n(e,De,t),n(e,E,t),n(e,Ge,t),n(e,A,t),n(e,Qe,t),d(U,e,t),n(e,Ye,t),n(e,q,t),n(e,Xe,t),n(e,W,t),n(e,Ve,t),d(S,e,t),n(e,Ke,t),n(e,B,t),n(e,et,t),n(e,z,t),n(e,tt,t),n(e,R,t),n(e,lt,t),n(e,j,t),n(e,nt,t),n(e,F,t),n(e,it,t),n(e,N,t),n(e,ot,t),n(e,O,t),n(e,st,t),n(e,Z,t),n(e,at,t),d(D,e,t),n(e,ct,t),n(e,G,t),n(e,rt,t),n(e,Q,t),n(e,pt,t),n(e,Y,t),n(e,dt,t),n(e,X,t),n(e,ut,t),d(V,e,t),n(e,mt,t),n(e,K,t),n(e,vt,t),n(e,ee,t),n(e,ft,t),n(e,te,t),n(e,ht,t),d(le,e,t),n(e,Tt,t),n(e,ne,t),n(e,Ct,t),n(e,ie,t),n(e,$t,t),d(oe,e,t),n(e,xt,t),n(e,se,t),n(e,wt,t),n(e,ae,t),n(e,yt,t),n(e,ce,t),n(e,Mt,t),n(e,re,t),n(e,_t,t),n(e,pe,t),n(e,bt,t),d(de,e,t),n(e,Lt,t),n(e,ue,t),n(e,Pt,t),n(e,me,t),n(e,gt,t),n(e,ve,t),n(e,Ht,t),n(e,fe,t),n(e,Jt,t),n(e,he,t),n(e,It,t),n(e,Te,t),n(e,kt,t),d(Ce,e,t),n(e,Et,t),n(e,$e,t),n(e,At,t),n(e,xe,t),n(e,Ut,t),d(we,e,t),n(e,qt,t),n(e,ye,t),n(e,Wt,t),n(e,Me,t),n(e,St,t),n(e,_e,t),n(e,Bt,t),d(be,e,t),n(e,zt,t),n(e,Le,t),n(e,Rt,t),d(Pe,e,t),n(e,jt,t),n(e,He,t),Ft=!0},p:Fl,i(e){Ft||(u(T.$$.fragment,e),u(C.$$.fragment,e),u(w.$$.fragment,e),u(L.$$.fragment,e),u(I.$$.fragment,e),u(U.$$.fragment,e),u(S.$$.fragment,e),u(D.$$.fragment,e),u(V.$$.fragment,e),u(le.$$.fragment,e),u(oe.$$.fragment,e),u(de.$$.fragment,e),u(Ce.$$.fragment,e),u(we.$$.fragment,e),u(be.$$.fragment,e),u(Pe.$$.fragment,e),Ft=!0)},o(e){m(T.$$.fragment,e),m(C.$$.fragment,e),m(w.$$.fragment,e),m(L.$$.fragment,e),m(I.$$.fragment,e),m(U.$$.fragment,e),m(S.$$.fragment,e),m(D.$$.fragment,e),m(V.$$.fragment,e),m(le.$$.fragment,e),m(oe.$$.fragment,e),m(de.$$.fragment,e),m(Ce.$$.fragment,e),m(we.$$.fragment,e),m(be.$$.fragment,e),m(Pe.$$.fragment,e),Ft=!1},d(e){e&&(l(Je),l(ge),l(Ie),l(ke),l(Ee),l($),l(Ae),l(x),l(Ue),l(qe),l(y),l(We),l(M),l(Se),l(_),l(Be),l(b),l(ze),l(Re),l(P),l(je),l(g),l(Fe),l(H),l(Ne),l(J),l(Oe),l(Ze),l(k),l(De),l(E),l(Ge),l(A),l(Qe),l(Ye),l(q),l(Xe),l(W),l(Ve),l(Ke),l(B),l(et),l(z),l(tt),l(R),l(lt),l(j),l(nt),l(F),l(it),l(N),l(ot),l(O),l(st),l(Z),l(at),l(ct),l(G),l(rt),l(Q),l(pt),l(Y),l(dt),l(X),l(ut),l(mt),l(K),l(vt),l(ee),l(ft),l(te),l(ht),l(Tt),l(ne),l(Ct),l(ie),l($t),l(xt),l(se),l(wt),l(ae),l(yt),l(ce),l(Mt),l(re),l(_t),l(pe),l(bt),l(Lt),l(ue),l(Pt),l(me),l(gt),l(ve),l(Ht),l(fe),l(Jt),l(he),l(It),l(Te),l(kt),l(Et),l($e),l(At),l(xe),l(Ut),l(qt),l(ye),l(Wt),l(Me),l(St),l(_e),l(Bt),l(zt),l(Le),l(Rt),l(jt),l(He)),l(h),v(T,e),v(C,e),v(w,e),v(L,e),v(I,e),v(U,e),v(S,e),v(D,e),v(V,e),v(le,e),v(oe,e),v(de,e),v(Ce,e),v(we,e),v(be,e),v(Pe,e)}}}const Kl='{"title":"MCP Environment Lifecycle","local":"mcp-environment-lifecycle","sections":[{"title":"The Short Answer","local":"the-short-answer","sections":[],"depth":2},{"title":"The Two Boundaries","local":"the-two-boundaries","sections":[],"depth":2},{"title":"How MCP Environments Handle Actions","local":"how-mcp-environments-handle-actions","sections":[],"depth":2},{"title":"Why step() May Look Like It Is Not Running","local":"why-step-may-look-like-it-is-not-running","sections":[],"depth":2},{"title":"What list_tools() and call_tool() Actually Do","local":"what-listtools-and-calltool-actually-do","sections":[{"title":"Client behavior","local":"client-behavior","sections":[],"depth":3},{"title":"Direct MCP behavior","local":"direct-mcp-behavior","sections":[],"depth":3}],"depth":2},{"title":"Which Pattern Should You Use?","local":"which-pattern-should-you-use","sections":[],"depth":2},{"title":"Concrete Examples","local":"concrete-examples","sections":[],"depth":2},{"title":"Recommended Mental Model","local":"recommended-mental-model","sections":[],"depth":2},{"title":"Debugging Checklist","local":"debugging-checklist","sections":[],"depth":2},{"title":"Related Reading","local":"related-reading","sections":[],"depth":2}],"depth":1}';function en(Nt){return Nl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class sn extends Ol{constructor(h){super(),Zl(this,h,en,Vl,jl,{})}}export{sn as component};

Xet Storage Details

Size:
21.8 kB
·
Xet hash:
470f5bd8311e0a4bea0bc7d798c8f0859c0750ce5e9445c6e89d0188c4c0fc17

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.