Skip to content

Conversation

@pushpak1300
Copy link
Member

@pushpak1300 pushpak1300 commented Oct 29, 2025

Problem

When a Tool has no input parameters, JsonSchema’s serializer omits the properties field entirely. While the MCP specification doesn’t explicitly require properties to be present, some strict model providers (like GPT-5) expect it and fail with “invalid argument” errors when it’s missing.

Solution

Explicitly set properties to an empty object {} when not present to ensure maximum compatibility with strict JSON Schema validators.

Testing

  1. Create a tool with no input parameters.
  2. Connect using Windsurf with GPT-5 models.
  3. Verify the tool loads without errors.

Fixes: laravel/boost#278

@pushpak1300 pushpak1300 marked this pull request as ready for review October 29, 2025 11:26
@taylorotwell taylorotwell merged commit dc722a4 into main Oct 29, 2025
18 checks passed
@taylorotwell taylorotwell deleted the fix/tool-schema-properties-field- branch October 29, 2025 14:26
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.

3 participants