Skip to content

Commit 98a69ba

Browse files
committed
prettier fix
1 parent f02ff1a commit 98a69ba

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

src/server/mcp.test.ts

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,20 +1168,21 @@ describe('tool()', () => {
11681168
await Promise.all([client.connect(clientTransport), mcpServer.server.connect(serverTransport)]);
11691169

11701170
// Call the tool and expect it to throw an error
1171-
const result =
1172-
await client.callTool({
1173-
name: 'test',
1174-
arguments: {
1175-
input: 'hello'
1176-
}
1177-
});
1171+
const result = await client.callTool({
1172+
name: 'test',
1173+
arguments: {
1174+
input: 'hello'
1175+
}
1176+
});
11781177

11791178
expect(result.isError).toBe(true);
11801179
expect(result.content).toEqual(
11811180
expect.arrayContaining([
11821181
{
11831182
type: 'text',
1184-
text: expect.stringContaining('Output validation error: Tool test has an output schema but no structured content was provided')
1183+
text: expect.stringContaining(
1184+
'Output validation error: Tool test has an output schema but no structured content was provided'
1185+
)
11851186
}
11861187
])
11871188
);
@@ -1300,11 +1301,11 @@ describe('tool()', () => {
13001301

13011302
// Call the tool and expect it to throw a server-side validation error
13021303
const result = await client.callTool({
1303-
name: 'test',
1304-
arguments: {
1305-
input: 'hello'
1306-
}
1307-
});
1304+
name: 'test',
1305+
arguments: {
1306+
input: 'hello'
1307+
}
1308+
});
13081309

13091310
expect(result.isError).toBe(true);
13101311
expect(result.content).toEqual(

src/server/mcp.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export class McpServer {
163163
`Output validation error: Tool ${request.params.name} has an output schema but no structured content was provided`
164164
);
165165
}
166-
166+
167167
// if the tool has an output schema, validate structured content
168168
const parseResult = await tool.outputSchema.safeParseAsync(result.structuredContent);
169169
if (!parseResult.success) {
@@ -177,8 +177,6 @@ export class McpServer {
177177
return this.createToolError(error instanceof Error ? error.message : String(error));
178178
}
179179

180-
181-
182180
return result;
183181
});
184182

0 commit comments

Comments
 (0)