In the previous tutorials we learned MCP Fundamentals (tutorial 1) and the MCP Host, Client & Server architecture (tutorial 2). Now we go deeper into one of the most important parts of MCP: what an MCP server actually exposes to an AI application. The three core concepts you should understand are Tools, Resources and Prompts.
Tutorial 1
MCP Fundamentals
↓
Tutorial 2
MCP Host, Client & Server
↓
Tutorial 3
MCP Tools, Resources & PromptsTOOLS
=
Do something
RESOURCES
=
Read or access something
PROMPTS
=
Reusable instructionsFor an SDET or Playwright engineer, this can mean: a Tool clicks a button, a Resource reads a test specification, and a Prompt provides a predefined test-analysis workflow. Understanding this distinction is fundamental to MCP architecture.
1. Where Tools, Resources, and Prompts Fit
Let's start with the full architecture.
USER
│
▼
AI APPLICATION / MCP HOST
│
▼
MCP CLIENT
│
│ MCP
▼
MCP SERVER
│
├── TOOLS
│
├── RESOURCES
│
└── PROMPTSThe MCP server can expose one or more of these capabilities. The AI application can then discover and use them depending on its needs.
2. What Is an MCP Tool?
An MCP Tool is an executable capability exposed by an MCP server. A tool is used when the AI needs to perform an action.
- Open browser
- Navigate to URL
- Click element
- Type text
- Query database
- Create Jira issue
- Read repository file
- Execute command
3. Playwright Tool Example
Suppose a Playwright MCP server exposes browser-related capabilities. Conceptually, it could expose tools like browser_navigate, browser_click, browser_type and browser_snapshot. The exact names depend on the server implementation.
browser_navigate
browser_click
browser_type
browser_snapshotNow imagine the SDET tells the AI: "Open the login page." The AI reasons: I need browser navigation. Then:
AI
│
▼
MCP Client
│
▼
Playwright MCP Server
│
▼
browser_navigate
│
▼
BrowserThe tool performs the action.
4. Tool Execution Flow
User Request
│
▼
AI Reasoning
│
▼
Select Tool
│
▼
MCP Client
│
▼
MCP Server
│
▼
Execute Tool
│
▼
External System
│
▼
Return Result"Open /login"
│
▼
AI chooses navigation tool
│
▼
browser_navigate
│
▼
Browser opens page
│
▼
Result returned to AI5. Tools Usually Have Inputs
A tool often requires input parameters. Conceptually, the tool browser_navigate takes an input url, and the AI might invoke it with url = https://qa.example.com/login.
Tool:
browser_navigate
Input:
url
Invocation:
url = https://qa.example.com/loginAnother example — a query_database tool with a query input:
SELECT *
FROM products
WHERE product_id = 101;6. Tools Return Results
A tool usually returns some form of result. browser_navigate might return "Page loaded successfully"; query_database might return product_id = 101, name = Laptop, price = 999. The AI can then use the result as a new observation.
Tool Execution
↓
Result
↓
AI Observation
↓
AI Reasoning
↓
Next Action7. Tools Are Important for Agentic AI
Tools are what allow AI agents to move beyond simply generating text.
Without tools:
AI
↓
Explain what you should do
With tools:
AI
↓
Perform action
↓
Observe result
↓
Reason
↓
Perform next actionThink
↓
Act
↓
Observe
↓
Think
↓
Act
↓
Validate8. What Is an MCP Resource?
An MCP Resource represents information or context that can be accessed through an MCP server. Think: Resource = Data or Context. Examples could include files, documents, configuration, schemas, logs, repository content, test specifications and application metadata. A resource is generally something the AI can retrieve and use as context.
9. Resource Example for an SDET
Suppose your test environment has a Product Service Specification. The AI may need to understand required fields, business rules, validation rules, API contracts and expected behavior. That specification could conceptually be available as a resource.
AI
│
▼
MCP Client
│
▼
MCP Server
│
▼
Product Specification ResourceThe AI can retrieve the information and use it for reasoning.
10. Tools vs Resources
This distinction is critical. If the AI needs to read requirements, that might be represented as a Resource (Acceptance Criteria). If the AI needs to test the browser, that might use a Tool (browser_click).
RESOURCE
=
Information
TOOL
=
Action11. Easy Example
Imagine an AI testing agent. It first needs the test specification (Resource: Read Acceptance Criteria), then it needs to interact with the browser (Tool: Open Application), then another tool (Click Add Product), then maybe another resource (Read API Schema). The agent combines information and actions.
RESOURCE
↓
Read Acceptance Criteria
TOOL
↓
Open Application
TOOL
↓
Click Add Product
RESOURCE
↓
Read API Schema12. Resource vs Tool Example with Database
Suppose the system exposes database schema information. A resource might be the products table schema (product_id, name, price, quantity, in_stock) — that provides context. But executing a query could be exposed as a tool: query_database.
Database Schema
=
RESOURCE
Execute SQL
=
TOOLThis is a good way to understand the difference.
13. Resource Identifiers
Resources typically need a way to be identified. The exact format depends on implementation, but the important idea is that a client can identify and retrieve available information.
resource://application/specification
resource://database/schema/products
resource://project/test-plan14. Why Resources Matter for AI
An AI model cannot automatically know your company's requirements, test plans, database schema, internal architecture, business rules or application documentation. Resources can provide that context. Instead of relying only on general model knowledge, the system can supply enterprise context.
AI
+
Application Specification
+
Database Schema
+
Architecture Documentation
+
Test Data RulesThat makes the AI more useful for real enterprise testing.
15. What Is an MCP Prompt?
An MCP Prompt is a reusable prompt template exposed by an MCP server. Think: Prompt = Reusable Instruction. A prompt can help standardize how certain tasks should be performed.
Analyze this failed Playwright test.
Identify the likely cause.
Separate application defects from automation defects.
Recommend the next debugging step.Instead of rewriting the instruction every time, it could be available as a reusable prompt.
16. Prompt Example for SDET
Imagine an MCP server exposes a prompt called analyze_test_failure. Conceptually, it could contain instructions like:
Analyze the failed test.
Check:
- application error
- locator issue
- timeout issue
- environment issue
- test data issue
Return:
- probable root cause
- evidence
- recommended actionNow the AI application can surface or use that standardized workflow.
17. Why Prompts Are Useful
Prompts help teams create consistency. Without standardized prompts, Tester A says "Check why this failed", Tester B says "Analyze this issue", and Tester C says "Debug it" — each instruction could produce different approaches. With a reusable Failure Analysis Prompt, everyone can follow a more standardized process. This can be especially useful in enterprise Quality Engineering.
18. Tools vs Resources vs Prompts
- Tool — perform an action.
- Resource — access data/context.
- Prompt — provide reusable instructions.
TOOL
=
DO
RESOURCE
=
READ
PROMPT
=
INSTRUCT19. Playwright Example Using All Three
Suppose the goal is: "Verify the Product Creation feature." The workflow could use all three MCP capabilities.
RESOURCE
↓
Product Acceptance Criteria
The AI reads:
Product name is mandatory.
Price must be greater than zero.
Admin can create products.PROMPT
↓
Generate Risk-Based Test Scenarios
The AI identifies:
Valid product
Missing product name
Negative price
Unauthorized userTOOLS
↓
Browser Navigation
Click
Type
SubmitThis is a complete MCP-enabled workflow.
20. Complete Example
USER
"Test PRODUCT-101"
│
▼
AI AGENT
│
▼
RESOURCE
Read Acceptance Criteria
│
▼
PROMPT
Generate Test Strategy
│
▼
AI REASONING
│
▼
TOOL
Open Browser
│
▼
TOOL
Login
│
▼
TOOL
Create Product
│
▼
TOOL
Validate Result21. MCP Server Capability Discovery
The MCP client can discover what capabilities a server exposes. This means an AI environment can learn what is available instead of assuming every MCP server provides the same capabilities.
MCP Client
│
│ What do you provide?
▼
MCP Server
│
├── Tools
├── Resources
└── Prompts22. Tool Discovery
Client
│
│ List Tools
▼
ServerA response might conceptually include browser_navigate, browser_click, browser_type and browser_snapshot. Then the AI knows which actions are available.
23. Resource Discovery
Client
│
│ List Resources
▼
ServerPossible results: Application Specification, Test Data Guide, Database Schema, API Contract. The AI can then request one of those resources.
24. Prompt Discovery
The client may also discover reusable prompts.
Client
│
│ List Prompts
▼
Server- Analyze Test Failure
- Generate Test Scenarios
- Review Acceptance Criteria
- Create Defect Summary
25. Enterprise Testing Example
Imagine your enterprise MCP ecosystem contains several servers. Different servers may expose different capabilities.
AI AGENT
│
▼
MCP HOST
│
┌────────────────┼────────────────┐
│ │ │
▼ ▼ ▼
Playwright MCP GitHub MCP Database MCP
Server Server Server26. Playwright MCP Server
Could expose tools such as Navigate, Click, Type, Inspect Page and Take Snapshot. Main purpose: Browser Interaction.
27. GitHub MCP Server
Could expose capabilities related to repository content, issues, pull requests, code search and file access. Depending on the implementation, some may be tools and some may be resources. For example: Read repository file → Resource or retrieval capability; Create issue → Tool.
28. Database MCP Server
Database schema
→ Resource
Execute read query
→ ToolRESOURCE
products table schema
TOOL
query_database29. Jira MCP Server
Story information
→ Resource-like context
Create Bug
→ Tool
Update Issue
→ ToolNow an agent could potentially do:
Read Story
↓
Test Application
↓
Find Defect
↓
Create Jira Bug30. Prompts in Enterprise Testing
A team might create standardized prompts such as: Review Requirement, Generate Test Scenarios, Analyze Automation Failure, Perform Root Cause Analysis, Generate Defect Report, Generate Test Summary. This can provide consistent engineering workflows across the organization.
31. Example: Requirement Review Prompt
Review the requirement.
Identify:
1. Functional requirements
2. Business rules
3. Validation rules
4. Missing information
5. Edge cases
6. Negative scenarios
7. Testability concernsAn SDET could use this repeatedly for new stories.
32. Example: Test Design Prompt
Generate test scenarios from the acceptance criteria.
Include:
Positive tests
Negative tests
Boundary tests
Security considerations
API tests
Database validation
UI tests
Integration testsThis helps standardize AI-assisted test design.
33. Example: Failure Analysis Prompt
Analyze this failed test.
Determine whether the probable cause is:
Application defect
Automation defect
Environment problem
Test data problem
Network problem
Timing problem
Provide evidence and recommended next step.This can be very useful for SDET workflows.
34. The AI Can Combine Tools
An agent is not limited to one tool. Together, a sequence of actions creates a workflow. The AI determines the sequence based on the goal and observations.
browser_navigate
↓
browser_click
↓
browser_type
↓
browser_click
↓
browser_snapshot35. The AI Can Combine Multiple Servers
Read Jira Story
↓
Jira MCP
Read Source Code
↓
GitHub MCP
Test Browser
↓
Playwright MCP
Validate Database
↓
Database MCP
Create Defect
↓
Jira MCPThe AI may orchestrate multiple capabilities as part of one testing objective.
36. Example End-to-End Agentic Workflow
Goal: "Verify that an administrator can create a new product."
- RESOURCE — Read PRODUCT-101 acceptance criteria
- PROMPT — Generate test strategy
- TOOL — Open QA application
- TOOL — Login as administrator
- TOOL — Create product
- TOOL — Query database
- AI — Compare expected vs actual
- If failure occurs: PROMPT — Analyze Failure
- If confirmed defect: TOOL — Create Jira Bug
37. Tools Need Proper Descriptions
A tool should be clearly described. Imagine two tools: "run" and "query_qa_database_read_only". The second is far easier for the AI to understand safely. A good tool definition should communicate what the tool does, what input it needs, what it returns and what restrictions apply. Good tool design improves reliability.
38. Tool Inputs Should Be Clear
Bad:
Tool:
execute
Input:
dataBetter:
Tool:
get_product_by_id
Input:
productIdThis helps the AI understand exactly how the tool should be used.
39. Avoid Overly Powerful Tools
Tool design is also a security concern.
Bad:
execute_any_database_command
Safer:
query_qa_database_read_only
Even better in some scenarios:
get_product_by_idThe more specific the capability, the easier it can be to control.
40. Least Privilege Applies to Tools
Suppose a testing agent only needs to validate test data. It should not automatically receive DROP DATABASE, DELETE production records or Modify production users. Instead, Read QA data may be sufficient. Use: Minimum Necessary Capability.
41. Resource Security
Resources may contain sensitive data too — production secrets, customer PII, passwords, internal architecture or API keys should not automatically be exposed to every AI workflow. Resources should follow proper authentication, authorization, data classification, access control and audit logging.
42. Prompts Also Need Governance
Prompts may sound harmless, but they can influence agent behavior.
Bad prompt:
Fix any problem automatically.Better:
Analyze the problem.
For low-risk QA actions, propose the next step.
For destructive or production-impacting actions,
request human approval.Prompt design is part of responsible agent architecture.
43. Tools Are Not the Same as APIs
A tool may internally call an API.
AI
│
▼
MCP Tool
│
▼
Jira MCP Server
│
▼
Jira REST API
│
▼
JiraTool
!=
REST API
But a tool can wrap an API operation.44. Resources Are Not Necessarily Files
A resource might be a file, but it does not have to be. A resource could conceptually represent a document, configuration, schema, dynamic application information, repository content or reference information. The important characteristic is: it provides information/context.
45. Prompts Are Not Tools
Prompt = Tool
No.A prompt provides instructions. A tool performs an action.
Prompt:
Generate regression test scenarios.
Tool:
Create Jira issue.Very different responsibilities.
46. Resource + Prompt + Tool Together
This is the most important combination.
RESOURCE
Provides context
↓
PROMPT
Provides methodology
↓
AI
Reasons
↓
TOOL
Performs actionAcceptance Criteria
↓
RESOURCE
Test Design Instructions
↓
PROMPT
AI Reasoning
↓
Browser Interaction
↓
TOOL47. Traditional Automation vs MCP Capabilities
Traditional automation:
Engineer
↓
Writes Code
↓
Playwright Test
↓
ApplicationMCP-enabled agentic workflow:
Engineer
↓
Defines Goal
↓
AI
│
├── Resource
│
├── Prompt
│
└── Tool
↓
Application / Engineering SystemsThis does not mean deterministic automation disappears. They can work together.
48. Deterministic Playwright Still Matters
Traditional Playwright remains ideal for regression testing, CI/CD, repeatable validations, release gates and stable business flows. MCP and agentic workflows can complement this by supporting exploratory testing, requirement analysis, failure investigation, dynamic test planning and cross-system orchestration.
49. Enterprise Hybrid Model
HUMAN SDET
│
┌──────────────────┴──────────────────┐
│ │
▼ ▼
AGENTIC WORKFLOW DETERMINISTIC TESTING
│ │
▼ ▼
AI Agent Playwright Suite
│ │
┌──────┼──────┐ │
│ │ │ │
▼ ▼ ▼ │
Resource Prompt Tool │
│ │ │ │
└──────┴──────┴───────────────┐ │
▼ ▼
Application / APIs50. Realistic SDET Example
Suppose your Product Service application supports UI, REST, GraphQL, WebSocket, PostgreSQL and Kafka. An agent may need:
Resources
───────────────────────
API specification
Database schema
Business rules
Test data documentation
Prompts
───────────────────────
Test design
Risk analysis
Failure analysis
Tools
───────────────────────
Browser interaction
REST API calls
GraphQL calls
DB queries
Message validationThis is a powerful way to structure AI-assisted Quality Engineering.
51. Architecture Example
AI TESTING AGENT
│
┌─────────────────────┼─────────────────────┐
│ │ │
▼ ▼ ▼
RESOURCES PROMPTS TOOLS
Acceptance Criteria Test Design Browser
API Contract Risk Analysis REST API
DB Schema Failure Analysis GraphQL
Test Data Guide Bug Summary Database
Architecture Jira
GitHubContext
+
Instructions
+
Actions
=
Tool-Enabled AI Workflow52. Agent Reasoning Loop
GOAL
↓
READ CONTEXT
↓
PLAN
↓
USE TOOL
↓
OBSERVE
↓
REASON
↓
USE NEXT TOOL
↓
VALIDATEResources can supply context during this cycle. Prompts can help structure reasoning. Tools execute actions.
53. Common Interview Question
What is the difference between MCP Tools, Resources, and Prompts? A strong answer: MCP Tools expose executable capabilities that allow an AI application to perform actions. MCP Resources expose information or context that can be retrieved and used by the AI. MCP Prompts provide reusable prompt templates that help standardize instructions or workflows.
Tool
=
Action
Resource
=
Context
Prompt
=
Instruction54. Another Interview Question
Can an MCP server expose all three? Yes. An MCP server may expose Tools, Resources and Prompts depending on what the server is designed to provide. Some servers may expose mostly tools; others may primarily provide information.
55. Another Interview Question
Does the AI model execute the tool directly? Not exactly.
AI decides
↓
MCP Client communicates
↓
MCP Server invokes capability
↓
Underlying system performs workThe model decides when and why to use the capability. The external tool performs the underlying action.
56. Another Interview Question
Can MCP Tools call REST APIs? Yes.
AI
↓
create_jira_issue tool
↓
Jira MCP Server
↓
Jira REST API
↓
JiraMCP does not replace the application's API. It may provide an AI-friendly capability layer over it.
57. Easy Analogy
Imagine an engineer in a workshop.
TOOLS
=
Hammer, drill, screwdriver
RESOURCES
=
Blueprints and manuals
PROMPTS
=
Work instructions
AI
=
Engineer
MCP
=
Standard way to access themFor testing:
TOOLS
=
Browser, API, database
RESOURCES
=
Requirements, schemas, documentation
PROMPTS
=
Testing methodologies
AI
=
Testing agent58. MCP Capability Cheat Sheet
TOOLS
────────────────────────
Perform actions
Examples:
Navigate browser
Click element
Query database
Create issue
RESOURCES
────────────────────────
Provide context/data
Examples:
Requirements
Schemas
Files
Documentation
Configuration
PROMPTS
────────────────────────
Provide reusable instructions
Examples:
Generate test scenarios
Analyze failure
Review requirement
Create defect summary59. What You Should Memorize
MCP SERVER
│
├── TOOLS
│ ↓
│ ACTIONS
│
├── RESOURCES
│ ↓
│ CONTEXT
│
└── PROMPTS
↓
INSTRUCTIONSRESOURCE
↓
AI learns context
PROMPT
↓
AI follows methodology
TOOL
↓
AI performs action60. Final Takeaway
TOOLS
=
What can I DO?
RESOURCES
=
What information can I ACCESS?
PROMPTS
=
What reusable INSTRUCTIONS can I use?For an SDET:
Read Acceptance Criteria
= RESOURCE
Generate Risk-Based Tests
= PROMPT
Open Browser
= TOOL
Click Login
= TOOL
Query Database
= TOOL
Read DB Schema
= RESOURCE
Analyze Failure
= PROMPTTogether, these capabilities allow AI applications to move from simple conversation toward useful engineering workflows.
HUMAN
│
▼
AI AGENT
│
├── Resources
├── Prompts
└── Tools
│
▼
MCP
│
▼
ENGINEERING SYSTEMSThat is one of the foundations of MCP-based Agentic Quality Engineering.
Complete professional Playwright + TypeScript enterprise framework
Production-grade architecture, fixtures, reporters and CI/CD — ready to run.
Get Playwright tutorials in your inbox
Weekly tips, real-world examples, and framework patterns – no spam, unsubscribe anytime.
Playwright Framework Series
View all →- 1Getting Started with Playwright: Installation, Setup, and Your First Test
- 2Playwright Locators: The Complete Guide with Real-World Examples
- 3Playwright Actions: Complete Guide to Click, Fill, Hover, Keyboard, Mouse & File Upload
- 4Playwright Assertions Complete Guide: Web-First Assertions, Auto-Retry & Custom Matchers
- 5Playwright Auto Waiting: The Complete Guide with Real-World Examples
- 6Playwright Fixtures: The Complete Guide with Real-World Examples
- 7Playwright Browser Context & Multiple Tabs: The Complete Guide with Real-World Examples
- 8Playwright Authentication & Session Management: Complete Guide with Enterprise Examples
- 9Playwright Network Interception & API Mocking: Complete Guide with Real-World Examples
- 10Playwright Page Object Model (POM): The Complete Guide with Enterprise Examples
- 11Page Object Model with Playwright: A Practical Guide
- 12How to Build a Robust Professional Playwright Framework from Scratch (Step-by-Step)
- 13Building an Enterprise Playwright Framework from Scratch
API Testing Series
View all →- 1Part 1 : Playwright API Testing Tutorial: Build Enterprise-Level API Automation Framework
- 2Part 2: Playwright API Testing Tutorial: Setting Up Project & Sending Your First API Request
- 3Part 3: Mastering CRUD Operations in Playwright API Testing
- 4Part 4: Authentication in Playwright API Testing (Bearer Token, JWT, API Key & Reusable Fixtures)
- 5Part 5: Building an Enterprise-Level Playwright API Automation Framework
- 6Part 6: API Models, Schema Validation & Test Data Management in Playwright
- 7Part 7: Custom Fixtures, Hooks, Logging & Parallel Execution in Playwright API Testing
- 8Part 8: Building a Production-Ready Playwright API Framework (Environment Management, CI/CD, Reporting & Best Practices)
- 9Part 9: Advanced Playwright API Testing Techniques for Enterprise Automation
- 10Part 10: Building a Complete Enterprise Playwright API Automation Framework (Final Part)
- 11Playwright Backend Testing Tutorial – REST API, GraphQL, WebSocket, Kafka, Database & Microservices