Skip to main content
Glama
shimizu

ModelsLab Text2Image MCP Server

by shimizu
hello.js1.17 kB
// hello.js // シンプルなHello Worldツール(テンプレート動作確認用) import { ToolBase } from '../core/ToolBase.js'; class HelloTool extends ToolBase { constructor() { super(); this.name = 'hello'; } getSchema() { return { name: 'hello', title: 'Hello World Tool', description: 'シンプルなHello Worldレスポンス(テンプレート動作確認用)', inputSchema: { type: 'object', properties: { name: { type: 'string', description: '名前(オプション)' } } } }; } async execute(args) { const name = args.name || 'World'; const message = `Hello ${name}!`; return this.formatResponse(message, { input: args, description: 'テンプレート用のシンプルなサンプルツールです' }); } } // ツールのインスタンスを作成 const helloTool = new HelloTool(); // スキーマとハンドラーをエクスポート export const helloToolSchema = helloTool.getSchema(); export const hello = async (args) => { return await helloTool.execute(args); };

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