search_inventory
Search inventory items in RSpace by name, tags, or description to find samples, containers, or templates using text queries with relevance scoring.
Instructions
Searches across all inventory items using text query
Usage: Find samples, containers, or templates by name, tags, or description Result types: 'SAMPLE', 'SUBSAMPLE', 'CONTAINER', 'TEMPLATE' (or None for all) Returns: Matching items with relevance scoring
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| result_type | No |
Implementation Reference
- main.py:845-857 (handler)The core handler function implementing the 'search_inventory' tool. Decorated with @mcp.tool for automatic registration in the MCP server. Converts the result_type parameter to an enum value and calls the underlying inv_cli.search method to perform the inventory search.@mcp.tool(tags={"rspace", "inventory", "samples"}) def search_inventory(query: str, result_type: str = None) -> dict: """ Searches across all inventory items using text query Usage: Find samples, containers, or templates by name, tags, or description Result types: 'SAMPLE', 'SUBSAMPLE', 'CONTAINER', 'TEMPLATE' (or None for all) Returns: Matching items with relevance scoring """ rt = None if result_type: rt = getattr(i.ResultType, result_type.upper(), None) return inv_cli.search(query, result_type=rt)