Skip to content

Commit e4d4ff0

Browse files
Merge branch 'main' into main
2 parents 51f2f72 + d127ee8 commit e4d4ff0

File tree

6 files changed

+50
-14
lines changed

6 files changed

+50
-14
lines changed

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-client",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "Client-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

client/src/components/ToolsTab.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,11 @@ const ToolsTab = ({
220220
</div>
221221
) : (
222222
<Input
223-
type={prop.type === "number" ? "number" : "text"}
223+
type={
224+
prop.type === "number" || prop.type === "integer"
225+
? "number"
226+
: "text"
227+
}
224228
id={key}
225229
name={key}
226230
placeholder={prop.description}
@@ -229,7 +233,8 @@ const ToolsTab = ({
229233
setParams({
230234
...params,
231235
[key]:
232-
prop.type === "number"
236+
prop.type === "number" ||
237+
prop.type === "integer"
233238
? Number(e.target.value)
234239
: e.target.value,
235240
})

client/src/components/__tests__/ToolsTab.test.tsx

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ describe("ToolsTab", () => {
1717
},
1818
},
1919
},
20+
{
21+
name: "tool3",
22+
description: "Integer tool",
23+
inputSchema: {
24+
type: "object" as const,
25+
properties: {
26+
count: { type: "integer" as const },
27+
},
28+
},
29+
},
2030
{
2131
name: "tool2",
2232
description: "Second tool",
@@ -62,7 +72,7 @@ describe("ToolsTab", () => {
6272
// Switch to second tool
6373
rerender(
6474
<Tabs defaultValue="tools">
65-
<ToolsTab {...defaultProps} selectedTool={mockTools[1]} />
75+
<ToolsTab {...defaultProps} selectedTool={mockTools[2]} />
6676
</Tabs>,
6777
);
6878

@@ -71,6 +81,7 @@ describe("ToolsTab", () => {
7181
expect(newInput.value).toBe("");
7282
});
7383

84+
7485
it("should display error message when error prop is provided", () => {
7586
const errorMessage = "Test error message";
7687
renderToolsTab({
@@ -81,5 +92,25 @@ describe("ToolsTab", () => {
8192
// Verify error message is displayed
8293
expect(screen.getByText("Error")).toBeTruthy();
8394
expect(screen.getByText(errorMessage)).toBeTruthy();
95+
});
96+
97+
it("should handle integer type inputs", () => {
98+
renderToolsTab({
99+
selectedTool: mockTools[1], // Use the tool with integer type
100+
});
101+
102+
const input = screen.getByRole("spinbutton", {
103+
name: /count/i,
104+
}) as HTMLInputElement;
105+
expect(input).toHaveProperty("type", "number");
106+
fireEvent.change(input, { target: { value: "42" } });
107+
expect(input.value).toBe("42");
108+
109+
const submitButton = screen.getByRole("button", { name: /run tool/i });
110+
fireEvent.click(submitButton);
111+
112+
expect(defaultProps.callTool).toHaveBeenCalledWith(mockTools[1].name, {
113+
count: 42,
114+
});
84115
});
85116
});

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",
@@ -36,8 +36,8 @@
3636
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
3737
},
3838
"dependencies": {
39-
"@modelcontextprotocol/inspector-client": "^0.7.0",
40-
"@modelcontextprotocol/inspector-server": "^0.7.0",
39+
"@modelcontextprotocol/inspector-client": "^0.8.0",
40+
"@modelcontextprotocol/inspector-server": "^0.8.0",
4141
"concurrently": "^9.0.1",
4242
"shell-quote": "^1.8.2",
4343
"spawn-rx": "^5.1.2",

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@modelcontextprotocol/inspector-server",
3-
"version": "0.7.0",
3+
"version": "0.8.0",
44
"description": "Server-side application for the Model Context Protocol inspector",
55
"license": "MIT",
66
"author": "Anthropic, PBC (https://anthropic.com)",

0 commit comments

Comments
 (0)