Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

create_sample

Register new laboratory samples in RSpace with metadata, quantity tracking, and automatic subsample aliquot creation for research inventory 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
descriptionNo
nameYes
subsample_countNo
tagsNo
total_quantity_unitNoml
total_quantity_valueNo

Implementation Reference

  • main.py:743-775 (handler)
    Core handler implementation for the 'create_sample' MCP tool. Processes tags and quantity parameters, then delegates to inv_cli.create_sample to create inventory samples with subsamples.
    @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 )
  • main.py:743-743 (registration)
    MCP tool registration decorator for create_sample, automatically discovered by FastMCP framework on server startup.
    @mcp.tool(tags={"rspace", "inventory", "samples"})
  • Input schema defined by function type hints and defaults for the create_sample tool.
    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:

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