Skip to content

CONCEPT Cited by 1 source

Resource annotations (MCP)

Definition

Resource annotations are optional metadata attached to an MCP resource registration that let clients filter, sort, and display resources sensibly at discovery time. Defined in the MCP spec; canonicalised on this wiki via the 2026-01-08 Wix Engineering tutorial (Source: sources/2026-01-08-wix-mcp-resources-all-you-need-to-know).

The three canonical fields

Per Wix:

  • audience — array of intended consumers, values ['user'], ['assistant'], or ['user', 'assistant']. Signals whether the resource is meant for direct human rendering (e.g. a user-facing dashboard), for the LLM agent only (e.g. a tool-result artefact), or both. Clients use this to surface the resource in the correct UI or scope.
  • priority — numeric (0.0–1.0) ordering hint. Clients sort resource lists by priority so the most important resources surface first in discovery views.
  • lastModified — ISO 8601 timestamp. Example verbatim: '2026-01-12T16:00:02Z'. Drives recency ordering in clients.

Shape in code

server.registerResource(
    name,
    uri,
    {
      description,
      mimeType: 'text/plain',
      annotations: {
        audience: ['user', 'assistant'],
        priority: 0.5,
        lastModified: '2026-01-12T16:00:02Z',
      },
    },
    async () => { /* ... */ },
);

Why it exists

MCP resources are often shown to users as well as to agents (the discovery-gap workaround patterns/expose-resource-as-tool-for-agent-discoverability assumes both surfaces). Annotations give the client enough metadata to render the resource list usefully without opening every resource first: sort by priority, filter by audience, display the last-modified date.

Compare with MIME-type as first-class metadata: MIME type says "how do I render this?", annotations say "whom is this for, how important is it, when did it last change?". Both land in the same metadata block on the resource registration.

Seen in

Last updated · 476 distilled / 1,218 read