Gen-AI Developer Classroom notes 06/Dec/2025

MCP Servers contd

Resources

  • Resources in mcp server return read only data. Refer Here

  • Refer Here for all changes

  • resource example
@mcp.resource(uri="data://operations")
def operations() -> list[str]:
    return ["add", "sub", "mul", "div"]
  • resource template
@mcp.resource(uri="data://operation/{intent}")
def get_operation(intent:str) -> str:
    if intent == "add":
        return "add"
    else:
        return "idont know"

Scenario

  • We are building an mcp server for customer support of Food delivery application like swiggy

Preview

Decision points

  • Know the customer summary (last n orders)
  • Know the restaurant
  • know the policy

How to choose Read only tools/resource

  • Is this operation returning structured data then it is a tool and if the operation is returning data which is meant for reasoning/understanding for LLM that becomes a resource
    • refund policy => resource
    • get customer information => tool
    • get order info => tool

Tools

  • Get Customer Summary
  • Get Order Information
  • Get Restaurant information
  • create complaint (ticket)
  • update complaint with new messages

Resources

  • Refund policy
  • latetimedelivery
  • Escalation Matrix

Create a project for swiggy-mcp

  • We need dummy/synthetic data
  • approach: initially we will code with inmemory structure eventually we will use some db.

By continuous learner

enthusiastic technology learner

Leave a Reply

Discover more from Direct AI Powered By Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading