You should seek the sweet spot between “too many tools” and “too broad tools”.
Effective agents access relevant and specific tools. Model Context Protocol (MCP) servers offer tools chosen by an agent given a context. However, MCP yields suboptimal results when design choices lead to limited tools with too broad a scope, or, at the other extreme, the entire kitchen sink of all possible tools. The former increases Large Language Model (LLM) token usage by requiring more introspection and reasoning and could fail to call the right tool due to broad remit and descriptions. The latter provides specificity but increases overhead through redundant tool definitions that bloat context bloat when presented to an LLM.
Search for Goldilocks in your MCP design.
To address this, automate discovery and design of candidate tools, provide options to filter and weed out unnecessary tools, and then create an MCP server script comprising only eligible tools as deemed by the agent architect and engineer.
The mas-mcp-toolmaker Python package available at https://pypi.org/project/mas-mcp-toolmaker/ does just that, focusing on model inferencing and decision flow execution through the SAS Micro Analytic Service (MAS). MAS is a high performance, multithreaded engine in SAS Viya serving modules at REST API endpoints. Data scientists and engineers use applications like Model Studio, Model Manager and Intelligent Decisioning to create machine learning models, business rules and decision flows, and publish the same to MAS and other publishing destinations.
Given a URL to a SAS Viya environment, this utility lists all MAS endpoints, associates them with their input-output contracts, properties and production-readiness status. Then, it outputs two MCP Server scripts in Python, one using the stdio transport layer and the other customized for use in SAS Retrieval Agent Manager (an agent orchestration offering from SAS).
The result: you get a ready-to-deploy MCP server script which can be quickly accessed by agentic pipelines, AI assistants and copilots, including those available in Visual Studio Code and Claude Code. MCP tool definitions are sourced (with options for further modification and crafting) directly from the upstream model or decision flow’s description, providing an incentive for original AI creators to write MCP-friendly definitions for their artifacts and improving first pass yield of description quality and “docstrings” at an early stage.
Watch the following video for a quick demo and access the utility from the following GitHub repository: https://github.com/SundareshSankaran/mas-mcp-toolmaker . If you have either a SAS Viya Advanced or SAS Viya Enterprise offering, give this a try and feel free to get in touch in case of any questions.
Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.