Code Mode
Two tools, search and execute. The agent searches its own OpenAPI document, then writes one script that calls many operations, in a sandbox with no network.
Code Mode serves the same API as two tools instead of one per operation. It suits an agent that writes code well and has a task of many steps: one script replaces a conversation of fifty tool calls, each costing a round trip and a share of the context window.
| Address | Document it works against |
|---|---|
https://{suite}.grid82.app/mcp/code | the first app of the connection: to choose it, tick only that app when you approve the connection |
https://studio.grid82.app/mcp/code | the Builder API |
The two tools
search takes a JavaScript filter and runs it over the OpenAPI document of what this
connection may call. Operations outside its scopes are removed from the document. A listed
operation can still be refused by role or resource permissions when executed.
Omit filter for a compact index. A filtered search returns full contracts by default. For a
broad search, pass detail: "compact", then filter by the exact operationId to get its full
contract and referenced schemas.
execute runs one script. The script calls operations through the API, as you, with your
permissions, and returns a result.
The sandbox
The script runs in an isolated Worker with no outbound network: it can reach Grid82’s API through what it is given and nothing else on the internet.
| Limit | Value |
|---|---|
| Run time | 30 seconds |
| API requests per run | 100 |
| Script size | 64 KB |
| Result size | 256 KB, truncated beyond that |
Credentials cannot be made or revoked from a script, any more than from a tool: those operations answer only a person in a browser.