FRAMEWORK DESIGNINTERMEDIATE

MCP Tools, Resources & Prompts: Complete Deep Dive for SDETs and Playwright Engineers

Learn MCP Tools, Resources and Prompts in depth for SDETs and Playwright engineers: tool execution, resource context, reusable prompts, MCP capability discovery, security, Playwright MCP and enterprise Agentic AI testing workflows.

iff Solution Academy September 12, 2026 30 min read Updated September 12, 2026
MCP MCP Tools MCP Resources MCP Prompts Playwright MCP AI Agents Agentic AI SDET

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.

text
Tutorial 1
MCP Fundamentals
        ↓
Tutorial 2
MCP Host, Client & Server
        ↓
Tutorial 3
MCP Tools, Resources & Prompts
text
TOOLS
=
Do something

RESOURCES
=
Read or access something

PROMPTS
=
Reusable instructions

For 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.

text
USER
  │
  ▼
AI APPLICATION / MCP HOST
  │
  ▼
MCP CLIENT
  │
  │ MCP
  ▼
MCP SERVER
  │
  ├── TOOLS
  │
  ├── RESOURCES
  │
  └── PROMPTS

The 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
Mental model: Tool = Action.

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.

text
browser_navigate
browser_click
browser_type
browser_snapshot

Now imagine the SDET tells the AI: "Open the login page." The AI reasons: I need browser navigation. Then:

text
AI
 │
 ▼
MCP Client
 │
 ▼
Playwright MCP Server
 │
 ▼
browser_navigate
 │
 ▼
Browser

The tool performs the action.

4. Tool Execution Flow

text
User Request
    │
    ▼
AI Reasoning
    │
    ▼
Select Tool
    │
    ▼
MCP Client
    │
    ▼
MCP Server
    │
    ▼
Execute Tool
    │
    ▼
External System
    │
    ▼
Return Result
text
"Open /login"
      │
      ▼
AI chooses navigation tool
      │
      ▼
browser_navigate
      │
      ▼
Browser opens page
      │
      ▼
Result returned to AI

5. 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.

text
Tool:
browser_navigate

Input:
url

Invocation:
url = https://qa.example.com/login

Another example — a query_database tool with a query input:

sql
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.

text
Tool Execution
      ↓
Result
      ↓
AI Observation
      ↓
AI Reasoning
      ↓
Next Action

7. Tools Are Important for Agentic AI

Tools are what allow AI agents to move beyond simply generating text.

text
Without tools:
AI
↓
Explain what you should do

With tools:
AI
↓
Perform action
↓
Observe result
↓
Reason
↓
Perform next action
text
Think
 ↓
Act
 ↓
Observe
 ↓
Think
 ↓
Act
 ↓
Validate

8. 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.

text
AI
 │
 ▼
MCP Client
 │
 ▼
MCP Server
 │
 ▼
Product Specification Resource

The 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).

text
RESOURCE
=
Information

TOOL
=
Action

11. 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.

text
RESOURCE
↓
Read Acceptance Criteria

TOOL
↓
Open Application

TOOL
↓
Click Add Product

RESOURCE
↓
Read API Schema

12. 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.

text
Database Schema
=
RESOURCE

Execute SQL
=
TOOL

This 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.

text
resource://application/specification
resource://database/schema/products
resource://project/test-plan

14. 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.

text
AI
  +
Application Specification
  +
Database Schema
  +
Architecture Documentation
  +
Test Data Rules

That 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.

text
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:

text
Analyze the failed test.

Check:
- application error
- locator issue
- timeout issue
- environment issue
- test data issue

Return:
- probable root cause
- evidence
- recommended action

Now 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.
text
TOOL
=
DO

RESOURCE
=
READ

PROMPT
=
INSTRUCT

19. Playwright Example Using All Three

Suppose the goal is: "Verify the Product Creation feature." The workflow could use all three MCP capabilities.

text
RESOURCE
↓
Product Acceptance Criteria

The AI reads:
Product name is mandatory.
Price must be greater than zero.
Admin can create products.
text
PROMPT
↓
Generate Risk-Based Test Scenarios

The AI identifies:
Valid product
Missing product name
Negative price
Unauthorized user
text
TOOLS
↓
Browser Navigation
Click
Type
Submit

This is a complete MCP-enabled workflow.

20. Complete Example

text
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 Result

21. 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.

text
MCP Client
     │
     │ What do you provide?
     ▼
MCP Server
     │
     ├── Tools
     ├── Resources
     └── Prompts

22. Tool Discovery

text
Client
  │
  │ List Tools
  ▼
Server

A response might conceptually include browser_navigate, browser_click, browser_type and browser_snapshot. Then the AI knows which actions are available.

23. Resource Discovery

text
Client
  │
  │ List Resources
  ▼
Server

Possible 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.

text
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.

text
                      AI AGENT
                         │
                         ▼
                      MCP HOST
                         │
        ┌────────────────┼────────────────┐
        │                │                │
        ▼                ▼                ▼
 Playwright MCP      GitHub MCP       Database MCP
    Server             Server             Server

26. 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

text
Database schema
→ Resource

Execute read query
→ Tool
text
RESOURCE
products table schema

TOOL
query_database

29. Jira MCP Server

text
Story information
→ Resource-like context

Create Bug
→ Tool

Update Issue
→ Tool

Now an agent could potentially do:

text
Read Story
      ↓
Test Application
      ↓
Find Defect
      ↓
Create Jira Bug

30. 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

text
Review the requirement.

Identify:

1. Functional requirements
2. Business rules
3. Validation rules
4. Missing information
5. Edge cases
6. Negative scenarios
7. Testability concerns

An SDET could use this repeatedly for new stories.

32. Example: Test Design Prompt

text
Generate test scenarios from the acceptance criteria.

Include:

Positive tests
Negative tests
Boundary tests
Security considerations
API tests
Database validation
UI tests
Integration tests

This helps standardize AI-assisted test design.

33. Example: Failure Analysis Prompt

text
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.

text
browser_navigate
      ↓
browser_click
      ↓
browser_type
      ↓
browser_click
      ↓
browser_snapshot

35. The AI Can Combine Multiple Servers

text
Read Jira Story
      ↓
Jira MCP

Read Source Code
      ↓
GitHub MCP

Test Browser
      ↓
Playwright MCP

Validate Database
      ↓
Database MCP

Create Defect
      ↓
Jira MCP

The 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."

  1. RESOURCE — Read PRODUCT-101 acceptance criteria
  2. PROMPT — Generate test strategy
  3. TOOL — Open QA application
  4. TOOL — Login as administrator
  5. TOOL — Create product
  6. TOOL — Query database
  7. AI — Compare expected vs actual
  8. If failure occurs: PROMPT — Analyze Failure
  9. If confirmed defect: TOOL — Create Jira Bug
That is much closer to real Agentic Quality Engineering.

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

text
Bad:

Tool:
execute

Input:
data
text
Better:

Tool:
get_product_by_id

Input:
productId

This helps the AI understand exactly how the tool should be used.

39. Avoid Overly Powerful Tools

Tool design is also a security concern.

text
Bad:
execute_any_database_command

Safer:
query_qa_database_read_only

Even better in some scenarios:
get_product_by_id

The 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.

Least privilege: give the agent the minimum capability it needs — read-only QA access instead of unrestricted production access.

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.

text
Bad prompt:
Fix any problem automatically.
text
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.

text
AI
 │
 ▼
MCP Tool
 │
 ▼
Jira MCP Server
 │
 ▼
Jira REST API
 │
 ▼
Jira
text
Tool
!=
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

text
Prompt = Tool

No.

A prompt provides instructions. A tool performs an action.

text
Prompt:
Generate regression test scenarios.

Tool:
Create Jira issue.

Very different responsibilities.

46. Resource + Prompt + Tool Together

This is the most important combination.

text
RESOURCE
Provides context

        ↓

PROMPT
Provides methodology

        ↓

AI
Reasons

        ↓

TOOL
Performs action
text
Acceptance Criteria
      ↓
RESOURCE

Test Design Instructions
      ↓
PROMPT

AI Reasoning
      ↓

Browser Interaction
      ↓
TOOL

47. Traditional Automation vs MCP Capabilities

text
Traditional automation:

Engineer
   ↓
Writes Code
   ↓
Playwright Test
   ↓
Application
text
MCP-enabled agentic workflow:

Engineer
   ↓
Defines Goal
   ↓
AI
   │
   ├── Resource
   │
   ├── Prompt
   │
   └── Tool
   ↓
Application / Engineering Systems

This 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

text
                         HUMAN SDET
                             │
          ┌──────────────────┴──────────────────┐
          │                                     │
          ▼                                     ▼

  AGENTIC WORKFLOW                    DETERMINISTIC TESTING

          │                                     │
          ▼                                     ▼
       AI Agent                           Playwright Suite
          │                                     │
   ┌──────┼──────┐                              │
   │      │      │                              │
   ▼      ▼      ▼                              │
Resource Prompt Tool                            │
   │      │      │                              │
   └──────┴──────┴───────────────┐              │
                                 ▼              ▼
                              Application / APIs

50. Realistic SDET Example

Suppose your Product Service application supports UI, REST, GraphQL, WebSocket, PostgreSQL and Kafka. An agent may need:

text
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 validation

This is a powerful way to structure AI-assisted Quality Engineering.

51. Architecture Example

text
                         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
                                              GitHub
text
Context
   +
Instructions
   +
Actions
   =
Tool-Enabled AI Workflow

52. Agent Reasoning Loop

text
GOAL
 ↓
READ CONTEXT
 ↓
PLAN
 ↓
USE TOOL
 ↓
OBSERVE
 ↓
REASON
 ↓
USE NEXT TOOL
 ↓
VALIDATE

Resources 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.

text
Tool
=
Action

Resource
=
Context

Prompt
=
Instruction

54. 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.

text
AI decides
      ↓
MCP Client communicates
      ↓
MCP Server invokes capability
      ↓
Underlying system performs work

The 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.

text
AI
 ↓
create_jira_issue tool
 ↓
Jira MCP Server
 ↓
Jira REST API
 ↓
Jira

MCP 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.

text
TOOLS
=
Hammer, drill, screwdriver

RESOURCES
=
Blueprints and manuals

PROMPTS
=
Work instructions

AI
=
Engineer

MCP
=
Standard way to access them
text
For testing:

TOOLS
=
Browser, API, database

RESOURCES
=
Requirements, schemas, documentation

PROMPTS
=
Testing methodologies

AI
=
Testing agent

58. MCP Capability Cheat Sheet

text
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 summary

59. What You Should Memorize

text
MCP SERVER
   │
   ├── TOOLS
   │      ↓
   │   ACTIONS
   │
   ├── RESOURCES
   │      ↓
   │   CONTEXT
   │
   └── PROMPTS
          ↓
       INSTRUCTIONS
text
RESOURCE
        ↓
AI learns context

PROMPT
        ↓
AI follows methodology

TOOL
        ↓
AI performs action

60. Final Takeaway

text
TOOLS
=
What can I DO?

RESOURCES
=
What information can I ACCESS?

PROMPTS
=
What reusable INSTRUCTIONS can I use?
text
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
= PROMPT

Together, these capabilities allow AI applications to move from simple conversation toward useful engineering workflows.

text
HUMAN
  │
  ▼
AI AGENT
  │
  ├── Resources
  ├── Prompts
  └── Tools
  │
  ▼
MCP
  │
  ▼
ENGINEERING SYSTEMS

That is one of the foundations of MCP-based Agentic Quality Engineering.

Series so far: 1. MCP Fundamentals → 2. MCP Host, Client & Server Deep Dive → 3. MCP Tools, Resources & Prompts (this tutorial) → 4. Build Your First MCP Server (next). Previous parts are linked in the recommended articles below.

Playwright Framework Series

View all →
  1. 1Getting Started with Playwright: Installation, Setup, and Your First Test
  2. 2Playwright Locators: The Complete Guide with Real-World Examples
  3. 3Playwright Actions: Complete Guide to Click, Fill, Hover, Keyboard, Mouse & File Upload
  4. 4Playwright Assertions Complete Guide: Web-First Assertions, Auto-Retry & Custom Matchers
  5. 5Playwright Auto Waiting: The Complete Guide with Real-World Examples
  6. 6Playwright Fixtures: The Complete Guide with Real-World Examples
  7. 7Playwright Browser Context & Multiple Tabs: The Complete Guide with Real-World Examples
  8. 8Playwright Authentication & Session Management: Complete Guide with Enterprise Examples
  9. 9Playwright Network Interception & API Mocking: Complete Guide with Real-World Examples
  10. 10Playwright Page Object Model (POM): The Complete Guide with Enterprise Examples
  11. 11Page Object Model with Playwright: A Practical Guide
  12. 12How to Build a Robust Professional Playwright Framework from Scratch (Step-by-Step)
  13. 13Building an Enterprise Playwright Framework from Scratch

API Testing Series

View all →
  1. 1Part 1 : Playwright API Testing Tutorial: Build Enterprise-Level API Automation Framework
  2. 2Part 2: Playwright API Testing Tutorial: Setting Up Project & Sending Your First API Request
  3. 3Part 3: Mastering CRUD Operations in Playwright API Testing
  4. 4Part 4: Authentication in Playwright API Testing (Bearer Token, JWT, API Key & Reusable Fixtures)
  5. 5Part 5: Building an Enterprise-Level Playwright API Automation Framework
  6. 6Part 6: API Models, Schema Validation & Test Data Management in Playwright
  7. 7Part 7: Custom Fixtures, Hooks, Logging & Parallel Execution in Playwright API Testing
  8. 8Part 8: Building a Production-Ready Playwright API Framework (Environment Management, CI/CD, Reporting & Best Practices)
  9. 9Part 9: Advanced Playwright API Testing Techniques for Enterprise Automation
  10. 10Part 10: Building a Complete Enterprise Playwright API Automation Framework (Final Part)
  11. 11Playwright Backend Testing Tutorial – REST API, GraphQL, WebSocket, Kafka, Database & Microservices

Recommended Next Articles