Tools declaring empty inputSchema render properties as [] instead of {}
## Problem Follow-up to #3585889 / MR !38, which fixed the tool bridge deriver path. The same JSON-encoding trap exists for tools defined directly via the `#[Tool]` attribute (or any plugin whose `getInputSchema()` returns `[]`). An empty PHP array `[]` json-encodes to `[]`, but MCP requires `inputSchema.properties` to be an object `{}`. A tool declaring: ```php #[Tool( inputSchema: ['type' => 'object', 'properties' => []], )] ``` or relying on `ToolPluginBase::getInputSchema()` default (`return [];`) emits an invalid schema with `"properties": []`. ## Scope - `src/Plugin/ToolPluginBase.php` — default `getInputSchema()` / empty attribute `inputSchema`. - `src/McpServerFactory.php` — normalize `properties` to `stdClass` before handing the schema to the SDK `Tool`, so all tool sources get the fix in one place rather than per-deriver. ## Suggested fix Normalize empty `properties` to `new \stdClass()` centrally in the factory, matching MR !38's deriver fix. 🤖 Assisted with AI
issue