CP

cameronking4/programmatic-tool-calling-ai-sdk

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

19 stars 2 forks 품질 55 트렌드 10

⚡ LLM inference 비용 80% 프로그램 도구 호출. N 툴 콜 라운드 스트립 대신, Vercel Sandbox의 관현악 도구에 JavaScript를 생성합니다.

개요

lLM inference 비용과 대기시간을 극적으로 줄일 수 있는 새로운 접근법으로 코드 생성 및 샌드박스 실행을 호출하는 기존의 멀티라운드 트립 툴을 대체하여 대기시간을 단축합니다. Anthropic의 베타 기능은 11월 2025일 발표되었습니다. 이 프로젝트는 AI 게이트웨이를 통해 100+ 모델을 포함하여 Vercel AI SDK를 통해 작업하는 패러다임이 확장됩니다. 전통적인 LLM 도구 호출은 MCP와 특히: PTC는 단일 코드 생성 + 실행으로 툴 오케스트라를 변환합니다. - : Anthropic Claude, OpenAI GPT - : 100+ 모델 (Gemini, Mistral, Groq, DeepSeek, Meta 등) - 도구 호출 지원 - LLM-generated 코드에 대한 격리 된 클라우드 환경 - 노드.

개요(AI 번역)

어떤 모형을 위한 보편적인 LLM 최적화 POC

Programmatic Tool Calling는 코드 생성 및 샌드박스 실행을 호출하는 기존의 멀티 라운드 스트립 도구를 대체함으로써 LLM 인워싱 비용과 대기 시간을 극적으로 줄일 수있는 새로운 방법입니다.

Áthropic의 베타 기능은 11월 2025일 발표되었습니다. 이 프로젝트는 Vercel AI SDK를 통해 ** 어떤 LLM**와 함께 작동하기 위해 paradigm을 확장합니다.


문제

전통적인 LLM 도구 호출은 **가장 효율적으로 **, 특히 MCP :

✨ 해결책

PTC는 단일 코드 생성 + 실행으로 툴 오케스트라를 변환합니다.


Pro Proven 효율성 이익

미터 전통 PTC 개선
LLM Round-trips N(per tool) 2(fixed) 90% 감소
콘텍스 성장 공시정보 공시 85 % 효율
인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션 인포메이션
Latency 연속 병렬 3-5배
MCP Tool Calls N 왕복 1 code execution 60-80% 절감

️ 건축


! 키 기능

☸ 모형 지원

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

🚀 Programmatic Tool Calling with AI SDK

A Universal LLM Optimization POC for Any Model

Programmatic Tool Calling is a novel approach to dramatically reduce LLM inference costs and latency by replacing traditional multi-round-trip tool calling with code generation and sandboxed execution.

💡 Inspired by Anthropic’s beta capabilities announced November 2025. This project extends that paradigm to work with any LLM through the Vercel AI SDK, including 100+ models via the AI Gateway.


🎯 The Problem

Traditional LLM tool calling is inherently inefficient, especially with MCP:

User: "Get data for users 1-5 and find the highest scorer"

Traditional Approach (N round-trips):
┌─────────────────────────────────────────────────────────────┐
│ Round 1: LLM → getUser(1) → result → LLM (context grows)    │
│ Round 2: LLM → getUser(2) → result → LLM (context grows)    │
│ Round 3: LLM → getUser(3) → result → LLM (context grows)    │
│ Round 4: LLM → getUser(4) → result → LLM (context grows)    │
│ Round 5: LLM → getUser(5) → result → LLM (context grows)    │
│ Round 6: LLM → final answer                                  │
└─────────────────────────────────────────────────────────────┘
                         ⬇️
            6 LLM calls × full context each
            Accumulated results pollute context
            High latency, high token cost

✨ The Solution

PTC transforms tool orchestration into a single code generation + execution:

Programmatic Approach (1 round-trip):
┌─────────────────────────────────────────────────────────────┐
│ Round 1: LLM generates JavaScript:                          │
│   const users = await Promise.all([                         │
│     getUser({ id: '1' }), getUser({ id: '2' }),             │
│     getUser({ id: '3' }), getUser({ id: '4' }),             │
│     getUser({ id: '5' })                                    │
│   ]);                                                        │
│   return users.sort((a,b) => b.score - a.score)[0];         │
│                                                              │
│ → Execute in Sandbox → Return final result only             │
│                                                              │
│ Round 2: LLM receives final answer, responds to user        │
└─────────────────────────────────────────────────────────────┘
                         ⬇️
            2 LLM calls total
            Intermediate results never enter context
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →