Skip to main content
Glama
kokushin

exia-scenario-generator MCP Server

by kokushin

exiaVoiceroidExplain

Explain topics using the Kotonoha Sisters Explainer style for the exia novel game engine. Generates scenarios based on user-provided topics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYes

Implementation Reference

  • The complete handler function for the 'exiaVoiceroidExplain' MCP tool. It performs scenario generation using OpenAI, parses it for VOICERROID/Exia format, checks and performs Exia setup if needed, saves the scenario, starts the Exia application, and returns a success message. All steps are wrapped in try-catch for robust error handling.
    server.tool("exiaVoiceroidExplain", { topic: z.string() }, async ({ topic }) => {
      try {
        // 各ステップの結果を保存する変数
        let rawScenario: string;
        let scenario: any;
        let url: string;
        let setupNeeded = false;
    
        // 1. シナリオの生成
        console.error(`Generating scenario for topic: ${topic}`);
        try {
          rawScenario = await generateVoiceroidScenario({ topic, minLength: 2000 });
          console.error("Scenario generation completed successfully");
        } catch (error) {
          console.error("Error generating scenario:", error);
          throw new Error(`シナリオの生成に失敗しました: ${error}`);
        }
    
        // 2. シナリオのパースとexia形式への変換
        console.error("Parsing scenario to exia format");
        try {
          scenario = parseVoiceroidScenario(rawScenario);
          console.error("Scenario parsing completed successfully");
        } catch (error) {
          console.error("Error parsing scenario:", error);
          throw new Error(`シナリオのパースに失敗しました: ${error}`);
        }
    
        // 3. exiaのセットアップ(必要な場合)
        try {
          setupNeeded = !(await exiaManager.checkSetup());
          if (setupNeeded) {
            console.error("Setting up exia");
            await exiaManager.setup();
            console.error("Exia setup completed successfully");
          } else {
            console.error("Exia is already set up");
          }
        } catch (error) {
          console.error("Error checking or setting up exia:", error);
          throw new Error(`exiaのセットアップに失敗しました: ${error}`);
        }
    
        // 4. シナリオの保存
        console.error("Saving scenario");
        try {
          await exiaManager.saveScenario(scenario);
          console.error("Scenario saved successfully");
        } catch (error) {
          console.error("Error saving scenario:", error);
          throw new Error(`シナリオの保存に失敗しました: ${error}`);
        }
    
        // 5. exiaの起動(必ず最後に実行)
        console.error("Starting exia (final step)");
        try {
          url = await exiaManager.start();
          console.error(`Exia started successfully at ${url}`);
        } catch (error) {
          console.error("Error starting exia:", error);
          throw new Error(`exiaの起動に失敗しました: ${error}`);
        }
    
        // 全ステップが成功した場合の応答
        // 明確な成功メッセージを返して、Claudeが誤ったエラーメッセージを表示しないようにする
        return {
          content: [
            {
              type: "text",
              text: `✅ 成功: 「${topic}」についての琴葉姉妹解説シナリオを生成し、exiaを正常に起動しました。\n\n処理は正常に完了しました。exiaアプリケーション(Electron)が別ウィンドウで起動しています。シナリオをお楽しみください。`,
            },
          ],
        };
      } catch (error) {
        console.error("Error in exiaVoiceroidExplain:", error);
        return {
          content: [
            {
              type: "text",
              text: `処理に失敗しました: ${error}`,
            },
          ],
          isError: true,
        };
      }
    });
  • Input schema for the exiaVoiceroidExplain tool, defining a single string parameter 'topic' validated by Zod.
    server.tool("exiaVoiceroidExplain", { topic: z.string() }, async ({ topic }) => {
  • src/server.ts:123-123 (registration)
    Registration of the exiaVoiceroidExplain tool on the MCP server, including schema and inline handler.
    server.tool("exiaVoiceroidExplain", { topic: z.string() }, async ({ topic }) => {
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Tool has no description.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/kokushin/exia-mcp'

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