Skip to main content
Glama
mo666-med

Enhanced Miyabi MCP Server

by mo666-med

miyabi__auto_dispatch

Automatically routes tasks to appropriate handlers: development tasks to Miyabi Agent, general tasks to Manus for processing.

Instructions

タスクを自動的に適切なハンドラーに振り分けます(開発タスク→Miyabi、一般タスク→Manus)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes振り分けるタスクのプロンプト

Implementation Reference

  • Core execution logic for the miyabi__auto_dispatch tool. Analyzes the input prompt to determine if it's an article writing task, development task, or general task, and returns appropriate dispatch instructions.
    case "miyabi__auto_dispatch": {
      const isDev = isDevelopmentTask(args.prompt);
      const isArticle = isArticleWritingTask(args.prompt);
      
      if (isArticle) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              action: "handle_article",
              message: "記事執筆タスクとして処理します",
              nextStep: "miyabi__generate_articleツールを使用してください"
            }, null, 2)
          }]
        };
      } else if (isDev) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              action: "handle_development",
              message: "開発タスクとしてMiyabiで処理します",
              nextStep: "miyabi__handle_development_taskツールを使用してください"
            }, null, 2)
          }]
        };
      } else {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              action: "return_to_manus",
              message: "一般タスクとしてManusで処理します"
            }, null, 2)
          }]
        };
      }
    }
  • Input schema and metadata definition for the miyabi__auto_dispatch tool, returned by listToolsHandler.
    {
      name: "miyabi__auto_dispatch",
      description: "タスクを自動的に適切なハンドラーに振り分けます(開発タスク→Miyabi、一般タスク→Manus)",
      inputSchema: {
        type: "object",
        properties: {
          prompt: {
            type: "string",
            description: "振り分けるタスクのプロンプト"
          }
        },
        required: ["prompt"]
      }
    },
  • src/server.js:30-33 (registration)
    MCP server registration for ListToolsRequestSchema, which calls listToolsHandler including miyabi__auto_dispatch.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      const tools = listToolsHandler();
      return { tools };
    });
  • src/server.js:36-54 (registration)
    MCP server registration for CallToolRequestSchema, which routes tool calls to callToolHandler containing the miyabi__auto_dispatch case.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
      
      try {
        const result = callToolHandler(name, args || {});
        return result;
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              error: error.message,
              toolName: name
            }, null, 2)
          }],
          isError: true
        };
      }
    });
  • Helper function used by miyabi__auto_dispatch to detect development-related tasks based on keywords.
    export function isDevelopmentTask(prompt) {
      const devKeywords = [
        'コード', 'プログラム', 'バグ', 'デバッグ', 'テスト', 'デプロイ',
        'API', 'データベース', 'フロントエンド', 'バックエンド', 'リファクタリング',
        '実装', '開発', 'アプリ', 'ウェブサイト', 'システム', 'モジュール',
        'code', 'program', 'bug', 'debug', 'test', 'deploy',
        'api', 'database', 'frontend', 'backend', 'refactor',
        'implement', 'develop', 'app', 'website', 'system', 'module'
      ];
    
      const lowerPrompt = prompt.toLowerCase();
      return devKeywords.some(keyword => lowerPrompt.includes(keyword.toLowerCase()));
    }

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/mo666-med/enhanced-miyabi-mcp'

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