Skip to content

mcp: move to 2025-06-18 schema#8

Merged
findleyr merged 2 commits into
mainfrom
jba-newschema
Jun 25, 2025
Merged

mcp: move to 2025-06-18 schema#8
findleyr merged 2 commits into
mainfrom
jba-newschema

Conversation

@jba

@jba jba commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

Add types and fields for the latest MCP schema.

The main challenge here was dealing with the presence of _meta fields on many types, like Tool, Prompt and Resource.

  • Distinguish between the _meta field of a request's params, which includes a progress token, from the _meta field on other types, which is simply a map.

  • Redefine GetMeta to return a pointer to the map. We wanted to avoid that, but I don't see a clean way to do so. An alternative would be to have GetMeta return a map, and SetMeta to set it.

  • Provide GetProgressToken for requests only (not notifications or other types).

  • Still to do: deal with the meta and annotation fields of ContentBlock, which are currently duplicated for Resource and ResourceContents.

@jba
jba requested a review from findleyr June 24, 2025 20:06
Comment thread mcp/protocol.go Outdated
Comment thread mcp/content.go
jba added 2 commits June 24, 2025 19:15
Add types and fields for the latest MCP schema.

The main challenge here was dealing with the presence of _meta fields
on many types, like Tool, Prompt and Resource.

- Distinguish between the _meta field of a request's params, which
  includes a progress token, from the _meta field on other types,
  which is simply a map.

- Redefine GetMeta to return a pointer to the map. We wanted to avoid
  that, but I don't see a clean way to do so. An alternative would be
  to have GetMeta return a map, and SetMeta to set it.

- Provide GetProgressToken for requests only (not notifications or other
  types).

- Still to do: deal with the meta and annotation fields of ContentBlock,
  which are currently duplicated for Resource and ResourceContents.
@jba
jba force-pushed the jba-newschema branch from 09f161c to 287173a Compare June 25, 2025 10:29

@findleyr findleyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, thanks.

@findleyr
findleyr merged commit 3da831b into main Jun 25, 2025
2 checks passed
@findleyr
findleyr deleted the jba-newschema branch December 7, 2025 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants