-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Is your feature request related to a problem? Please describe.
I’d like to be able to provide resource annotations in the SDK types, as described in the MCP specification. Currently, there’s no way types for hints like audience, priority, or lastModified for resources, which limits client flexibility and context filtering.
Describe the solution you'd like
Add support for resource annotations to the SDK types. This should allow specifying:
audience
: array of intended audiences (e.g., ["user", "assistant"])priority
: number from 0.0 to 1.0 indicating importancelastModified
: ISO 8601 timestamp for last modification
Describe alternatives you've considered
Alternatives include manually extending resource objects or handling annotations outside the SDK, but this is less standardized and could lead to inconsistencies.
Additional context
See the MCP spec for details: https://modelcontextprotocol.io/specification/2025-06-18/server/resources#annotations
Example resource with annotations:
{
"uri": "file:///project/README.md",
"name": "README.md",
"title": "Project Documentation",
"mimeType": "text/markdown",
"annotations": {
"audience": ["user"],
"priority": 0.8,
"lastModified": "2025-01-12T15:00:58Z"
}
}
Annotations help clients filter, prioritize, and display resources more effectively.