-
Notifications
You must be signed in to change notification settings - Fork 656
[FEATURE]: Virtual meta-server - Comprehensive tool discovery and execution layer #2230
Copy link
Copy link
Open
Copy link
Labels
MUSTP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeenhancementNew feature or requestNew feature or requestpythonPython / backend development (FastAPI)Python / backend development (FastAPI)sweng-group-19Group 19 - AI-Powered Conversational Gateway & Semantic DiscoveryGroup 19 - AI-Powered Conversational Gateway & Semantic DiscoverytcdSwEng ProjectsSwEng Projects
Milestone
Metadata
Metadata
Assignees
Labels
MUSTP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeP1: Non-negotiable, critical requirements without which the product is non-functional or unsafeenhancementNew feature or requestNew feature or requestpythonPython / backend development (FastAPI)Python / backend development (FastAPI)sweng-group-19Group 19 - AI-Powered Conversational Gateway & Semantic DiscoveryGroup 19 - AI-Powered Conversational Gateway & Semantic DiscoverytcdSwEng ProjectsSwEng Projects
Type
Fields
Give feedbackNo fields configured for Feature.
🎯 Feature: Virtual Meta-Server - Comprehensive Tool Discovery & Execution Layer
Goal
Create a Virtual Meta-Server that exposes a complete set of meta-tools (
search_tools,list_tools,describe_tool,execute_tool,get_tool_categories,get_similar_tools) enabling AI agents to discover and invoke thousands of underlying tools through a unified, simple interface—while completely hiding the real tools from the agent's tool list.Why Now?
📖 User Stories
US-1: AI Agent - Semantic Search for Tools
As an AI Agent
I want to search for tools using natural language with multiple filter options
So that I find relevant tools without knowing exact names or browsing large catalogs
Acceptance Criteria:
US-2: AI Agent - List Tools with Pagination
As an AI Agent
I want to browse all available tools with pagination and filtering
So that I can explore the tool catalog systematically
Acceptance Criteria:
US-3: AI Agent - Get Detailed Tool Description
As an AI Agent
I want to get complete details about a specific tool including its full schema
So that I can understand exactly how to use it before execution
Acceptance Criteria:
US-4: AI Agent - Execute Tool
As an AI Agent
I want to execute a discovered tool through the meta-server
So that I can complete my task without managing backend connections
Acceptance Criteria:
US-5: AI Agent - Get Tool Categories
As an AI Agent
I want to browse available tool categories and their counts
So that I can understand what kinds of tools are available
Acceptance Criteria:
US-6: AI Agent - Find Similar Tools
As an AI Agent
I want to find tools similar to one I already know
So that I can discover alternatives or complementary tools
Acceptance Criteria:
US-7: Platform Admin - Create Scoped Meta-Server with Hidden Tools
As a Platform Administrator
I want to create a meta-server that completely hides underlying tools
So that AI agents only see meta-tools and can't bypass discovery
Acceptance Criteria:
🏗 Architecture
Meta-Tool Definitions
{ "tools": [ { "name": "search_tools", "description": "Search for tools using natural language or filters. Use this to find tools by describing what you need. Supports semantic search, tag filtering, server filtering, and more.", "inputSchema": { "type": "object", "properties": { "query": { "type": "string", "description": "Natural language search query (e.g., 'tools that can convert PDF to text')" }, "filters": { "type": "object", "description": "Optional filters to narrow results", "properties": { "tags": { "type": "array", "items": {"type": "string"}, "description": "Filter by tags (e.g., ['production', 'data'])" }, "exclude_tags": { "type": "array", "items": {"type": "string"}, "description": "Exclude tools with these tags" }, "servers": { "type": "array", "items": {"type": "string"}, "description": "Filter by server names" }, "categories": { "type": "array", "items": {"type": "string"}, "description": "Filter by category names" }, "integration_type": { "type": "string", "enum": ["REST", "MCP", "any"], "description": "Filter by integration type" }, "name_pattern": { "type": "string", "description": "Regex pattern to match tool names" }, "description_contains": { "type": "string", "description": "Full-text search in descriptions" }, "min_score": { "type": "number", "minimum": 0, "maximum": 1, "description": "Minimum semantic similarity score (0-1)" }, "has_examples": { "type": "boolean", "description": "Only return tools with usage examples" } } }, "limit": { "type": "integer", "default": 10, "minimum": 1, "maximum": 50, "description": "Maximum number of results" }, "include_schemas": { "type": "boolean", "default": false, "description": "Include full input/output schemas in results" }, "search_type": { "type": "string", "enum": ["semantic", "keyword", "hybrid"], "default": "semantic", "description": "Type of search to perform" } } } }, { "name": "list_tools", "description": "List all available tools with pagination. Use this to browse the complete tool catalog or filter by criteria.", "inputSchema": { "type": "object", "properties": { "page": {"type": "integer", "default": 1, "minimum": 1}, "page_size": {"type": "integer", "default": 20, "minimum": 1, "maximum": 100}, "sort_by": { "type": "string", "enum": ["name", "created_at", "execution_count", "success_rate", "category"], "default": "name" }, "sort_order": {"type": "string", "enum": ["asc", "desc"], "default": "asc"}, "filters": { "type": "object", "description": "Same filter options as search_tools" }, "include_schemas": {"type": "boolean", "default": false} } } }, { "name": "describe_tool", "description": "Get complete details about a specific tool including its full schema, examples, and usage metrics. Always call this before executing an unfamiliar tool.", "inputSchema": { "type": "object", "properties": { "tool_name": { "type": "string", "description": "Full tool name (server/tool_name) or tool ID" }, "include_examples": {"type": "boolean", "default": true}, "include_metrics": {"type": "boolean", "default": false}, "include_similar": {"type": "boolean", "default": false} }, "required": ["tool_name"] } }, { "name": "execute_tool", "description": "Execute a tool by its full name. The meta-server handles routing, authentication, and error handling.", "inputSchema": { "type": "object", "properties": { "tool_name": { "type": "string", "description": "Full tool name (server/tool_name) or tool ID" }, "arguments": { "type": "object", "description": "Tool-specific arguments matching the tool's input schema" }, "options": { "type": "object", "properties": { "timeout_ms": {"type": "integer", "default": 30000, "description": "Execution timeout"}, "include_metadata": {"type": "boolean", "default": true} } } }, "required": ["tool_name", "arguments"] } }, { "name": "get_tool_categories", "description": "Get a list of all tool categories and their counts. Use this to understand what kinds of tools are available.", "inputSchema": { "type": "object", "properties": { "include_tags": {"type": "boolean", "default": true}, "include_servers": {"type": "boolean", "default": false} } } }, { "name": "get_similar_tools", "description": "Find tools similar to a given tool. Useful for discovering alternatives or complementary tools.", "inputSchema": { "type": "object", "properties": { "tool_name": { "type": "string", "description": "Reference tool name to find similar tools for" }, "limit": {"type": "integer", "default": 5, "minimum": 1, "maximum": 20} }, "required": ["tool_name"] } } ] }Complete Execution Flow
sequenceDiagram participant AI as AI Agent participant Meta as Meta-Server participant Scope as Scope Filter participant Embed as Embedding Service participant Index as Tool Index (pgvector) participant Router as Tool Router participant Backend as Backend Servers Note over AI,Meta: Discovery Phase AI->>Meta: get_tool_categories() Meta->>Scope: Apply scope filters Meta-->>AI: Categories, tags, counts AI->>Meta: search_tools("analyze spreadsheet data") Meta->>Scope: Apply scope filters Meta->>Embed: Generate query embedding Embed-->>Meta: Query vector Meta->>Index: Semantic similarity search Index-->>Meta: Top-K tool IDs + scores Meta->>Scope: Filter results by scope Meta-->>AI: Matching tools with scores Note over AI,Meta: Understanding Phase AI->>Meta: describe_tool("analytics/spreadsheet_analyzer") Meta->>Scope: Verify tool in scope Meta-->>AI: Full schema, examples, metrics Note over AI,Meta: Execution Phase AI->>Meta: execute_tool("analytics/spreadsheet_analyzer", {...}) Meta->>Scope: Verify tool in scope Meta->>Meta: Validate arguments vs schema Meta->>Router: Route to backend Router->>Backend: Invoke tool (with auth) Backend-->>Router: Result Router-->>Meta: Result Meta-->>AI: Formatted result + metadata🔒 Tool Hiding Mechanism
When
hide_underlying_tools: true:execute_toolsearch_toolsandlist_toolsmeta-tools🔍 Search Filter Types
query"convert PDF to text"tags["production", "stable"]exclude_tags["deprecated", "experimental"]servers["analytics-server"]categories["Data Processing"]integration_type"MCP"name_pattern"^report_.*"description_contains"spreadsheet"min_score0.75has_examplestruevisibility["public", "team"]teams["finance-team"]📋 Implementation Tasks
Meta-Server Type
hide_underlying_toolsflagsearch_tools Implementation
list_tools Implementation
describe_tool Implementation
execute_tool Implementation
get_tool_categories Implementation
get_similar_tools Implementation
Tool Hiding Logic
Admin UI
Testing
⚙️ Configuration Example
✅ Success Criteria
search_toolsreturns accurate semantic results with <100ms latencylist_toolsprovides efficient paginated browsingdescribe_toolreturns complete tool informationexecute_toolroutes correctly to any backendget_tool_categoriesprovides accurate taxonomyget_similar_toolsfinds relevant alternatives🔗 Related Issues