SShortSingh.
Back to feed

How LLMs Discover and Call MCP Tools: The Host-Mediated Lifecycle

0
·7 views

A common misconception is that large language models connect to sockets, run shell commands, or query databases directly, but they are stateless token predictors that cannot make network calls. Instead, tool use via the Model Context Protocol involves four cooperating parts: the host application, the MCP client, the MCP server, and the LLM engine. On startup, the host asks each configured server for its available tools and their JSON schemas over stdio or SSE, and it namespaces tool names when servers overlap. The host then converts those schemas into the vendor-specific tool format the model expects, so the model can match a user's request to a tool description and emit a structured tool-call request. The host intercepts that request, forwards it to the appropriate MCP server, and receives the raw result, which it sanitizes before returning it to the model to compose the final answer.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

CSSForge: Free Tool Generates Layered CSS Shadows and Glassmorphism Code

A developer has released CSSForge, a free, lightweight web tool for creating multi-layered CSS shadows and glassmorphism effects. The article argues that single box-shadows often look harsh, while layered shadows add more depth and realism to UI components. The tool offers real-time previews in dark, light, gradient, and image modes, and exports code as pure CSS, CSS Variables, or Tailwind CSS. It runs entirely on the client side and requires no registration. The developer is also seeking user feedback on interface improvements and additional generators.

0
ProgrammingDEV Community ·

Kuyo: a Japanese-style memorial tool that lays deleted code to rest with local AI epitaphs

Kuyo is a tool that treats deleted source files as the dead, drawing on the Japanese kuyo tradition of memorializing objects that served well. It scans a git repository for removed files, following renames, and records each file's lifespan, time of death, commit size, test coverage, and final commit message. A local Gemma model running on Ollama writes an epitaph for each file, and the results are rendered as a self-contained HTML cemetery. The author demonstrated it on a private repository with 137 deleted files, where the code itself never left the machine. The project offers commands for scanning, burying, consulting a file's ghost, and running as a GitHub Action.

0
ProgrammingDEV Community ·

Apple Unveils 14.2-Inch Touch-Enabled OLED MacBook Pro With Pencil Support

At an October 28, 2026 keynote, Apple introduced a 14.2-inch MacBook Pro with a touch-enabled OLED display, marking a departure from its long-standing no-touch policy. The screen uses a capacitive sensor grid that supports multi-finger gestures and the second-generation Apple Pencil, including pressure and tilt detection. According to the article, the OLED panel offers sub-millisecond response times, 1,200 nits peak brightness, and full DCI-P3 color coverage. Existing macOS apps generally receive touch input automatically, though some may need an update through Apple's Compatibility SDK, and battery life is estimated at about 11 hours under typical use.

0
ProgrammingHacker News ·

Apple Releases Mac Studio With M5 Ultra Chip and 512GB Memory

Apple has officially released a Mac Studio configured with an M5 Ultra chip and 512GB of memory, as listed on its online store. The announcement was shared on Hacker News, where it drew modest early attention with 4 points and one comment. The source material provides only the product listing link and limited discussion metrics, so details such as pricing, shipping dates, and performance benchmarks are not confirmed here. The configuration places the machine in Apple's high-end workstation category, aimed at demanding professional workloads.