@osaas/mcp-server
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -31,2 +31,3 @@ import { createInstance, getInstance } from '@osaas/client-core'; | ||
return { | ||
name: instance.name, | ||
endpoint: instance.url, | ||
@@ -33,0 +34,0 @@ accessKeyId: 'root', |
import { z } from 'zod'; | ||
export const CreateDatabaseSchema = z.object({ | ||
name: z.string().describe('Name of the database'), | ||
name: z | ||
.string() | ||
.regex(/^[a-z0-9]+$/) | ||
.describe('Name of the database'), | ||
type: z.string().describe('Type of database [SQL, NoSQL, MemoryDb]') | ||
}); | ||
export const CreateBucketSchema = z.object({ | ||
name: z.string().describe('Name of the bucket') | ||
name: z | ||
.string() | ||
.regex(/^[a-z0-9]+$/) | ||
.describe('Name of the bucket') | ||
}); | ||
export const StorageBucket = z.object({ | ||
name: z | ||
.string() | ||
.regex(/^[a-z0-9]+$/) | ||
.describe('Name of the bucket'), | ||
endpoint: z.string().describe('Endpoint of the bucket'), | ||
accessKeyId: z.string().describe('Access key ID'), | ||
secretAccessKey: z.string().describe('Secret access key') | ||
}); | ||
export const CreateVodPipelineSchema = z.object({ | ||
name: z.string().describe('Name of the pipeline'), | ||
output: z.string().describe('Output bucket') | ||
name: z | ||
.string() | ||
.regex(/^[a-z0-9]+$/) | ||
.describe('Name of the pipeline'), | ||
redisUrl: z.string().describe('Redis URL'), | ||
output: StorageBucket.describe('Storage bucket') | ||
}); | ||
@@ -13,0 +32,0 @@ export const RemoveVodPipelineSchema = z.object({ |
@@ -53,3 +53,3 @@ import { zodToJsonSchema } from 'zod-to-json-schema'; | ||
const args = CreateVodPipelineSchema.parse(request.params.arguments); | ||
const pipeline = await createVodPipeline(args.name, args.output, context); | ||
const pipeline = await createVodPipeline(args.name, args.redisUrl, args.output, context); | ||
return { toolResult: pipeline }; | ||
@@ -96,6 +96,7 @@ } | ||
} | ||
export async function createVodPipeline(name, output, context) { | ||
const storage = await createMinioInstance(context, output); | ||
export async function createRedisInstance(name, context) { | ||
return await createValkeyInstance(context, name); | ||
} | ||
export async function createVodPipeline(name, redisUrl, storage, context) { | ||
const transcoder = await createEncoreInstance(context, name); | ||
const redisUrl = await createValkeyInstance(context, name); | ||
const encoreCallback = await createEncoreCallbackListenerInstance(context, name, redisUrl, transcoder.url); | ||
@@ -102,0 +103,0 @@ const packager = await createEncorePackager(context, name, redisUrl, `s3://${name}/`, storage.accessKeyId, storage.secretAccessKey, storage.endpoint); |
{ | ||
"name": "@osaas/mcp-server", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "MCP server for using the Eyevinn Open Source Cloud API", | ||
@@ -25,4 +25,4 @@ "license": "MIT", | ||
"@modelcontextprotocol/sdk": "0.6.0", | ||
"@osaas/client-core": "^0.14.0", | ||
"@osaas/client-services": "^0.2.2", | ||
"@osaas/client-core": "^0.14.1", | ||
"@osaas/client-services": "^0.2.3", | ||
"dotenv": "^16.4.5", | ||
@@ -29,0 +29,0 @@ "minio": "^8.0.2", |
22091
424
Updated@osaas/client-core@^0.14.1