@useconstructor/mcp 1.0.3 → 1.0.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/package.json +1 -1
- package/src/mcp/server-stdio.ts +20 -1
package/package.json
CHANGED
package/src/mcp/server-stdio.ts
CHANGED
|
@@ -40,7 +40,6 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
40
40
|
project_id: { type: 'string', description: 'Existing project ID to modify (omit for new project)' },
|
|
41
41
|
project_name: { type: 'string', description: 'Name for the new project' },
|
|
42
42
|
context: { type: 'string', description: 'Additional business context' },
|
|
43
|
-
builder_model: { type: 'string', enum: ['modal_claude_code', 'codex'] },
|
|
44
43
|
},
|
|
45
44
|
},
|
|
46
45
|
},
|
|
@@ -100,6 +99,17 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
100
99
|
},
|
|
101
100
|
},
|
|
102
101
|
},
|
|
102
|
+
{
|
|
103
|
+
name: 'publish_project',
|
|
104
|
+
description: 'Publish a Constructor project to production. Call this after reviewing a preview URL returned by a change job (create_job with project_id). Promotes the dev branch to main so the change goes live at the production URL.',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
required: ['project_id'],
|
|
108
|
+
properties: {
|
|
109
|
+
project_id: { type: 'string', description: 'The project ID to publish' },
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
103
113
|
],
|
|
104
114
|
}));
|
|
105
115
|
|
|
@@ -157,6 +167,15 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
157
167
|
result = await res.json();
|
|
158
168
|
break;
|
|
159
169
|
}
|
|
170
|
+
case 'publish_project': {
|
|
171
|
+
const res = await fetch(`${API_BASE}/v1/projects/${args.project_id}/publish`, {
|
|
172
|
+
method: 'POST',
|
|
173
|
+
headers: auth(),
|
|
174
|
+
body: JSON.stringify({}),
|
|
175
|
+
});
|
|
176
|
+
result = await res.json();
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
160
179
|
default:
|
|
161
180
|
return { content: [{ type: 'text', text: `Unknown tool: ${name}` }], isError: true };
|
|
162
181
|
}
|