search_inventory
Search inventory items in RSpace by name, tags, or description to find samples, containers, or templates 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-858 (handler)The search_inventory tool handler function, decorated with @mcp.tool for automatic registration in the MCP server. It performs a search across inventory items using the provided query and optional result_type, converting the result_type to the appropriate enum and delegating to inv_cli.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)
- main.py:845-845 (registration)The @mcp.tool decorator registers the search_inventory function as an MCP tool with tags for categorization and discovery.@mcp.tool(tags={"rspace", "inventory", "samples"})