MCP Catalogs
Home

programmatic-tool-calling-ai-sdk

by cameronking4·17·Score 42

An MCP-enabled SDK that reduces LLM costs 80% by replacing tool calls with generated JavaScript executed in Vercel Sandbox.

ai-llmdeveloper-toolsproductivity
2
Forks
0
Open issues
6 mo ago
Last commit
2d ago
Indexed

Overview

Programmatic Tool Calling AI SDK is an innovative approach to optimize LLM interactions by reducing multiple round-trip tool calls to a single code generation and execution. It wraps MCP tools and local tools, then generates JavaScript code to orchestrate them efficiently in an isolated Vercel environment. The solution supports Anthropic, OpenAI, and 100+ models via AI Gateway, showing significant improvements in token usage (80% reduction), latency (3-5x faster), and context efficiency.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Reducing costs for applications requiring multiple LLM tool calls
you:Optimizing MCP tool orchestration with parallel execution
you:Building efficient AI applications with Vercel Sandbox isolation
you:How does this reduce LLM costs by 80%?
you:What MCP transport protocols are supported?

When to choose this

Choose this when you need to optimize costs and performance for applications requiring multiple tool calls, especially when working with both local tools and MCP servers.

When NOT to choose this

Don't choose this if you can't use Vercel services (Sandbox requires Vercel account) or if you need strict tool execution guarantees rather than code generation.

Tools this server exposes

4 tools extracted from the README
  • getUser

    Get user by ID

  • calculateAverage

    Calculate average of numbers

  • mcp_firecrawl_scrape

    Scrape URL content using Firecrawl MCP

  • mcp_github_search

    Search GitHub repositories using MCP

Note: Tool names inferred from usage examples and architecture diagram. MCP tools appear to be dynamically injected through the MCP Bridge.

Comparable tools

openai-toolsanthropic-toolsai-sdk

Installation

# Install the published package
npm install @task-orchestrator/programmatic-tools

# Required peer dependencies
npm install ai@^5.0.0 @vercel/sandbox@^1.0.0 zod@^3.0.0 ms@^2.1.0

# Optional MCP support
npm install @ai-sdk/mcp@^0.0.11

For Claude Desktop MCP server configuration:

{
  "mcpServers": {
    "programmatic-tools": {
      "command": "node",
      "args": ["path/to/programmatic-tools/mcp.js"]
    }
  }
}

FAQ

How does this reduce LLM costs by 80%?
Instead of N round-trips between LLM and tools, it generates JavaScript code that orchestrates all tools in a single execution, reducing LLM calls from N to ~2 total.
What MCP transport protocols are supported?
HTTP, SSE, and Stdio transports are supported with normalization for predictable code access across different MCP servers.

Compare programmatic-tool-calling-ai-sdk with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.