AI / A CONCEPT NOTE

MCP & Function Calling

how models talk to your systems

~70 sec read

Overview · mechanism
pitfall · examples

01 / THE SHORT VERSION

The idea in a few sentences.

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

02 / FOLLOW THE MECHANISM

How an API interaction flows

  1. User Prompt

    asks: 'Check the disk space in my server'.

  2. JSON decision

    model outputs: { 'name': 'check_disk', 'arguments': {} } instead of text.

  3. Local Execute

    application parses arguments, runs local script, and returns result to model.

  4. Final answer

    model reads script output and answers user: 'Your server has 14GB free'.

04 / COMMAND NOTES

Read the command, then the result.

Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.

EXAMPLE 01 · REFERENCE

launch an MCP database server node

npx -y @modelcontextprotocol/server-sqlite

Explore command anatomy in the CLI lab