list_sample_templates
Browse available sample templates to reuse existing formats when creating new samples, returning paginated template metadata.
Instructions
Lists available sample templates for reuse
Usage: Browse existing templates before creating new samples Returns: Paginated list of template metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page_size | No |
Implementation Reference
- main.py:1104-1113 (handler)The handler function for the 'list_sample_templates' MCP tool. Decorated with @mcp.tool for automatic registration. Implements pagination and delegates the listing logic to the inv_cli InventoryClient instance.@mcp.tool(tags={"rspace", "inventory", "templates"}) def list_sample_templates(page_size: int = 20) -> dict: """ Lists available sample templates for reuse Usage: Browse existing templates before creating new samples Returns: Paginated list of template metadata """ pagination = i.Pagination(page_size=page_size) return inv_cli.list_sample_templates(pagination)
- main.py:1104-1104 (registration)The @mcp.tool decorator registers the list_sample_templates function as an MCP tool with tags for categorization.@mcp.tool(tags={"rspace", "inventory", "templates"})
- main.py:90-90 (helper)Initialization of the inv_cli instance used by the tool handler to perform the actual API call to list sample templates.inv_cli = i.InventoryClient(api_url, api_key) # Inventory Management operations