Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

create_sample

Register new research samples in RSpace inventory with metadata, quantity tracking, and automatic subsample creation for organized lab management.

Instructions

Creates a new sample in the inventory system

Usage: Register new samples with metadata and quantity tracking Subsamples: Automatically creates specified number of subsample aliquots Quantity: Tracks total amount with specified units (ml, mg, μl, etc.)

Returns: Created sample information including generated subsample IDs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
tagsNo
descriptionNo
subsample_countNo
total_quantity_valueNo
total_quantity_unitNoml

Implementation Reference

  • main.py:743-775 (handler)
    The MCP tool handler for 'create_sample'. Decorated with @mcp.tool for automatic registration and execution. Handles sample creation with parameters for name, tags, description, subsample count, and quantity. Calls the underlying inv_cli.create_sample.
    @mcp.tool(tags={"rspace", "inventory", "samples"}) def create_sample( name: str, tags: List[str] = None, description: str = None, subsample_count: int = 1, total_quantity_value: float = None, total_quantity_unit: str = "ml" ) -> dict: """ Creates a new sample in the inventory system Usage: Register new samples with metadata and quantity tracking Subsamples: Automatically creates specified number of subsample aliquots Quantity: Tracks total amount with specified units (ml, mg, μl, etc.) Returns: Created sample information including generated subsample IDs """ tag_objects = i.gen_tags(tags) if tags else [] quantity = None if total_quantity_value: from rspace_client.inv import quantity_unit as qu unit = qu.QuantityUnit.of(total_quantity_unit) quantity = i.Quantity(total_quantity_value, unit) return inv_cli.create_sample( name=name, tags=tag_objects, description=description, subsample_count=subsample_count, total_quantity=quantity )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rspace-os/rspace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server