Page languageFrançaisEnglish
Teacher area
Laurent PoupetClaude trainer and artificial intelligence architectStudent area

Category · Tools and protocols

What is function calling?

Function calling is when the model asks for a function, described by a schema, to be run. The model does not run it; the code does, and sends the result back. The code also decides whether the call is allowed.

By , Claude trainer and artificial intelligence architect · Updated

How it works

  • The available functions are described to the model in every request, with a parameter schema, and it can request several at once when they are independent.
  • The model can get the arguments wrong; its proposal is therefore always validated against the schema before running, and the error is sent back if it needs fixing.
  • It is the basic building block shared by almost all model interfaces, and it is what MCP (Model Context Protocol) standardises between applications and tool servers.

The trap to avoid

The trap is handing it the permissions; the code decides whether the call is allowed for this user, never the model.

Related terms

Where this is taught

Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.

See the full program

All glossary terms

Trial lesson · 30 min · $20

Book (new tab)