@genart-dev/mcp-server 0.4.3 → 0.4.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.
- package/dist/index.cjs +21 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -1
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +21 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.js +21 -1
- package/dist/lib.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.cjs
CHANGED
|
@@ -5189,11 +5189,31 @@ function registerSketchTools(server, state) {
|
|
|
5189
5189
|
).optional().describe('Component dependencies. Use list_components to see available. Keys are component names, values are semver ranges (e.g. "^1.0.0") or objects with version/code/exports.'),
|
|
5190
5190
|
addToWorkspace: import_zod2.z.string().optional().describe("Path to workspace to add sketch to after creation"),
|
|
5191
5191
|
agent: import_zod2.z.string().optional().describe("Your CLI agent name (e.g. 'claude-code', 'codex-cli', 'gemini-cli', 'opencode', 'kiro')"),
|
|
5192
|
-
model: import_zod2.z.string().optional().describe("Your AI model identifier (e.g. 'claude-opus-4-6', 'gpt-4o', 'gemini-2.5-pro')")
|
|
5192
|
+
model: import_zod2.z.string().optional().describe("Your AI model identifier (e.g. 'claude-opus-4-6', 'gpt-4o', 'gemini-2.5-pro')"),
|
|
5193
|
+
capture: import_zod2.z.boolean().optional().describe("When true, automatically capture a screenshot after creation and return it inline (avoids a separate capture_screenshot call)")
|
|
5193
5194
|
},
|
|
5194
5195
|
async (args) => {
|
|
5195
5196
|
try {
|
|
5196
5197
|
const result = await createSketch(state, args);
|
|
5198
|
+
if (args.capture && !state.remoteMode) {
|
|
5199
|
+
try {
|
|
5200
|
+
const captureResult = await captureScreenshot(state, {
|
|
5201
|
+
target: "sketch",
|
|
5202
|
+
sketchId: args.id
|
|
5203
|
+
});
|
|
5204
|
+
return {
|
|
5205
|
+
content: [
|
|
5206
|
+
{ type: "text", text: JSON.stringify({ ...result, capture: captureResult.metadata }, null, 2) },
|
|
5207
|
+
{ type: "image", data: captureResult.previewJpegBase64, mimeType: "image/jpeg" }
|
|
5208
|
+
]
|
|
5209
|
+
};
|
|
5210
|
+
} catch (captureErr) {
|
|
5211
|
+
return jsonResult({
|
|
5212
|
+
...result,
|
|
5213
|
+
captureError: captureErr instanceof Error ? captureErr.message : String(captureErr)
|
|
5214
|
+
});
|
|
5215
|
+
}
|
|
5216
|
+
}
|
|
5197
5217
|
return jsonResult(result);
|
|
5198
5218
|
} catch (e) {
|
|
5199
5219
|
return toolError(e instanceof Error ? e.message : String(e));
|