[Server] Add support for icons on explicit builder registration and attributes (#142)

* Add support for icons on explicit builder registration and attributes

* Update docs/server-builder.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Christopher Hertel 2025-11-13 22:39:18 +01:00 • committed by GitHub
commit 056c7b6103
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 173 additions and 39 deletions

View file

@ -109,7 +109,8 @@ abstract class InspectorSnapshotTestCase extends TestCase
$expected = file_get_contents($snapshotFile);
$this->assertJsonStringEqualsJsonString($expected, $normalizedOutput);
$message = \sprintf('Output does not match snapshot "%s".', $snapshotFile);
$this->assertJsonStringEqualsJsonString($expected, $normalizedOutput, $message);
}
protected function normalizeTestOutput(string $output, ?string $testName = null): string

View file

@ -4,6 +4,15 @@
"name": "calculator_config",
"uri": "config://calculator/settings",
"description": "Current settings for the calculator tool (precision, allow_negative).",
"icons": [
{
"mimeType": "image/svg+xml",
"sizes": [
"any"
],
"src": "https://www.svgrepo.com/show/529867/settings.svg"
}
],
"mimeType": "application/json"
}
]

View file

@ -3,6 +3,15 @@
{
"name": "calculate",
"description": "Performs a calculation based on the operation.",
"icons": [
{
"mimeType": "image/svg+xml",
"sizes": [
"any"
],
"src": "https://www.svgrepo.com/show/530644/calculator.svg"
}
],
"inputSchema": {
"type": "object",
"properties": {