agent-tool-mcp-builder

Design and validate MCP server tool schemas for LLM agent integration.

9|3|Updated Jun 13, 2026
One-click install
npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill agent-tool-mcp-builder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-tool-mcp-builder
Source: https://github.com/Sir-chawakorn/sanook-cli/tree/main/skills/agent-tool-mcp-builder
Command: npx skills add https://github.com/Sir-chawakorn/sanook-cli --skill agent-tool-mcp-builder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the challenges of building Model Context Protocol (MCP) servers and defining tool schemas that LLMs can reliably use without misrouting, hallucinating arguments, or bloating the context window.

Core Features & Use Cases

  • Schema Optimization: Provides best practices for defining input schemas, tool descriptions, and discriminated result shapes to ensure high model accuracy.
  • Context Management: Implements strategies for result summarization, pagination, and efficient data formats like CSV/YAML to prevent context exhaustion.
  • Use Case: When building a custom MCP server for a database, use this skill to design tools that return paginated summaries rather than raw dumps, ensuring the agent stays within its token budget.

Quick Start

Use the agent-tool-mcp-builder skill to review my current tool definitions and suggest improvements for better model routing and context efficiency.

Frequently Asked Questions about agent-tool-mcp-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design MCP server tool schemas for LLM agent integration?

To design MCP server tool schemas for LLM agents, define strict JSON-RPC compliant input schemas and discriminated result shapes. This ensures reliable function calls, prevents argument hallucination, and maintains technical compliance for agent-facing interfaces.

Why does my LLM agent hallucinate arguments when using custom MCP tools?

LLM agents hallucinate arguments when MCP tool schemas lack strict validation or clear descriptions. Optimizing tool definitions with precise input schemas and discriminated result shapes improves model routing accuracy and prevents misrouting during AI-driven automation.

What's the best way to prevent context exhaustion when an MCP server returns large datasets?

To prevent context exhaustion when an MCP server returns large datasets, implement result summarization, pagination, and efficient data formats like CSV or YAML. This prevents context window bloat and keeps the agent within its token budget.

How do I validate MCP tool definitions against JSON-RPC standards?

You validate MCP tool definitions against JSON-RPC standards by enforcing strict schema validation requirements on input parameters and error-handling patterns. This ensures your server architecture maintains technical compliance for agent-facing interfaces.

When do I need to use discriminated result shapes in MCP tool schemas?

You need discriminated result shapes in MCP tool schemas when defining complex outputs that an LLM must parse accurately. This schema optimization technique ensures high model accuracy by providing clear, predictable structures for agent integration.