{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreibiydttrewxqgqa56fu7cgzgjtexlhef2gtquapapk3fdxhhtn6pi",
    "uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mihreelws4b2"
  },
  "path": "/t/agent-ignores-tool-parameter-names-on-first-call/1378336#post_1",
  "publishedAt": "2026-04-01T21:29:21.000Z",
  "site": "https://community.openai.com",
  "textContent": "Hi there,\n\nWe 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.\n\nSchema defines | Agent sends (1st attempt) | Agent sends (2nd attempt)\n---|---|---\n`locationIds: [\"NYC\", \"LAX\"]` (array) | `locationId: \"NYC\"` (string) | `locationIds: [\"NYC\", \"LAX\"]`\n`categoryIds: [\"A\", \"B\"]` | `categories: [\"A\", \"B\"]` | `categoryIds: [\"A\", \"B\"]`\n`startDate` + `endDate` | `date: \"2026-06-25\"` | `startDate` + `endDate`\n`userTypes: [\"ADULT\", \"ADULT\", \"CHILD\"]` | `adults: 2, children: 1` | still `adults: 2`, never uses `userTypes`\n\nAs 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.\n\nWe 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:\n\n\n    server.registerTool(\"my_tool\", {\n      inputSchema: {\n        itemIds: z.array(z.string()).describe(\"List of item IDs, e.g. ['abc', 'def']\"),\n        startDate: z.string().describe(\"Start date in YYYY-MM-DD format\"),\n        endDate: z.string().describe(\"End date in YYYY-MM-DD format\"),\n      },\n      ...\n    });\n\n\nAre there schema design guidelines that improve first-call accuracy?\n\nThank you!",
  "title": "Agent ignores tool parameter names on first call"
}