3rd-Eden logo3rd-Eden3rd-Eden

Principal Engineer

← Back to Blog
October 2025

The true power of MCP

The Model Context Protocol provides a way of exposing additional functionality to LLM, but it's not as easy as you might think

Quote

"The real magic isn't in the connection itself, but in the intelligence we embed within the protocol." — Arnout Kazemier

Introduction

If you are actually reading this, we are currently in development of our blog post, and this is generated markup content for content testing through our CMS. Hang tight.

The Model Context Protocol (MCP) has revolutionized how Large Language Models interact with external systems. But here's what most developers miss: the true power of MCP isn't just about exposing tools and resources—it's about guiding LLMs through rich descriptions, parameter schemas, and embedded instructions.

Quick Navigation

  1. →
    Core Concepts
  2. →
    The Hidden Layer of Intelligence
  3. →
    Practical Implementation
  4. →
    Advanced Patterns
  5. →
    Conclusion

Core Concepts {#core-concepts}

Let's start with the basics. An MCP server provides three main components:

  • →
    Tools - Executable functions the LLM can invoke
  • →
    Resources - Data sources the LLM can read
  • →
    Prompts - Reusable instruction templates

But here's where it gets interesting. Each component carries metadata that shapes LLM behavior:

Tool Descriptions That Guide

typescript
const tool = {
  name: "analyze_sentiment",
  description: [
    "Analyzes sentiment with nuanced understanding.",
    "",
    "IMPORTANT: This tool considers cultural context and sarcasm.",
    "Use for: customer feedback, social media posts, reviews",
    "Avoid for: legal documents, technical specifications",
    "",
    "Returns confidence scores - treat <0.7 as uncertain."
  ].join("\n"),
  
  inputSchema: {
    type: "object",
    properties: {
      text: {
        type: "string",
        description: "Text to analyze (max 1000 chars)",
        maxLength: 1000
      },
      context: {
        type: "string",
        enum: ["social_media", "formal_review", "casual_chat"],
        description: "Helps calibrate sarcasm detection"
      }
    }
  }
}

Notice how the description isn't just "analyzes sentiment"—it's a mini instruction manual that helps the LLM make intelligent decisions about when and how to use the tool.

The Hidden Layer of Intelligence {#the-hidden-layer}

1. Parameter Schemas as Guardrails

Your parameter schemas do more than validate input—they teach the LLM about your domain:

Schema ElementTraditional ViewMCP Power User View
enum valuesInput validationDomain vocabulary teaching
description fieldsDocumentationBehavioral guidance
required arraysValidation rulesPriority signals
default valuesConvenienceSuggested approaches

2. Resource Descriptions as Context

Resources aren't just data endpoints. Their descriptions establish semantic relationships:

json
{
  "uri": "customer://segments/high-value",
  "name": "High-Value Customer Segments",
  "description": "Customers with LTV >$10k. When querying this resource,
                  always cross-reference with churn_risk resource for
                  complete picture. Updated daily at 2 AM UTC.",
  "mimeType": "application/json"
}

3. The Instruction Embedding Pattern

Here's a powerful pattern most developers overlook—embedding instructions directly in your MCP server configuration:

javascript
class SmartMCPServer {
  constructor() {
    this.serverInfo = {
      name: "analytics-mcp",
      version: "2.0.0",
      instructions: [
        "## Analytics MCP Server Guidelines",
        "",
        "This server provides analytics capabilities with these principles:",
        "",
        "1. **Data Privacy First**: Never log personally identifiable information",
        "2. **Aggregation Default**: Prefer aggregated data over individual records",
        "3. **Time Zone Awareness**: All timestamps are UTC unless specified",
        "",
        "### Query Optimization Rules",
        "- Batch similar requests when possible",
        "- Cache results for 5 minutes",
        "- Use pagination for results >100 items",
        "",
        "### Error Handling",
        "- Retry transient failures up to 3 times",
        "- Provide user-friendly error messages",
        "- Log errors with correlation IDs"
      ].join("\n")
    };
  }
}

Practical Implementation {#practical-implementation}

Let's look at a real-world example that leverages all these concepts:

**Click to expand full implementation**
typescript
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = new Server({
  name: "knowledge-base-mcp",
  version: "1.0.0"
}, {
  capabilities: {
    tools: {},
    resources: {}
  }
});

// Tool with rich guidance
server.setRequestHandler("tools/list", async () => ({
  tools: [{
    name: "search_knowledge",
    description: [
      "Searches the knowledge base with semantic understanding.",
      "",
      "SEARCH STRATEGY:",
      "- Start broad, then refine with filters",
      "- Use AND for required terms, OR for alternatives",
      "- Wrap phrases in quotes for exact matches",
      "",
      "PERFORMANCE NOTES:",
      "- First query may take 2-3 seconds (cold start)",
      "- Subsequent queries cached for 60 seconds",
      "- Max 50 results per query",
      "",
      "BEST PRACTICES:",
      "- Include context in query for better relevance",
      "- Use filters to narrow large result sets",
      "- Check 'confidence' score in results"
    ].join("\n"),
    inputSchema: {
      type: "object",
      required: ["query"],
      properties: {
        query: {
          type: "string",
          description: "Search query using natural language or operators"
        },
        filters: {
          type: "object",
          description: "Optional filters to refine results",
          properties: {
            category: {
              type: "string",
              enum: ["documentation", "tutorials", "api", "troubleshooting"],
              description: "Content category - tutorials include code examples"
            },
            recency: {
              type: "string",
              enum: ["day", "week", "month", "all"],
              default: "all",
              description: "How recent content should be"
            }
          }
        }
      }
    }
  }]
}));

// Resource with embedded relationships
server.setRequestHandler("resources/list", async () => ({
  resources: [{
    uri: "knowledge://recent-updates",
    name: "Recent Documentation Updates",
    description: [
      "Latest changes to documentation (last 30 days).",
      "",
      "RELATIONSHIPS:",
      "- Check 'knowledge://deprecated' for removed features",
      "- Cross-reference with 'knowledge://migration-guides'",
      "",
      "UPDATE FREQUENCY: Every 4 hours",
      "FORMAT: Chronological, newest first",
      "INCLUDES: Breaking changes marked with [BREAKING]"
    ].join("\n"),
    mimeType: "application/json"
  }]
}));

const transport = new StdioServerTransport();
await server.connect(transport);

Advanced Patterns {#advanced-patterns}

Pattern 1: Progressive Disclosure

Start with simple descriptions, but include markers for advanced usage:

javascript
description: "Calculate pricing for service.\n" +
  "\n" +
  "Basic: provide 'service_type' and 'quantity'\n" +
  "Advanced: include 'discount_codes[]' and 'bulk_pricing_tier'\n" +
  "Enterprise: add 'contract_id' for negotiated rates"

Pattern 2: Behavioral Hints Through Examples

Embed examples that demonstrate proper usage patterns:

javascript
description: [
  "Generates reports in various formats.",
  "",
  "Example sequences:",
  "1. check_data_availability() -> generate_report() -> email_report()",
  "2. generate_report(draft=true) -> review -> generate_report(final=true)",
  "",
  "Note: Always check data availability first to avoid partial reports."
].join("\n")

Pattern 3: Cross-Tool Orchestration

Guide the LLM to combine tools effectively:

javascript
const tools = [
  {
    name: "fetch_user_data",
    description: "Step 1: Fetch user data. Output includes 'session_id' needed for step 2."
  },
  {
    name: "analyze_behavior", 
    description: "Step 2: Requires 'session_id' from fetch_user_data."
  },
  {
    name: "generate_recommendations",
    description: "Step 3: Uses output from analyze_behavior. Can run parallel with send_notifications."
  }
];

Performance Optimization Tips

⚡ Quick Wins for MCP Servers:

  • →
    Cache resource descriptions—they rarely change
  • →
    Use streaming for large responses
  • →
    Implement request batching where possible
  • →
    Add rate limiting with informative error messages
  • →
    Include timing hints in descriptions

Common Pitfalls to Avoid

⚠️ Warning: These mistakes can severely limit your MCP server's effectiveness:

  1. →
    Generic descriptions → Be specific about capabilities and limitations
  2. →
    Assuming LLM knowledge → Explicitly state domain rules
  3. →
    Ignoring error cases → Provide clear guidance for error handling
  4. →
    Flat parameter schemas → Use nested objects to show relationships
  5. →
    Missing examples → Include usage patterns in descriptions

Real-World Success Story

Quote

Case Study: E-commerce Platform Integration

Challenge: LLM consistently used wrong API endpoints for inventory checks

Solution: Embedded routing logic in tool descriptions:

"For items with SKU starting with 'D': use digital_inventory For items with SKU starting with 'P': use physical_inventory For bundles (SKU contains '-B'): check both inventories"

Result: 94% reduction in incorrect API calls

Testing Your MCP Implementation

Here's a checklist for validating your MCP server's intelligence layer:

Basic Tests

  • →
    Tools have clear descriptions
  • →
    Parameters include validation rules
  • →
    Resources specify update frequency

Advanced Tests

  • →
    Descriptions include usage examples
  • →
    Cross-tool dependencies are documented
  • →
    Error scenarios have guidance
  • →
    Performance characteristics are noted
  • →
    Domain rules are explicitly stated

Code Snippet Library

**Useful MCP Patterns** (click to expand)

Conditional Tool Availability

typescript
if (userTier === 'premium') {
  tools.push({
    name: "advanced_analytics",
    description: "Premium feature: Deep analytics with ML insights"
  });
}

Dynamic Resource Generation

python
def generate_resource_list(user_context):
    resources = []
    for dataset in user_context.accessible_datasets:
        resources.append({
            "uri": f"data://{dataset.id}",
            "description": f"Access level: {dataset.permission_level}"
        })
    return resources

Smart Error Messages

javascript
catch (error) {
  return {
    error: {
      code: "RATE_LIMIT",
      message: "Rate limit exceeded",
      hint: "Use batch operations for multiple items",
      retry_after: 60
    }
  };
}

Conclusion {#conclusion}

The true power of MCP lies not in the plumbing but in the intelligence layer you build through:

  1. →
    Rich descriptions that guide LLM behavior
  2. →
    Parameter schemas that teach domain rules
  3. →
    Embedded instructions that ensure consistent usage
  4. →
    Relationship mapping between tools and resources

Remember: Your MCP server is not just an API bridge—it's an intelligent guide that shapes how LLMs understand and interact with your system.


Next Steps

Ready to build smarter MCP servers? Here are your action items:

  1. →
    Audit your existing descriptions—are they guiding or just documenting?
  2. →
    Embed domain knowledge in your schemas
  3. →
    Test with different LLMs to ensure guidance is universal
  4. →
    Monitor usage patterns and refine descriptions based on real behavior
  5. →
    Share your patterns with the MCP community

Additional Resources

  • →
    Official MCP Documentation
  • →
    MCP SDK on GitHub
  • →
    Community Patterns Repository
  • →
    MCP Server Examples

Found this helpful? Check out more MCP patterns in our AIchemy Knowledge Base or connect with the community on Discord.

MCP Architecture Diagram Figure 1: MCP Server Intelligence Layer Architecture


Tags: #MCP #ModelContextProtocol #LLM #AI #Development #BestPractices

Last Updated: October 3, 2025 | Reading Time: 8 minutes | Difficulty: Intermediate


© 2025 AIchemy. This work is licensed under CC BY-SA 4.0

Comments (0)

Comment on GitHub

No comments yet.

Opinions expressed are solely my own and do not express the views or opinions of my employer—including the firmly held belief that spaces are superior to tabs.