Code Execution Tool

Let Claude calculate, reshape data or create an artifact by running code in the platform's sandbox.

Give the tool a bounded job

Supply a small, approved input file and ask for an artifact with a defined format. For example, give Claude a synthetic sales CSV and ask for monthly totals and a chart. Compare its totals with a known calculation before using the workflow on more material.

Check file handling and charges

Review which files the service receives and which artifacts your application retrieves. Anthropic documents no added execution charge when qualifying web search or fetch versions are included, while standard token charges still apply. Other requests can incur execution charges, so refer to the current pricing notes when choosing the tool configuration.

Source documentation

Official Claude documentation