@shippo/shippo-mcp 0.8.48 → 1.0.1

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.
@@ -114,8 +114,14 @@ export function createRegisterTool(
114
114
  getSDK: () => ShippoSDKCore,
115
115
  allowedScopes: Set<MCPScope>,
116
116
  allowedTools?: Set<string>,
117
- ): <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void {
118
- return <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>): void => {
117
+ ): [
118
+ <A extends ZodRawShape | undefined>(tool: ToolDefinition<A>) => void,
119
+ Array<{ name: string; description: string }>,
120
+ ] {
121
+ const tools: Array<{ name: string; description: string }> = [];
122
+ const registerTool = <A extends ZodRawShape | undefined>(
123
+ tool: ToolDefinition<A>,
124
+ ): void => {
119
125
  if (allowedTools && !allowedTools.has(tool.name)) {
120
126
  return;
121
127
  }
@@ -154,5 +160,8 @@ export function createRegisterTool(
154
160
  }
155
161
 
156
162
  logger.debug("Registered tool", { name: tool.name });
163
+ tools.push({ name: tool.name, description: tool.description });
157
164
  };
165
+
166
+ return [registerTool, tools];
158
167
  }