Weavz
New in Weavz

Your AI agent doesn't need
200+ tool definitions

Code Mode replaces hundreds of individual MCP tools with 3 meta-tools. Your agent explores APIs on demand, writes code, and executes — using 80-98% less context.

The problem with standard MCP

Traditional MCP servers dump every tool definition into your agent's context window upfront — even if the agent only needs one.

Standard TOOLS Mode

// MCP tools/list response with 31 pieces:
{
  "tools": [
    // Slack (15 tools)
    "slack__send_message",
    "slack__send_dm",
    "slack__list_channels",    // helper
    "slack__list_users",       // helper
    "slack__update_message",
    "slack__add_reaction",
    // ... 9 more Slack tools

    // Google Sheets (12 tools)
    "google_sheets__append_row",
    "google_sheets__get_rows",
    "google_sheets__list_spreadsheets", // helper
    // ... 9 more

    // GitHub (18 tools)
    // Gmail (10 tools)
    // ... 25 more pieces

    // Total: 200+ tool definitions
    // Each with full JSON Schema input
    // = 50,000+ tokens in context
  ]
}
  • 200+ 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 pieces & 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 200+ definitions
  • ~500 tokens initial context (98% reduction)
  • Agent explores only the APIs it needs
  • Multi-step workflows in a single code execution

Three tools. That's all your agent needs.

Code Mode turns integration discovery into a natural explore → learn → execute workflow.

1

weavz_search

Discover

Agent searches for relevant integrations by name or keyword. Returns a compact list of available pieces and their actions.

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

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

weavz_read_api

Learn

Agent fetches TypeScript declarations for a specific piece. Gets fully-typed function signatures with parameter details.

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

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

weavz_execute

Execute

Agent writes and runs code in a sandboxed environment. Can compose multiple actions, handle errors, and persist state.

await mcp.callTool("weavz_execute", {
  code: `
    const channels = await weavz.$options(
      "slack", "send_message", "channel"
    );
    await weavz.slack.send_message({
      channel: channels.options[0].value,
      text: "Deployed successfully!"
    });
  `
});

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

The numbers speak for themselves

98%

Less initial context

~500 tokens vs 50,000+

3

Tools instead of 200+

search, read, execute

1

Call for multi-step flows

Compose in weavz_execute

31

Integrations available

All accessible via code

Why agents prefer Code Mode

Code Mode isn't just smaller — it's a fundamentally better way for AI agents to interact with APIs.

Natural reasoning flow

Agents think in explore → understand → act patterns. Code Mode maps directly to this with search → read → execute.

Multi-step composition

Fetch from Google Sheets, transform data, send to Slack — all in a single weavz_execute call instead of 3 separate tool calls.

TypeScript-guided

Agents get fully-typed declarations with JSDoc comments. Better than guessing parameter names from JSON Schema descriptions.

Faster task completion

Less context noise means agents find the right action faster. Fewer wasted turns scanning irrelevant tool definitions.

Persistent state

weavz.$storage lets agents save state between executions. Build iterative workflows that remember previous results.

On-demand loading

Agent loads API details only for pieces it actually needs. 31 pieces available but only 1-2 loaded per task.

See it in action

A real workflow: an AI agent syncing Google Sheets data to Slack, with error handling and persistent state.

weavz_execute
// Step 1: Read last sync timestamp
const state = await weavz.$storage.read("sync-state.json");
const lastSync = state ? JSON.parse(state).timestamp : 0;

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

// Step 3: Filter to new entries since last sync
const newRows = rows.values.filter(row =>
  new Date(row[4]).getTime() > lastSync
);

if (newRows.length === 0) {
  return { message: "No new orders since last sync" };
}

// Step 4: Format and send summary to Slack
const summary = newRows
  .map(r => `• ${r[0]}: ${r[1]} — $${r[2]}`)
  .join("\n");

await weavz.slack.send_message({
  channel: "#orders",
  text: `📦 ${newRows.length} new orders:\n${summary}`
});

// Step 5: Update sync state
await weavz.$storage.write("sync-state.json",
  JSON.stringify({ timestamp: Date.now(), count: newRows.length })
);

return { synced: newRows.length, timestamp: Date.now() };

Give your AI agent superpowers

Code Mode is available on all plans, including Free. Start building with 1,000 actions/month — no credit card required.