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()));
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the dispatch behavior but lacks details on how the routing decision is made (e.g., based on criteria, thresholds), what happens if classification fails, whether it's idempotent, or any rate limits/authentication needs. This leaves significant behavioral gaps for a tool that makes routing decisions.

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

Conciseness5/5

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

The description is a single, efficient sentence in Japanese that directly states the tool's function and routing logic. It's front-loaded with the core purpose and includes essential context without unnecessary details, making it highly concise and well-structured.

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

Completeness2/5

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

Given no annotations, no output schema, and a single parameter with full schema coverage, the description is incomplete. It doesn't explain what the tool returns (e.g., handler identifier, confidence score), error conditions, or behavioral nuances like how 'appropriate' is determined. For a decision-making tool, this lacks critical context.

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

Parameters3/5

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

Schema description coverage is 100%, with the single parameter 'prompt' documented as '振り分けるタスクのプロンプト' (prompt of the task to dispatch). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool's purpose: automatically dispatches tasks to appropriate handlers based on task type (development tasks to Miyabi, general tasks to Manus). It uses specific verbs ('振り分けます' - dispatches) and identifies the resource (tasks), but doesn't explicitly differentiate from sibling tools like miyabi__analyze_task_intent or miyabi__handle_development_task.

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

Usage Guidelines3/5

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

The description implies usage context by mentioning task types (development vs. general) and target handlers (Miyabi vs. Manus), suggesting this tool is for routing decisions. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like miyabi__handle_development_task or when not to use it (e.g., for tasks already classified).

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

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