← Back to Home
πŸ€–

Tools & the Model Context Protocol

What turns a language model into an agent that can actually do things.

⏱10 min readπŸ“šDevOps Fundamentals

An LLM on its own can only produce text. To act β€” read a file, query an API, restart a service β€” it needs tools. The Model Context Protocol (MCP) is an open standard for connecting models to those tools and data sources in a consistent way. Together they turn a chatbot into a capable agent.


🎯 Learning Objectives

By the end of this lesson you will:


What Is a Tool?

A tool is a function the model is allowed to call. You describe it β€” its name, what it does, and its inputs β€” and the model can choose to invoke it during its reasoning.

json
{
"name": "get_pod_logs",
"description": "Fetch recent logs for a Kubernetes pod",
"parameters": {
  "pod_name": "string",
  "lines": "number"
}
}

Given this description, the model can decide when to call get_pod_logs, with what arguments β€” and then reason over the result.


The Tool-Calling Flow

text
1. Model decides: "I need the logs for web-abc"
2. Model emits:   get_pod_logs(pod_name="web-abc", lines=50)
3. Your code runs the real function
4. Result returned to the model
5. Model reasons over the logs and responds

The crucial point: the model doesn’t run anything itself. It requests a tool call; your code executes it and returns the result. That boundary is where you enforce security and permissions.

⚠ The model requests, you control

Never let a model directly execute commands. It should only ask to call a defined tool; your code validates the request, applies permissions, runs it, and returns the result. This boundary is your primary safety control.


The Problem MCP Solves

Before MCP, every AI app connected to every tool in its own custom way. Ten apps Γ— ten tools meant a hundred bespoke integrations β€” brittle and duplicated.

MCP standardises this. Build an MCP server for a system once (say, a GitHub server or a Kubernetes server), and any MCP-compatible AI app can use it. It’s often described as β€œUSB-C for AI” β€” one standard connector.

text
Without MCP:  every app ↔ every tool  (N Γ— M custom integrations)

With MCP:     apps ─┐                 β”Œβ”€ tools
                  β”œβ”€ MCP standard ───
                  β”˜                 └─

MCP Client and Server

MCP follows a simple client/server model:

Role What it is
MCP Server Exposes tools, data, and prompts for one system (files, GitHub, a database)
MCP Client The AI application that connects to servers and uses their tools

An MCP server can offer three things:

πŸ’‘ Why this matters for DevOps

MCP means you can wire an agent to your real toolchain β€” Git, cloud APIs, monitoring, ticketing β€” through standard servers, instead of gluing together one-off integrations. That’s what makes practical, tool-using DevOps agents feasible.


πŸ§ͺ Hands-on Lab

πŸ“

Define Tools for a DevOps Agent

  1. Describe three tools an incident-response agent would need
  2. For each, write its name, description, and parameters
  3. Note which tool is read-only and which is destructive (and needs approval)

🧠 Knowledge Check

Knowledge Check

When a model 'calls a tool', what actually happens?

Knowledge Check

What problem does the Model Context Protocol (MCP) solve?


πŸ’Ό Interview Preparation

Interview Q&A

Explain how an AI agent safely interacts with real systems through tools and MCP.


Summary

You now understand how tools give a model the power to act, the request/execute safety boundary, and how MCP standardises connecting AI to real systems. Next, we bring it all together with practical, safe uses of agentic AI across DevOps.

Up Next

Agentic AI in DevOps Practice

You've mastered this lesson. Continue your journey to becoming a DevOps Engineer.

Start Next Lesson→