# Filter the tools from MCP servers

DevFeed: [Filter the tools from MCP servers](<https://devfeed.tech/articles/filter-the-tools-from-mcp-servers-21742.md>)

Original publisher: [Read original article](<http://blog.pamelafox.org/2025/09/filter-tools-from-mcp-servers.html>)

Author: Pamela Fox (noreply@blogger.com)

Published: 2025-09-18T17:35:00Z

Content type: tutorial

Language: en

Sources: [Pamela Fox](<https://devfeed.tech/sources/pamela-fox.md>)

Topics: [Model Context Protocol (MCP)](<https://devfeed.tech/topics/model-context-protocol-mcp.md>), [GitHub Copilot](<https://devfeed.tech/topics/github-copilot.md>), [agentic-coding](<https://devfeed.tech/topics/agentic-coding.md>), [vs-code](<https://devfeed.tech/topics/vs-code.md>), [LangChain](<https://devfeed.tech/topics/langchain.md>), [Pydantic](<https://devfeed.tech/topics/pydantic.md>)

Tags: [agentic-coding](<https://devfeed.tech/tags/agentic-coding.md>), [github-copilot](<https://devfeed.tech/tags/github-copilot.md>), [langchain](<https://devfeed.tech/tags/langchain.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [mcp-server](<https://devfeed.tech/tags/mcp-server.md>), [openai](<https://devfeed.tech/tags/openai.md>), [python](<https://devfeed.tech/tags/python.md>), [vs-code](<https://devfeed.tech/tags/vs-code.md>)

## AI overview

A tutorial on filtering tools exposed by MCP servers to reduce LLM confusion, token usage, latency, context-window pressure, and unintended destructive actions. It covers GitHub Copilot in VS Code, LangChain v1, and Pydantic AI.

## Source excerpt

What I like about MCP servers: they give me lots of great tools that can make my agents more powerful, with very little work on my side. 🎉 What I don't like about MCP servers: they give me TOO many tools! I usually only need a handful of tools for a task, but a server can expose dozens. 😿 The problems with too many tools: LLM confusion. The LLM will be presented with the tool definition for every single tool in the server, and it needs to decide which tool (if any) is the best for the job. That's a hard decision for an LLM - it's always better to make it easier for the LLM by narrowing the tool list. Increased tokens. The tool call definitions require more tokens, which can cost more money, increase latency, and potentially even go over the context window limit of the model. Destructive actions. A server may include tools that are read-only, just sending down data to serve as context, but many servers expose tools that do write operations, like the GitHub MCP server's tools for creating issues, closing issues, pushing branches, and many more. It's possible your task requires some of those write ops, but you generally want to be very explicit about whether an agent is allowed to take action that can actually change something about your accounts and environments. Otherwise, you can be in for a nasty surprise when the agent took actions that you weren't expecting. (Ask me how I know...) Fortunately, there is almost always a way to configure agents to only allow a subset of the tools from an MCP server. In this blog post, I'll share ways to filter tools in my favorite agentic coder, GitHub Copilot in VS Code, plus two popular AI agent frameworks, Langchain v1 and Pydantic AI. Agentic coding with GitHub Copilot in VS Code Global configuration When you are using agent mode in VS Code, configure the tools by selecting the gear icon near the chat input window. That will pop-up a window showing all your available tools, coming from both installed MCP servers and VS Code exte