Logo
NeoArc Studio

MCP Resources and URI Templates

Learn how to document MCP resources: concrete URIs, URI templates with parameters, content types, subscriptions, audience control, and metadata. Understand the difference between tools and resources and when to use each.

Resources expose data to AI assistants without requiring tool invocations. Unlike tools (which are model-controlled), resources are application-controlled: the host application decides which resources to make available in the current context. This makes resources ideal for providing background data, reference material, and live system state.

Tools versus Resources

Understanding when to use a tool versus a resource is essential for effective MCP server design.

Concrete URIs

A concrete resource has a fixed URI that always returns the same type of data. Use concrete URIs for static or slowly-changing data like configuration files, policy documents, and system metadata.

{
  "name": "return-policy",
  "uri": "ecommerce://policies/returns",
  "isTemplate": false,
  "mimeType": "text/markdown",
  "contentType": "text"
}

URI Templates

Templated resources use parameterised URIs that resolve to different data based on the parameters provided. NeoArc highlights template parameters with accent colouring in the published viewer.

{
  "name": "product-catalogue",
  "uri": "ecommerce://catalogue/{category}",
  "isTemplate": true,
  "templateParameters": [
    {
      "name": "category",
      "description": "Product category slug",
      "required": true,
      "examples": ["electronics", "clothing", "all"]
    }
  ]
}

Content Type and MIME Type

Resources declare their content format so clients know how to process the data.

Subscriptions

Resources can be marked as subscribable, enabling real-time notifications when the underlying data changes. When a client subscribes to a resource, the server sends notifications whenever the resource content is updated.

Document the subscription behaviour clearly: how frequently updates occur, what triggers a notification, and whether the notification contains the full content or just a change indicator.

Audience Control

Each resource can specify its intended audience using two flags.

Metadata

Resources can include metadata that helps clients manage their resource loading.

Examples

Resource examples show concrete URI instances with content previews. For templated resources, examples demonstrate different parameter combinations and the resulting data.

Related Guides