Skip to content

mcp: add an example customizing a nested type schema#470

Merged
findleyr merged 1 commit intomodelcontextprotocol:mainfrom
findleyr:customschemas
Sep 17, 2025
Merged

mcp: add an example customizing a nested type schema#470
findleyr merged 1 commit intomodelcontextprotocol:mainfrom
findleyr:customschemas

Conversation

@findleyr
Copy link
Copy Markdown
Contributor

Add an example that demonstrates how to customize a nested type schema, which is a recurring problem for our users (see #467).

Fixes #467
Updates #368

Add an example that demonstrates how to customize a nested type schema,
which is a recurring problem for our users (see modelcontextprotocol#467).

Fixes modelcontextprotocol#467
Updates modelcontextprotocol#368
@findleyr findleyr requested a review from jba September 16, 2025 17:29
@findleyr findleyr merged commit bd6ffe3 into modelcontextprotocol:main Sep 17, 2025
5 checks passed
@findleyr findleyr deleted the customschemas branch September 25, 2025 17:33
xcoulon added a commit to xcoulon/argocd-mcp-server that referenced this pull request Mar 23, 2026
we need to stick to the mcp/go-sdk version 1.4.0
because the latest version (v1.4.1) upgraded to
Go 1.25 which is not compatible with our Go version :/

Also, validate the schemas for the tools, panic via
`log.Fatalf()` in the `init()` functions.

See modelcontextprotocol/go-sdk#470 for more details
on why we need to register an schema for the `metav1.Time` type (which uses
the `time.Time` type as an embedded field)

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
xcoulon added a commit to codeready-toolchain/argocd-mcp-server that referenced this pull request Mar 24, 2026
we need to stick to the mcp/go-sdk version 1.4.0
because the latest version (v1.4.1) upgraded to
Go 1.25 which is not compatible with our Go version :/

Also, validate the schemas for the tools, panic via
`log.Fatalf()` in the `init()` functions.

See modelcontextprotocol/go-sdk#470 for more details
on why we need to register an schema for the `metav1.Time` type (which uses
the `time.Time` type as an embedded field)

---------

Signed-off-by: Xavier Coulon <xcoulon@redhat.com>
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.

jsonschema reporting type "object" that should be "string" for nested time.Time struct

2 participants