Skip to main content

Code Execution (Claude)

The Code Execution (Claude) tool (anthropic_code_execution) enables Claude to run code in a secure sandbox. This makes calculations, data analysis and automation possible.

Only in assistants, lessons and workflows

Code execution is always off in standard chats, even if the environment or your personal settings say otherwise. Switch the tool on in the tool settings of an assistant, lesson or workflow that needs calculations or file editing. Code execution can take longer and add costs.

How it works​

Claude can write code and run it immediately for calculations, analyses and file processing. The results are integrated into the answer.

Usage examples​

  • "Calculate the monthly depreciation for this asset"
  • "Analyse this dataset and identify trends"
  • "Create a chart of our quarterly figures"
  • "Process this CSV file and generate a report"

Settings​

SettingValue
Tool keyanthropic_code_execution
Default statusAuto
Available forSuitable Claude models

Capabilities​

Calculations​

  • Financial calculations (ROI, NPV, IRR)
  • Statistical analyses
  • Mathematical models
  • Scenario analyses

Data analysis​

  • CSV and Excel processing
  • Trend analysis
  • Aggregations and summaries
  • Data transformations

Visualisations​

  • Graphs and charts
  • Dashboards
  • Reports with visuals

Business applications​

  • Finance: Financial models, budgeting, forecasting
  • Sales: Pipeline analysis, forecast models
  • Operations: KPI calculations, efficiency analyses
  • HR: Headcount planning, staff turnover figures

Security​

  • Isolated execution environment
  • No access to external systems
  • Temporary file storage
  • Enterprise-grade security