Skip to content

Conversation

@atesgoral
Copy link
Contributor

Motivation and Context

Addresses #180

Where @jspahrsummers said:

Yep, makes sense. I think this is basically just an oversight. We have a MIME type on all resources, for example.

How Has This Been Tested?

No. Just adding an optional property to the schema.

Breaking Changes

No.

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

*/
arguments?: { [key: string]: string };
};
/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, my IDE is fixing formatting in unrelated places. But I think we should keep them.

Copy link
Contributor

@hesreallyhim hesreallyhim left a comment

Choose a reason for hiding this comment

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

suggestion: it sounds like we're going to end up with three ContentTypes:
TextContent | ImageContent | AudioContent
and they're each going to have type, mimeType, and annotations? properties, which sounds to me like a good opportunity for a shared interface from which to extend

@atesgoral
Copy link
Contributor Author

@hesreallyhim Ah, actually this is a small patch before we potentially rock the boat and unify types: #180 (reply in thread)

@hesreallyhim
Copy link
Contributor

@hesreallyhim Ah, actually this is a small patch before we potentially rock the boat and unify types: #180 (reply in thread)

ok, thanks for the context 👍

@dsp-ant dsp-ant moved this to Consulting in Standards Track Jun 16, 2025
@dsp-ant dsp-ant added this to the DRAFT-XX-XX milestone Jun 16, 2025
@evalstate
Copy link
Member

I'd prefer this was fixed to text/plain if it is going to be added.

@atesgoral
Copy link
Contributor Author

@evalstate can you elaborate? What does "fixing" mean in this context? Assume all type: "text" additionally means mimeType: "text/plain", without a way to override it?

@evalstate
Copy link
Member

evalstate commented Jun 17, 2025

Yes, my view is that TextContent should have the guarantee that it is text/plain.

TextContent is by far the most widely used type, and we already have TextResourceContents for transmitting semantic information about textual content.

The potential breakage here is that Server developers think they want to send text/html or text/css or application/x-python, but in truth they are not natively tokenized by the models. Sending those as content blocks with their mime type via the LLM API will usually cause an error, and this is often not what the MCP Server developer intended.

There are rare exceptions (e.g. models like StarVector) but the general case is that having a modifiable mime type on TextContent this will cause unnecessary complexity and breakages.

At the moment TextContent is almost guaranteed to work in all situations, is simple for MCP Server and Host developers and TextResourceContents exists for more complex integrations. Adding a specifiable mime type would regress this.

@dsp-ant dsp-ant requested a review from a team September 23, 2025 21:10
@domdomegg domdomegg requested a review from a team as a code owner November 25, 2025 19:37
@localden localden added the schema Work related to schema changes. label Dec 5, 2025
@localden
Copy link
Contributor

localden commented Dec 5, 2025

LGTM. @atesgoral - mind resolving the schema conflicts in this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

schema Work related to schema changes.

Projects

No open projects
Status: Consulting

Development

Successfully merging this pull request may close these issues.

5 participants