Fix occurrence MCP schema and expose product sales

This commit is contained in:
gitea_admin committed 2026-10-12 21:47:12 +02:00
1 parent d871b94c52
commit b8ba2db7a5
4 files changed
+51 -4

No files matched your search

@@ -74,6 +74,11 @@ assert_test(count($tools) === 23, 'Expected 23 MCP tools, got ' . count($tools))
$occurrenceTool = array_values(array_filter($tools, static fn (array $tool): bool => $tool['name'] === 'market_management.update_occurrence'))[0] ?? null;
assert_test(is_array($occurrenceTool), 'Update occurrence MCP tool must exist');
assert_test(isset($occurrenceTool['inputSchema']['properties']['registration_note']), 'MCP occurrence schema must expose registration_note');
$createOccurrenceTool = array_values(array_filter($tools, static fn (array $tool): bool => $tool['name'] === 'market_management.create_occurrence'))[0] ?? null;
assert_test(is_array($createOccurrenceTool), 'Create occurrence MCP tool must exist');
$createProperties = $createOccurrenceTool['inputSchema']['properties'];
assert_test(isset($createProperties['place'], $createProperties['days']['items']['properties']['date']), 'Create occurrence schema must expose both levels');
assert_test(!isset($createProperties['days']['items']['properties']['place']), 'Occurrence fields must not be nested under days');
$actual = [];
foreach ($tools as $tool) {