eavz
Code-Mode MCP

Typed integration access
for AI agents

Standard MCP: 3,600+ tool definitions loaded upfront, 50,000+ tokens burned.

Code-Mode: 3 tools, ~500 tokens, typed JavaScript in a sandbox.

Standard MCP does not scale

Add 10 integrations to an MCP server in TOOLS mode. That is 200+ tool definitions, each with full JSON Schema, loaded before the agent sends its first message. Most of those tokens are wasted.

Standard TOOLS Mode

// MCP tools/list response:
{
  "tools": [
    // Slack (15 tools)
    "slack__send_channel_message",
    "slack__send_direct_message",
    "slack__list_channels",       // helper
    "slack__list_users",          // helper
    "slack__update_message",
    // ... 10 more Slack tools

    // Google Sheets (12 tools)
    "google_sheets__append_row",
    "google_sheets__get_rows",
    // ... 10 more

    // GitHub, Gmail, Salesforce...
    // 500+ more integrations

    // Total: 3,600+ tool definitions
    // Each with full JSON Schema
    // = 50,000+ tokens in context
  ]
}
  • 3,600+ tool definitions loaded upfront
  • 50,000+ tokens consumed before the agent does anything
  • Agent wastes turns scanning irrelevant tools
  • Each tool call = 1 action, no multi-step composition

Weavz CODE Mode

Recommended
// MCP tools/list response in CODE mode:
{
  "tools": [
    "weavz_search",    // Discover integrations & actions
    "weavz_read_api",  // Get TypeScript declarations
    "weavz_execute"    // Run code in sandbox
  ]
}

// That's it. 3 tools. ~500 tokens.
// The agent loads API details on demand.
  • 3 meta-tools replace 3,600+ definitions
  • ~500 tokens initial context (98% reduction)
  • Agent explores only the APIs it needs
  • Multi-step workflows in a single code execution

Search. Read. Execute. That is the entire API surface.

The agent discovers integrations, fetches TypeScript declarations for the ones it needs, then writes and runs code in a sandbox. No upfront loading.

1

weavz_search

Discover

Returns a compact list of matching integrations and their action names. Costs a few hundred tokens, not thousands.

// "I need to send a Slack message"
await mcp.callTool("weavz_search", {
  query: "slack"
});

// Returns:
// Slack (slack) — 6 actions
//   send_channel_message, send_direct_message,
//   update_message, add_reaction,
//   create_channel, get_channel_history
2

weavz_read_api

Learn

Returns TypeScript declarations with function signatures, parameter types, and JSDoc descriptions. The agent knows exactly what to call.

await mcp.callTool("weavz_read_api", {
  integration: "slack"
});

// Returns TypeScript declarations:
// declare namespace weavz.slack {
//   function send_channel_message(input: {
//     channel: string; // Use $options()
//     text: string;
//     thread_ts?: string;
//   }): Promise<Result>;
// }
3

weavz_execute

Execute

The agent writes JavaScript, it runs in a sandbox, and you get back the return value plus an action trace with timing. Multiple integrations in one call.

await mcp.callTool("weavz_execute", {
  code: `
    const channels = await weavz.$options(
      "slack", "send_channel_message", "channel"
    );
    const general = channels.options
      .find(c => c.label === "general");
    await weavz.slack.send_channel_message({
      channel: general.value,
      text: "Deployed successfully!"
    });
  `
});

// Returns: result + console logs
//        + action trace with timing

Real example: Sheets data to Slack summary

One weavz_execute call. The agent fetches channels via $options, pulls rows from Google Sheets, filters and formats, then posts to Slack. Four API calls, one sandbox execution.

weavz_execute
// Step 1: List Slack channels to find #general
const channels = await weavz.$options(
  "slack", "send_channel_message", "channel"
);
const general = channels.options.find(c => c.label === "general");

// Step 2: Fetch data from Google Sheets
const rows = await weavz.google_sheets.get_rows({
  spreadsheet_id: "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
  sheet_name: "Orders",
  range: "A:E"
});

// Step 3: Filter and transform
const recent = rows.values
  .filter(row => new Date(row[4]) > new Date("2025-01-01"))
  .map(r => `  ${r[0]}: ${r[1]} — $${r[2]}`);

// Step 4: Send formatted summary to Slack
await weavz.slack.send_channel_message({
  channel: general.value,
  text: [
    `${recent.length} orders since Jan 2025:`,
    ...recent,
    `Total: $${recent.reduce((sum, _, i) =>
      sum + parseFloat(rows.values[i][2]), 0).toFixed(2)}`
  ].join("\n")
});

return { sent: recent.length };

Measured, not estimated

0%

Context reduction

~500 tokens vs 50,000+ in TOOLS mode

0

Total tool definitions

weavz_search, weavz_read_api, weavz_execute

0

Call for multi-step workflows

Google Sheets + Slack in one weavz_execute

0+

Actions callable from code

Across 500+ integrations

Why this works better than tool-per-action

Less context noise. Fewer wasted turns. Multi-step composition in a single call. Here is what changes concretely.

Matches how agents think

Agents explore, then understand, then act. Code-Mode maps directly to that: search for integrations, read the API, execute code.

Multi-step in one call

Read rows from Google Sheets, filter them, post a summary to Slack. One weavz_execute call instead of 3 separate tool calls with intermediate parsing.

TypeScript declarations, not JSON Schema

The agent sees weavz.slack.send_channel_message({ channel: string, text: string }) with JSDoc. Clearer than reverse-engineering a JSON Schema blob.

Fewer wasted turns

With TOOLS mode, the agent scans 200+ tool definitions to find the right one. With Code-Mode, it searches by keyword and loads only what it needs.

Persistent state across executions

Storage and KV Store integrations let agents save results between runs. Build workflows that accumulate data over multiple executions.

Transform data inline

Filter arrays, format strings, compute totals -- in JavaScript, inside the sandbox. No separate data transformation tools needed.

3 tools. 2,900+ actions. Try it now.

Code-Mode is on every plan, including Free. 1,000 actions/month, 25 MCP servers. No credit card.