@smithery/sdk 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,17 +3,18 @@ import { CallToolResultSchema, } from "@modelcontextprotocol/sdk/types.js";
3
3
  * Wraps each tool call so any errors get sent back to the LLM instead of throwing
4
4
  */
5
5
  export function wrapErrorAdapter(client) {
6
- const callTool = client.callTool;
6
+ const callTool = client.callTool.bind(client);
7
7
  client.callTool = async (params, resultSchema = CallToolResultSchema, options) => {
8
8
  try {
9
9
  return await callTool(params, resultSchema, options);
10
10
  }
11
- catch (e) {
11
+ catch (err) {
12
+ console.error("Tool calling error:", err);
12
13
  return {
13
14
  content: [
14
15
  {
15
16
  type: "text",
16
- text: JSON.stringify(e),
17
+ text: JSON.stringify(err, Object.getOwnPropertyNames(err)),
17
18
  },
18
19
  ],
19
20
  isError: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithery/sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "Connect language models to Model Context Protocols",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -20,9 +20,6 @@
20
20
  "link": "npm link -ws --include-workspace-root"
21
21
  },
22
22
  "license": "GPL-3.0-only",
23
- "workspaces": [
24
- "mcps/*"
25
- ],
26
23
  "dependencies": {
27
24
  "@anthropic-ai/sdk": "^0.32.1",
28
25
  "@icons-pack/react-simple-icons": "^10.2.0",