[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

Resource Fundamentals

📄 Resources6 min80 BASE XP

Resources are Read-Only Data

Unlike Tools (which do things), Resources expose data for the AI to inspect. Think of them as files, database rows, or standard operating procedures.

Defining a Static Resource

server.resource(
  "company-handbook",                     // Name
  "file:///docs/handbook.md",               // URI
  { description: "HR Policies" },         // Metadata
  async (uri) => {
    return {
      contents: [{
        uri: uri.href,
        text: "Handbook contents go here..."
      }]
    };
  }
);

All Resources are identified by a URI. The client can fetch the exact content of the resource via string paths.

SYNAPSE VERIFICATION
QUERY 1 // 3
What is the primary difference between a Tool and a Resource?
Tools are dynamic actions; Resources are read-only data blocks.
Tools require internet; Resources are local.
Resources use JSON; Tools use XML.
Tools cost money; Resources are free.
Watch: 139x Rust Speedup
Resource Fundamentals | Resources — MCP Academy