search_by_type
Find Israeli land tenders by property type or land use purpose, such as residential or commercial projects, to identify relevant development opportunities.
Instructions
Search tenders by type or land use purpose
Find tenders of specific types (residential, commercial, etc.) or purposes (low-rise construction, offices, etc.).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | Yes |
Implementation Reference
- The MCP tool handler function that implements the search_by_type tool logic. It processes TypeSearchArgs, calls the underlying api_client.search_by_type method, formats the results, and handles errors.@mcp.tool() def search_by_type(args: TypeSearchArgs) -> Dict[str, Any]: """ Search tenders by type or land use purpose Find tenders of specific types (residential, commercial, etc.) or purposes (low-rise construction, offices, etc.). """ try: results = api_client.search_by_type( tender_types=args.tender_types, purpose=args.purpose ) if isinstance(results, list): tender_list = results else: tender_list = results.get("results", results) return { "success": True, "count": len(tender_list), "tenders": tender_list, "type_search": { "tender_types": args.tender_types, "purpose": args.purpose, }, } except Exception as e: return { "success": False, "error": str(e), "type_search": { "tender_types": args.tender_types, "purpose": args.purpose, }, }
- Pydantic BaseModel defining the input schema (arguments) for the search_by_type MCP tool.class TypeSearchArgs(BaseModel): """Arguments for type-based search""" tender_types: Optional[List[int]] = Field( None, description="List of tender type IDs (1-9)" ) purpose: Optional[str] = Field(None, description="Land use purpose") active_only: bool = Field(False, description="Only return active tenders")
- src/remy_mcp/server.py:19-20 (registration)Registration of all tools including search_by_type via register_tools(mcp, api_client) in the main MCP server setup.# Register tools and resources register_tools(mcp, api_client)
- src/remy_mcp/tools/__init__.py:9-12 (registration)Intermediate registration function that calls register_tender_tools(mcp, api_client), which defines and registers the search_by_type tool using @mcp.tool() decorator.def register_tools(mcp, api_client): """Register all MCP tools""" register_tender_tools(mcp, api_client) register_settlement_tools(mcp, api_client)
- Supporting method in the API client that implements the core search_by_type functionality by calling the general search_tenders with type/purpose filters. Called by the MCP tool handler.def search_by_type( self, tender_types: Optional[List[int]] = None, purpose: Optional[str] = None ) -> List[Dict[str, Any]]: """ Search tenders by type or purpose Args: tender_types: List of tender type IDs purpose: Land use purpose Returns: List of type-specific tenders """ return self.search_tenders( tender_types=tender_types, purpose=purpose, page_size=10000 )