Skip to content

feat: add title field for data types#410

Merged
jokemanfire merged 3 commits intomodelcontextprotocol:mainfrom
4t145:feat-model-with-title
Sep 8, 2025
Merged

feat: add title field for data types#410
jokemanfire merged 3 commits intomodelcontextprotocol:mainfrom
4t145:feat-model-with-title

Conversation

@4t145
Copy link
Copy Markdown
Contributor

@4t145 4t145 commented Sep 2, 2025

Motivation and Context

to support the title field in lastest revision

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@github-actions github-actions bot added T-test Testing related changes T-config Configuration file changes T-core Core library changes T-examples Example code changes T-handler Handler implementation changes T-macros Macro changes T-model Model/data structure changes T-transport Transport layer changes labels Sep 2, 2025
@4t145 4t145 force-pushed the feat-model-with-title branch from 9a870ee to 50e0f43 Compare September 3, 2025 06:22
@github-actions github-actions bot removed the T-transport Transport layer changes label Sep 3, 2025
@4t145 4t145 force-pushed the feat-model-with-title branch from 50e0f43 to ffcd738 Compare September 3, 2025 06:24
@4t145 4t145 requested a review from Copilot September 3, 2025 06:25
@4t145 4t145 marked this pull request as ready for review September 3, 2025 06:25
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a title field to various data types in the MCP (Model Context Protocol) implementation to support the latest revision of the protocol. The change introduces optional human-readable titles for tools, resources, prompts, and other entities.

  • Adds optional title field to core data structures (Tool, Resource, Prompt, Implementation, etc.)
  • Updates all instantiation sites to include title: None for backward compatibility
  • Modifies macro generators to support the new title field

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/rmcp/src/model/tool.rs Adds title field to Tool struct and updates constructor
crates/rmcp/src/model/resource.rs Adds title field to RawResource and RawResourceTemplate structs
crates/rmcp/src/model/prompt.rs Adds title field to Prompt and PromptArgument structs
crates/rmcp/src/model/content.rs Updates RawContent enum variant and test instantiation
crates/rmcp/src/model.rs Adds title field to Implementation and PromptReference structs
crates/rmcp-macros/src/tool.rs Updates tool macro to support title attribute
crates/rmcp-macros/src/prompt.rs Updates prompt macro to support title attribute
examples/servers/src/sampling_stdio.rs Updates Tool instantiation with title field
examples/clients/src/streamable_http.rs Updates Implementation instantiation with title field
examples/clients/src/sse.rs Updates Implementation instantiation with title field
crates/rmcp/tests/test_elicitation.rs Updates test implementations with title field
crates/rmcp/src/handler/server/prompt.rs Updates PromptArgument instantiation with title field
crates/rmcp/tests/test_message_schema/*.json Updates schema descriptions removing batch operations reference

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@4t145 4t145 requested a review from jokemanfire September 3, 2025 06:36
@github-actions github-actions bot added the T-service Service layer changes label Sep 4, 2025
@4t145 4t145 requested review from jokemanfire and removed request for jokemanfire September 4, 2025 11:14
@jokemanfire jokemanfire merged commit 1b70f5b into modelcontextprotocol:main Sep 8, 2025
20 of 21 checks passed
This was referenced Sep 8, 2025
takumi-earth pushed a commit to earthlings-dev/rmcp that referenced this pull request Jan 27, 2026
* feat(model): add title field to various structs

* fix(test): fix test json schema

* fix(model): allow boxed type  in `ts_union` macro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-config Configuration file changes T-core Core library changes T-examples Example code changes T-handler Handler implementation changes T-macros Macro changes T-model Model/data structure changes T-service Service layer changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants