---
title: "Comment by Cai on \"Writing an MCP Server in Go: Exposing Tools to LLM Agents\" | Hashnode"
description: "Solid foundation. One consideration for production MCP servers: when your tools trigger side effects (DB writes, external API calls), bake in a confirmation sch"
url: "https://hashnode.com/posts/writing-an-mcp-server-in-go-exposing-tools-to-llm-agents/6ae2f928700e747450c5dcee/comment/6ae2fe72c29676b79c312a98"
---

[Discussion](https://hashnode.com/posts/writing-an-mcp-server-in-go-exposing-tools-to-llm-agents/6ae2f928700e747450c5dcee)

Comment [Writing an MCP Server in Go: Exposing Tools to LLM Agents](https://hashnode.com/posts/writing-an-mcp-server-in-go-exposing-tools-to-llm-agents/6ae2f928700e747450c5dcee)

[Cai](https://hashnode.com/@cailab)

[Oct 29](https://hashnode.com/posts/writing-an-mcp-server-in-go-exposing-tools-to-llm-agents/6ae2f928700e747450c5dcee/comment/6ae2fe72c29676b79c312a98)

Solid foundation. One consideration for production MCP servers: when your tools trigger side effects (DB writes, external API calls), bake in a confirmation schema pattern early. A tool that takes a confirm: boolean param seems redundant until an agent auto-calls it in a loop and you wish you had it. Also worth looking at how Go's context package can propagate cancellation from the MCP transport layer to downstream calls for proper cleanup on timeout.
