@netpad/mcp-server 2.4.0 → 2.4.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.
package/dist/index.js CHANGED
@@ -22053,7 +22053,7 @@ See the full source code in \`packages/demo-node/src/index.ts\` for complete imp
22053
22053
  );
22054
22054
  server.tool(
22055
22055
  "generate_form",
22056
- "Generate a complete NetPad form configuration from a description. Returns validated TypeScript code by default (can optionally return JSON). The TypeScript output includes inline types, form config, and API functions - ready to run with `npx tsx`.",
22056
+ "Generate a complete NetPad form configuration from a description. IMPORTANT: The output includes a direct import link that users should click to import the form into NetPad - always present this link prominently to users. Also returns TypeScript code for programmatic use.",
22057
22057
  {
22058
22058
  description: external_exports.string().describe("Natural language description of the form to generate"),
22059
22059
  formName: external_exports.string().describe("Name of the form"),
@@ -22167,11 +22167,6 @@ async function main() {
22167
22167
  functionsCode,
22168
22168
  mainCode
22169
22169
  });
22170
- const output = createToolOutput({
22171
- code,
22172
- filename: `${slug}.ts`,
22173
- envVars: STANDARD_ENV_VARS
22174
- });
22175
22170
  const importConfig = {
22176
22171
  name: schema.name,
22177
22172
  description: schema.description,
@@ -22182,17 +22177,33 @@ async function main() {
22182
22177
  const base64Config = Buffer.from(JSON.stringify(importConfig)).toString("base64");
22183
22178
  const baseUrl = process.env.NETPAD_URL || "https://netpad.io";
22184
22179
  const importUrl = `${baseUrl}/api/forms/import?config=${base64Config}&source=claude-mcp`;
22185
- const outputWithImport = formatToolOutput(output) + `
22180
+ const output = createToolOutput({
22181
+ code,
22182
+ filename: `${slug}.ts`,
22183
+ envVars: STANDARD_ENV_VARS
22184
+ });
22185
+ const outputWithImport = `# ${schema.name}
22186
+
22187
+ ${schema.description || ""}
22188
+
22189
+ ## \u{1F680} Import to NetPad (Recommended)
22190
+
22191
+ Click this link to import the form directly into your NetPad account:
22192
+
22193
+ **[\u27A1\uFE0F Import "${schema.name}" to NetPad](${importUrl})**
22194
+
22195
+ This will open NetPad where you can:
22196
+ 1. Select a project to import into
22197
+ 2. Preview and customize the form
22198
+ 3. Save and deploy
22186
22199
 
22187
22200
  ---
22188
22201
 
22189
- ## Quick Import (No Code Required!)
22202
+ ## Alternative: TypeScript Code
22190
22203
 
22191
- Click this link to import the form directly into NetPad:
22192
- **[Import to NetPad](${importUrl})**
22204
+ If you prefer to work with code, here's the complete TypeScript implementation:
22193
22205
 
22194
- Or use the create_import_link tool for a shorter, more reliable link (recommended for complex forms).
22195
- `;
22206
+ ${formatToolOutput(output)}`;
22196
22207
  return {
22197
22208
  content: [
22198
22209
  {