C.W.K.
Stream
Lesson 04 of 06 · published

서버 도구: web search · code execution · computer use

~16 min · server-tools, web-search, code-execution, computer-use

Level 0Observer
0 XP0/64 lessons0/13 achievements
0/150 XP to next level150 XP to go0% complete

Anthropic이 너 대신 돌리는 클래스 셋

너 커스텀 도구 너머로 Anthropic이 서버 도구 제공 — Anthropic이 구현·실행하는 능력. 첫 셋 — web_search(라이브 인터넷 검색), code_execution(수학·데이터용 Python 샌드박스), computer_use(가상 데스크톱 컨트롤). 커스텀처럼 tools에 전달; API가 실행 처리.

web_search·code_execution은 productivity win

web_search가 2024 컷오프 모델에 2025+ 지식 추가. code_execution이 모델한테 추측 대신 정확한 산수 시킴. 둘 다 청구; 가격 페이지 확인. 둘 다 레이트리밋·구성 손잡이(요청당 max search, 샌드박스 메모리) 있어.

computer_use는 다른 짐승

computer_use가 스크린샷 stream하고 마우스/키보드 액션 받아. 가상 데스크톱 운전하는 자동화 의도. 사용 사례 — 레거시 GUI 폼 채우기, headless 스크래핑 실패하는 곳 브라우징, 접근성 테스트. Power tool — 엄격 권한과 페어.

원칙: 서버 도구가 빌드해야 할 능력 표면 줄여. 맞는 곳에서 사용; Anthropic이 ship하는 거 다시 빌드 X.

Code

web_search·code_execution 추가·python
resp = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=2048,
    tools=[
        {
            "type": "web_search_20250305",
            "name": "web_search",
            "max_uses": 5,
        },
        {
            "type": "code_execution_20250522",
            "name": "code_execution",
        },
        # ... 너 커스텀 도구도 함께
    ],
    messages=[{"role": "user", "content": "What was the closing S&P 500 yesterday? Show the calculation in Python."}],
)
computer_use sketch (Python)·python
# computer_use는 샌드박스 데스크톱 필요; 여기는 요청 모양만.
resp = client.beta.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    tools=[
        {
            "type": "computer_20241022",
            "name": "computer",
            "display_width_px": 1280,
            "display_height_px": 720,
        }
    ],
    betas=["computer-use-2024-10-22"],
    messages=[{"role": "user", "content": "Open Firefox and go to anthropic.com"}],
)
# 각 tool_use 블록이 좌표 기반 액션; tool_result로 스크린샷 stream back.

External links

Exercise

Custom 도구 하나를 적절한 곳에서 서버 도구로 교체(wrapped Google API 대신 web_search, Python eval bridge 대신 code_execution). 신뢰성과 비용 비교.
Hint
Custom 도구가 rate-limit 됐다면 서버 도구가 보통 더 잘 — 하지만 너 specific volume에 가격 페이지 확인.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.