marble-headed-mcp 0.1.0 → 0.1.2
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 +20 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import path from 'path';
|
|
|
4
4
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
5
5
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
6
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
-
const DEFAULT_BASE_URL = 'http://localhost:
|
|
7
|
+
const DEFAULT_BASE_URL = 'http://localhost:4000/api/headed';
|
|
8
8
|
function resolveBaseUrl() {
|
|
9
9
|
const base = process.env.HEADED_SERVER_BASE_URL || DEFAULT_BASE_URL;
|
|
10
10
|
return base.replace(/\/+$/, '');
|
|
@@ -202,6 +202,21 @@ const TOOLS = [
|
|
|
202
202
|
additionalProperties: false,
|
|
203
203
|
},
|
|
204
204
|
},
|
|
205
|
+
{
|
|
206
|
+
name: 'get_container_logs',
|
|
207
|
+
description: 'Fetch container logs for a project (requires gcloud on the headed server).',
|
|
208
|
+
inputSchema: {
|
|
209
|
+
type: 'object',
|
|
210
|
+
properties: {
|
|
211
|
+
projectId: { type: 'number' },
|
|
212
|
+
timeStart: { type: 'string' },
|
|
213
|
+
timeEnd: { type: 'string' },
|
|
214
|
+
limit: { type: 'number' },
|
|
215
|
+
},
|
|
216
|
+
required: ['projectId'],
|
|
217
|
+
additionalProperties: false,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
205
220
|
{
|
|
206
221
|
name: 'save_image_base64',
|
|
207
222
|
description: 'Download an image URL to /tmp and return the file path.',
|
|
@@ -267,6 +282,10 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
267
282
|
const result = await postJson('/complete_project', args);
|
|
268
283
|
return { content: [{ type: 'text', text: JSON.stringify(result.json || { status: result.status, body: result.text }, null, 2) }] };
|
|
269
284
|
}
|
|
285
|
+
case 'get_container_logs': {
|
|
286
|
+
const result = await postJson('/get_container_logs', args);
|
|
287
|
+
return { content: [{ type: 'text', text: JSON.stringify(result.json || { status: result.status, body: result.text }, null, 2) }] };
|
|
288
|
+
}
|
|
270
289
|
case 'save_image_base64': {
|
|
271
290
|
const saveResult = await saveImageFromUrl({
|
|
272
291
|
url: args?.url,
|