MCP tool calls and local models

I’m exploring what a chat application needs to work with local files.

Snowy city street lit by streetlamps

A small server that carries messages over WebSocket has three distinct layers: the user message, generating a model response, and running a tool when needed.

I try to keep the call flow easy to follow. Validating the model’s tool request, checking the tool and its parameters, returning the result to the model, and delivering the final response to the user are separate steps. Tool output and the model’s interpretation serve different purposes.

YouTube player