Consider migrating from ToolAnnotations.title to Tool.title when rmcp supports MCP 2025-06-18
Summary
Currently, rmcp implements MCP schema version 2025-03-26, where the title field is part of ToolAnnotations. In the newer MCP schema version 2025-06-18, title is available both as:
- A direct field on the
Toolstruct (new) - Part of
ToolAnnotations(still valid for backward compatibility)
Current Implementation
As part of issue #25 (closed), we're implementing title support using ToolAnnotations:
Tool {
name: metadata.name.clone().into(),
description: Some(metadata.description.clone().into()),
input_schema,
output_schema,
annotations: Some(ToolAnnotations {
title: metadata.title.clone(),
..Default::default()
}),
}
This approach is valid in both 2025-03-26 and 2025-06-18 schemas.
Future Consideration
When rmcp is updated to support MCP schema 2025-06-18, we could optionally migrate to use the direct title field:
Tool {
name: metadata.name.clone().into(),
title: metadata.title.as_ref().map(|t| t.clone().into()),
description: Some(metadata.description.clone().into()),
input_schema,
output_schema,
annotations: None,
}
However, this is optional since ToolAnnotations.title remains valid in 2025-06-18.
Decision Criteria
We should consider migration if:
- The direct
Tool.titlefield becomes the preferred/recommended approach - There are performance or usability benefits
- The MCP specification deprecates
ToolAnnotations.title
Tasks
-
Monitor rmcp for updates to MCP schema 2025-06-18 -
Evaluate whether migration provides tangible benefits -
If beneficial, update the From<&ToolMetadata> for Toolimplementation -
Update tests accordingly
References
- MCP Schema 2025-03-26: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-03-26/schema.json
- MCP Schema 2025-06-18: https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-06-18/schema.json
- rmcp repository: https://github.com/modelcontextprotocol/rust-sdk