Understanding MCP server concepts
Building Block | Purpose | Who Controls It | Real-World Example |
---|---|---|---|
Tools | For AI actions | Model-controlled | Search flights, send messages, create calendar events |
Resources | For context data | Application-controlled | Documents, calendars, emails, weather data |
Prompts | For interaction templates | User-controlled | ”Plan a vacation”, “Summarize my meetings”, “Draft an email” |
Method | Purpose | Returns |
---|---|---|
tools/list | Discover available tools | Array of tool definitions with schemas |
tools/call | Execute a specific tool | Tool execution result |
searchFlights
queries multiple airlines and returns structured flight options. Once flights are selected, it creates a calendar event with
file:///path/to/document.md
. They declare MIME types for appropriate content handling and support two discovery patterns: direct resources with fixed URIs, and resource templates with parameterized URIs.
Resource Templates enable dynamic resource access through URI templates. A template like travel://activities/{city}/{category}
would access filtered activity data by substituting both {city}
and {category}
parameters. For example, travel://activities/barcelona/museums
would return all museums in Barcelona. Resource Templates include metadata such as title, description, and expected MIME type, making them discoverable and self-documenting.
Protocol operations:
Method | Purpose | Returns |
---|---|---|
resources/list | List available direct resources | Array of resource descriptors |
resources/templates/list | Discover resource templates | Array of resource template definitions |
resources/read | Retrieve resource contents | Resource data with metadata |
resources/subscribe | Monitor resource changes | Subscription confirmation |
calendar://events/2024
) - To check availabilityfile:///Documents/Travel/passport.pdf
) - For important informationtrips://history/barcelona-2023
) - User selects which past trip style to followorigin
airport and begins to input “Bar” as the destination
airport, the system can suggest “Barcelona (BCN)” or “Barbados (BGI)”.
weather://forecast/{city}
might suggest “Paris” or “Park City”Method | Purpose | Returns |
---|---|---|
prompts/list | Discover available prompts | Array of prompt descriptors |
prompts/get | Retrieve prompt details | Full prompt definition with arguments |
calendar://my-calendar/June-2024
(from Calendar Server)travel://preferences/europe
(from Travel Server)travel://past-trips/Spain-2023
(from Travel Server)