Agent ignores tool parameter names on first call

Hi there,

We are building an MCP app using the OpenAI Apps SDK and noticing that the ChatGPT agent frequently sends tool calls with incorrect parameter names. The tool schemas are defined correctly, but the agent “improvises” — it then retries with, mostly, the correct names on the second attempt, which leads to duplicate widget renders and a degraded user experience.

Schema defines Agent sends (1st attempt) Agent sends (2nd attempt)
locationIds: ["NYC", "LAX"] (array) locationId: "NYC" (string) locationIds: ["NYC", "LAX"]
categoryIds: ["A", "B"] categories: ["A", "B"] categoryIds: ["A", "B"]
startDate + endDate date: "2026-06-25" startDate + endDate
userTypes: ["ADULT", "ADULT", "CHILD"] adults: 2, children: 1 still adults: 2, never uses userTypes

As a workaround, we accept common aliases in the tool handler and normalize them server-side (e.g., if we receive locationId as a string, wrap it into [locationId]). This works but feels brittle and adds maintenance overhead.

We use the MCP TypeScript SDK with Zod schemas, registered via server.registerTool(). Each parameter has a type, description, and defaults where appropriate. The schemas are straightforward — flat objects, no deep nesting. Example structure:

server.registerTool("my_tool", {
  inputSchema: {
    itemIds: z.array(z.string()).describe("List of item IDs, e.g. ['abc', 'def']"),
    startDate: z.string().describe("Start date in YYYY-MM-DD format"),
    endDate: z.string().describe("End date in YYYY-MM-DD format"),
  },
  ...
});

Are there schema design guidelines that improve first-call accuracy?

Thank you!