Loading...
    • 빌드
    • 관리
    • 모델 및 가격
    • 클라이언트 SDK
    • API 참조
    Search...
    ⌘K
    첫 단계
    Claude 소개빠른 시작
    Claude로 빌드하기
    기능 개요Messages API 사용Claude API 스킬중지 이유 처리
    모델 기능
    Extended thinkingAdaptive thinking노력작업 예산 (베타)빠른 모드 (베타: 연구 미리보기)구조화된 출력인용메시지 스트리밍배치 처리검색 결과거부 스트리밍다국어 지원임베딩
    도구
    개요도구 사용 방식웹 검색 도구웹 가져오기 도구코드 실행 도구어드바이저 도구메모리 도구Bash 도구컴퓨터 사용 도구텍스트 편집기 도구
    도구 인프라
    도구 참조도구 검색프로그래밍 방식 도구 호출세분화된 도구 스트리밍
    컨텍스트 관리
    컨텍스트 윈도우압축컨텍스트 편집프롬프트 캐싱토큰 계산
    파일 작업
    Files APIPDF 지원이미지 및 비전
    스킬
    개요빠른 시작모범 사례엔터프라이즈용 스킬API의 스킬
    MCP
    원격 MCP 서버MCP 커넥터
    프롬프트 엔지니어링
    개요프롬프팅 모범 사례Console 프롬프팅 도구
    테스트 및 평가
    성공 정의 및 평가 구축Console에서 평가 도구 사용지연 시간 감소
    보안 강화
    환각 감소출력 일관성 증가탈옥 완화프롬프트 유출 감소
    리소스
    용어집
    릴리스 노트
    Claude Platform
    Console
    Log in
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...
    Loading...

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Partners

    • Amazon Bedrock
    • Google Cloud's Vertex AI

    Learn

    • Blog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Learn

    • Blog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Help and security

    • Availability
    • Status
    • Support
    • Discord

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    도구

    Claude를 사용한 도구 사용

    Claude를 외부 도구 및 API에 연결합니다. 도구가 실행되는 위치와 에이전트 루프의 작동 방식을 알아봅니다.

    도구 사용을 통해 Claude는 사용자가 정의한 함수 또는 Anthropic이 제공하는 함수를 호출할 수 있습니다. Claude는 사용자의 요청과 도구의 설명을 기반으로 도구를 호출할 시기를 결정한 후, 애플리케이션이 실행하는(클라이언트 도구) 또는 Anthropic이 실행하는(서버 도구) 구조화된 호출을 반환합니다.

    다음은 Anthropic이 실행을 처리하는 서버 도구를 사용한 가장 간단한 예입니다:

    import anthropic
    
    client = anthropic.Anthropic()
    response = client.messages.create(
        model="claude-opus-4-7",
        max_tokens=1024,
        tools=[{"type": "web_search_20260209", "name": "web_search"}],
        messages=[{"role": "user", "content": "What's the latest on the Mars rover?"}],
    )
    print(response.content)

    도구 사용의 작동 방식

    도구는 주로 코드가 실행되는 위치에 따라 다릅니다. 클라이언트 도구(사용자 정의 도구 및 bash, text_editor와 같은 Anthropic 스키마 도구 포함)는 애플리케이션에서 실행됩니다: Claude는 stop_reason: "tool_use"와 하나 이상의 tool_use 블록으로 응답하고, 코드가 작업을 실행한 후 tool_result를 다시 보냅니다. 서버 도구(web_search, code_execution, web_fetch, tool_search)는 Anthropic의 인프라에서 실행됩니다: 실행을 처리하지 않고도 결과를 직접 볼 수 있습니다.

    에이전트 루프를 포함한 전체 개념 모델과 각 접근 방식을 선택할 시기에 대해서는 도구 사용의 작동 방식을 참조하세요.

    MCP 서버에 연결하려면 MCP 커넥터를 참조하세요. 자신의 MCP 클라이언트를 구축하려면 modelcontextprotocol.io를 참조하세요.

    엄격한 도구 사용으로 스키마 준수 보장

    도구 정의에 strict: true를 추가하여 Claude의 도구 호출이 항상 스키마와 정확히 일치하도록 합니다. 엄격한 도구 사용을 참조하세요.

    도구 접근은 에이전트에게 제공할 수 있는 가장 높은 영향력의 기본 요소 중 하나입니다. LAB-Bench FigQA(과학 그림 해석) 및 SWE-bench(실제 소프트웨어 엔지니어링)와 같은 벤치마크에서 기본 도구를 추가하기만 해도 인간 전문가 기준선을 능가하는 경우가 많으며, 비정상적인 능력 향상을 가져옵니다.


    도구 사용 예제

    완전한 실습 안내는 튜토리얼을 참조하세요. 개별 개념의 참조 예제는 도구 정의 및 도구 호출 처리를 참조하세요.


    가격 책정

    Tool use requests are priced based on:

    1. The total number of input tokens sent to the model (including in the tools parameter)
    2. The number of output tokens generated
    3. For server-side tools, additional usage-based pricing (e.g., web search charges per search performed)

    Client-side tools are priced the same as any other Claude API request, while server-side tools may incur additional charges based on their specific usage.

    The additional tokens from tool use come from:

    • The tools parameter in API requests (tool names, descriptions, and schemas)
    • tool_use content blocks in API requests and responses
    • tool_result content blocks in API requests

    When you use tools, we also automatically include a special system prompt for the model which enables tool use. The number of tool use tokens required for each model are listed below (excluding the additional tokens listed above). Note that the table assumes at least 1 tool is provided. If no tools are provided, then a tool choice of none uses 0 additional system prompt tokens.

    ModelTool choiceTool use system prompt token count
    Claude Opus 4.7auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Opus 4.6auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Opus 4.5auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Opus 4.1auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Opus 4auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Sonnet 4.6auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Sonnet 4.5auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Sonnet 4auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Sonnet 3.7 (deprecated)auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Haiku 4.5auto, none
    any, tool
    346 tokens
    313 tokens
    Claude Haiku 3.5auto, none
    any, tool
    264 tokens
    340 tokens
    Claude Opus 3 (deprecated)auto, none
    any, tool
    530 tokens
    281 tokens
    Claude Sonnet 3auto, none
    any, tool
    159 tokens
    235 tokens
    Claude Haiku 3auto, none
    any, tool
    264 tokens
    340 tokens

    These token counts are added to your normal input and output tokens to calculate the total cost of a request.

    현재 모델별 가격은 모델 개요 표를 참조하세요.

    도구 사용 프롬프트를 보낼 때, 다른 API 요청과 마찬가지로 응답은 보고된 usage 메트릭의 일부로 입력 및 출력 토큰 수를 모두 출력합니다.


    다음 단계

    경로 선택

    개념 이해

    도구가 실행되는 위치, 루프의 작동 방식, 도구를 사용할 시기.

    단계별 구축

    튜토리얼: 단일 도구 호출에서 프로덕션까지.

    모든 도구 찾아보기

    Anthropic 제공 도구 및 속성의 디렉토리.

    Was this page helpful?