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
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | 振り分けるタスクのプロンプト |
Implementation Reference
- src/handlers.js:162-199 (handler)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) }] }; } }
- src/handlers.js:61-74 (schema)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 }; } });
- src/handlers.js:11-23 (helper)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())); }