execute
Execute JavaScript against the VaultCord API for anything the curated tools don't cover (there are ~270 endpoints total; the curated toolsets wrap the common ones). First use the 'search' tool to find the right path/method/request body shape, then call this with an async arrow function using vaultcord.request().
Available in your code: async function vaultcord.request({ method, path, query, body }): Promise
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" (default "GET")
path: the OpenAPI path with real values substituted, e.g. "/servers/5180"
query: optional object of query-string params
body: optional JSON-serializable request body
Throws on non-2xx responses and on {success:false} envelopes, with VaultCord's own message included.
Your code must be an async arrow function that returns the result. Example:
async () => { const servers = await vaultcord.request({ path: "/servers" }); return servers.data?.map(s => ({ id: s.id, name: s.name })); }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "execute"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript async arrow function to execute |