Skip to main content

Tools: Building AI Capabilities

Async Tools

0:00
LearnStep 1/4

Async Tool Basics

Async Tools in FastMCP

FastMCP fully supports async tools for I/O-bound operations like API calls, database queries, and file operations.

Basic Async Tool

python

Sync vs Async

python

When to Use Async

  • HTTP requests (use httpx or aiohttp)
  • Database queries (async drivers)
  • File I/O (use aiofiles)
  • Any network operation