-
Notifications
You must be signed in to change notification settings - Fork 765
Regression in 1.11.1: not assigning tool arguments in schema #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Someone from Vercel pointed me to this issue, it appears that I have the same issue. Using 1.10.2 brings back the arguments. If that helps, I have a basic reproduction using SvelteKit's boilerplate here: https://github.com/axel-rock/sveltekit-mcp |
This fragment is returning const isZodRawShape = (obj: unknown): obj is ZodRawShape => {
if (typeof obj !== "object" || obj === null) return false;
const isEmptyObject = z.object({}).strict().safeParse(obj).success;
// Check if object is empty or at least one property is a ZodType instance
return isEmptyObject || Object.values(obj as object).some(v => v instanceof ZodType);
}; Particularly this part is returning false: The argument could be like this: const t = server.tool(
"echo",
"Echo a message",
{ message: z.string() },
async ({ message }) => ({
content: [{ type: "text", text: `Tool echo: ${message}` }],
})
); Once I try the same |
Seems to be resolved here #468 |
I confirm that it works with 1.11.2 🙏 |
When defining a tool in 1.11.1, the tool arguments don't appear on the MCP client.
However, using 1.10.2, they do.
Something must have broken between these two versions.
For more detail, see issue in Vercel MCP adapter repo.
vercel-labs/mcp-for-next.js#9
The text was updated successfully, but these errors were encountered: