search_apis
Discover available actions and tools within the Jentic MCP server by describing your intent. Find functionalities like managing servers or sending messages quickly.
Instructions
Search for available actions or information based on what the user wants to do (e.g., 'find Discord servers', 'send a message'). Use this first to understand what's possible.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| capability_description | Yes | Natural language description of the action needed (e.g., 'send emails', 'weather forecasting', 'natural language processing') | |
| keywords | No | Optional list of specific keywords to help narrow down the search | |
| max_results | No | Maximum number of actions to return |
Implementation Reference
- mcp/src/mcp/adapters/mcp.py:20-47 (handler)Core implementation of the search_apis tool handler in MCPAdapter. Constructs SearchRequest and calls Jentic SDK search method.async def search_api_capabilities(self, request: dict[str, Any]) -> dict[str, Any]: """MCP endpoint for searching API capabilities. Args: request: MCP tool request parameters. Returns: MCP tool response. """ # Build SearchRequest using the new SDK search_request = SearchRequest( query=request.get("capability_description") or request.get("query", ""), keywords=request.get("keywords"), limit=request.get("max_results", 5), apis=request.get("api_names"), ) search_response = await self.jentic.search(search_request) # We adopt the unified results list returned by SearchResponse response_data = search_response.model_dump(exclude_none=False) return { "result": { "matches": response_data, "query": search_request.query, "total_matches": search_response.total_count, } }
- mcp/src/mcp/tools.py:18-46 (schema)JSON schema definition for the search_apis tool, defining input parameters and structure.SEARCH_API_CAPABILITIES_TOOL = { "name": "search_apis", "description": "Search for available actions or information based on what the user wants to do (e.g., 'find Discord servers', 'send a message'). Use this first to understand what's possible.", "parameters": { "type": "object", "properties": { "capability_description": { "type": "string", "description": "Natural language description of the action needed (e.g., 'send emails', 'weather forecasting', 'natural language processing')", }, "keywords": { "type": "array", "description": "Optional list of specific keywords to help narrow down the search", "items": {"type": "string"}, }, "max_results": { "type": "integer", "description": "Maximum number of actions to return", "default": 5, }, "api_names": { "type": "array", "description": "Optional list of API names to restrict results to specific APIs. Use vendor format (e.g., 'google.com') or sub-API format (e.g., 'atlassian.com/jira'). Only results from these APIs will be shown, regardless of search query.", "items": {"type": "string"}, }, }, "required": ["capability_description"], }, }
- mcp/src/mcp/handlers.py:45-50 (registration)Registration of search_apis handler in the general request handler mapping.tool_handlers = { "search_apis": mcp_adapter.search_api_capabilities, "load_execution_info": mcp_adapter.generate_runtime_config, "execute": mcp_adapter.execute, # Add the execute tool handler "submit_feedback": mcp_adapter.submit_feedback }
- mcp/src/mcp/transport/stdio.py:36-42 (registration)Registration of search_apis in stdio transport handlers dictionary.self._handlers = { "search_apis": self._handle_search_api_capabilities, "load_execution_info": self._handle_generate_runtime_from_selection_set, "generate_code_sample": self._handle_generate_code_sample, "execute": self._handle_execute, # Add execute handler "submit_feedback": self._handle_submit_feedback, # Add submit_feedback handler }
- mcp/src/mcp/transport/http.py:76-81 (registration)HTTP endpoint registration for search_apis in HTTP transport, delegating to adapter.@self._app.post("/api/search_apis") async def search_api_capabilities(request: Request): """MCP endpoint for searching API capabilities.""" data = await request.json() result = await self.adapter.search_api_capabilities(data) return JSONResponse(result)