mcp-tool-router mcp

v1.0.0 · MCP Tool · ai · registry.pascalai.org

Automatically select the best MCP tool(s) for a given user intent using LLM-based classification against the PPM tool registry (GET /v1/mcp/discover). Returns ranked tool recommendations with input parameter suggestions.

routertool-selectionintentclassificationorchestrationagent

MakerAI Pipeline

Input Parameters

ParameterTypeDescription
intentrequired string Natural language description of what the user wants to accomplish.
top_koptional integer Number of tool recommendations to return. Default: 3. Default: 3.
modeloptional string LLM model for intent classification. Empty = router default.
suggest_inputsoptional boolean If true, suggest input parameters for each recommended tool. Default: true. Default: True.
filter_typeoptional string Filter tools by category. Default: 'all'. One of: all, ai, data, communication, developer, search. Default: all.

Output Fields

FieldTypeDescription
intent string
recommendations array[object]
model string

Examples

Route a data analysis intent

// Input
{
  "intent": "I want to analyze sales data from a CSV file and find top performing regions",
  "top_k": 2
}

// Output
{
  "intent": "Analyze sales CSV, find top regions",
  "recommendations": [
    {
      "tool": "mcp-duckdb",
      "confidence": 0.95,
      "reason": "DuckDB excels at analytical queries over CSV files",
      "suggested_input": {
        "operation": "query",
        "sql": "SELECT region, SUM(sales) FROM read_csv('sales.csv') GROUP BY region ORDER BY 2 DESC"
      }
    },
    {
      "tool": "mcp-sqlite",
      "confidence": 0.61,
      "reason": "Alternative if data is already in a SQLite file",
      "suggested_input": {
        "operation": "query",
        "sql": "SELECT region, SUM(amount) FROM sales GROUP BY region"
      }
    }
  ]
}

Install & Discovery

Install

ppm install mcp-tool-router

Get JSON Schema

GET /v1/packages/mcp-tool-router/1.0.0/schema

Discover by keyword

GET /v1/mcp/discover?q=router
Discovery hint: Install with ppm install mcp-tool-router or invoke remotely via POST /v1/invoke/mcp-tool-router on the MCP Service.

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-tool-router');
var R := Tool.Call(JsonObj(['intent','Search the web for recent AI news and summarize results','top_k',2]));
Writeln(R['recommendations'][0]['tool']);