Skip to main content
Glama
shimizu

ModelsLab Text2Image MCP Server

by shimizu
ToolBase.js970 B
// ToolBase.js // MCPツールの基底クラス export class ToolBase { constructor() { this.name = 'base_tool'; // サブクラスでオーバーライド } /** * MCPツールスキーマの定義(サブクラスで実装必須) */ getSchema() { throw new Error('getSchema() must be implemented by subclass'); } /** * ツールの実行(サブクラスで実装必須) */ async execute(args) { throw new Error('execute() must be implemented by subclass'); } /** * 統一されたレスポンスフォーマット */ formatResponse(data, metadata = {}) { return { content: [ { type: 'text', text: JSON.stringify({ success: true, data: data, metadata: { tool: this.name, timestamp: new Date().toISOString(), ...metadata } }, null, 2) } ] }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/shimizu/modelslab-text2img-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server