Skip to main content
>_ supraj.dev
TOPIC AI
MCP & Function Calling how models talk to your systems
IN 10 SECONDS

Function calling lets models output structured JSON actions representing function arguments. Model Context Protocol (MCP) standardizes how models connect to local file systems.

GOTCHA Models only output structured JSON calls — they cannot run terminal commands directly. Your application code must execute the actual command.
HOW AN API INTERACTION FLOWS
01 User Prompt asks: 'Check the disk space in my server'.
02 JSON decision model outputs: { 'name': 'check_disk', 'arguments': {} } instead of text.
03 Local Execute application parses arguments, runs local script, and returns result to model.
04 Final answer model reads script output and answers user: 'Your server has 14GB free'.
POKE IT YOURSELF
npx -y @modelcontextprotocol/server-sqlite — launch an MCP database server node