genkit
genkit copied to clipboard
[Docs] mcp input constraints lack clarity
Is your report related to a problem? Please describe. Initial MCP docs suggest there are some constraints on MCP prompts:
MCP prompts are only able to take string parameters, so inputs to schemas must be objects with only string property values.
But the example given shows:
ai.defineTool(
{
name: 'add',
description: 'add two numbers together',
// object with numbers, not strings
inputSchema: z.object({ a: z.number(), b: z.number() }),
outputSchema: z.number(),
},
async ({ a, b }) => {
return a + b;
}
);
Is your report related to a suggestion/improvement? Please describe. Looking for clarity on the constraint.
Additional context Add any other context or screenshots about the request here.