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

Resource Templates

📄 Resources7 min80 BASE XP

Dynamic URIs

If you have thousands of records (e.g., Jira tickets), you cannot register 10,000 static Resources. Instead, you use Resource Templates.

server.resourceTemplate(
  "issue-ticket",
  "jira://issue/{key}",
  { description: "Load a Jira ticket by key" },
  async (uri, { key }) => {
    const ticketData = await fetchJira(key);
    return {
      contents: [{
        uri: uri.href,
        text: JSON.stringify(ticketData)
      }]
    };
  }
);

The AI can infer that if it wants ticket PROJ-123, it should request the URI jira://issue/PROJ-123.

SYNAPSE VERIFICATION
QUERY 1 // 3
When should you use a Resource Template instead of a static Resource?
When data is smaller than 1MB.
When you have a massive or infinite parameters space (e.g., database records by ID).
When data changes every second.
When using Python instead of TypeScript.
Watch: 139x Rust Speedup
Resource Templates | Resources — MCP Academy