robloxstudio-mcp 2.7.0-next.3 → 2.7.0-next.4

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.
Files changed (2) hide show
  1. package/dist/index.js +20 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2496,6 +2496,18 @@ ${code}`
2496
2496
  }]
2497
2497
  };
2498
2498
  }
2499
+ async resolveImageId(decalAssetId) {
2500
+ try {
2501
+ const resp = await fetch(`https://economy.roblox.com/v2/assets/${decalAssetId}/details`);
2502
+ if (!resp.ok)
2503
+ return decalAssetId;
2504
+ const details = await resp.json();
2505
+ if (details.TextureId)
2506
+ return String(details.TextureId);
2507
+ } catch {
2508
+ }
2509
+ return decalAssetId;
2510
+ }
2499
2511
  async uploadDecal(filePath, displayName, description, userId, groupId) {
2500
2512
  if (!fs.existsSync(filePath)) {
2501
2513
  throw new Error(`File not found: ${filePath}`);
@@ -2517,10 +2529,15 @@ ${code}`
2517
2529
  description: description || "",
2518
2530
  creationContext: { creator }
2519
2531
  }, fileContent, fileName);
2532
+ const decalId = result.response?.assetId;
2533
+ const imageId = decalId ? await this.resolveImageId(decalId) : void 0;
2520
2534
  return {
2521
2535
  content: [{
2522
2536
  type: "text",
2523
- text: JSON.stringify(result)
2537
+ text: JSON.stringify({
2538
+ ...result,
2539
+ imageId
2540
+ })
2524
2541
  }]
2525
2542
  };
2526
2543
  }
@@ -2535,7 +2552,8 @@ ${code}`
2535
2552
  assetId: String(result.assetId),
2536
2553
  displayName,
2537
2554
  assetType: "Decal",
2538
- backingAssetId: String(result.backingAssetId)
2555
+ backingAssetId: String(result.backingAssetId),
2556
+ imageId: String(result.backingAssetId)
2539
2557
  }
2540
2558
  })
2541
2559
  }]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robloxstudio-mcp",
3
- "version": "2.7.0-next.3",
3
+ "version": "2.7.0-next.4",
4
4
  "description": "MCP Server for Roblox Studio Integration - Access Studio data, scripts, and objects through AI tools",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",