Skip to content

Conversation

@jba
Copy link
Contributor

@jba jba commented Jun 24, 2025

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
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
Copy link
Contributor

@findleyr findleyr left a comment

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
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.

3 participants