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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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
        )
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses behavioral traits such as automatic creation of subsample aliquots and quantity tracking with units, which adds useful context beyond the schema. However, it does not cover important aspects like permissions needed, whether the operation is idempotent, or error handling, leaving gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with four concise sentences, each adding value: purpose, usage, subsample behavior, and return information. It is front-loaded with the main purpose first, though the structure could be slightly improved by grouping related details more tightly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (so return values are documented elsewhere), no annotations, and 6 parameters with 0% schema coverage, the description does a good job covering key aspects like behavior and parameter semantics. It is complete enough for basic understanding but could enhance guidelines and transparency for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that parameters relate to metadata, subsample aliquots, and quantity tracking with units like ml or mg, which clarifies the purpose of 'subsample_count', 'total_quantity_value', and 'total_quantity_unit'. However, it does not detail all 6 parameters (e.g., 'tags', 'description'), so it partially compensates but not fully.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool creates a new sample in the inventory system, specifying the verb 'creates' and resource 'sample'. It distinguishes from siblings like 'bulk_create_samples' by focusing on single sample creation, though not explicitly contrasting them. The purpose is specific but lacks explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for registering new samples with metadata and quantity tracking, but does not explicitly state when to use this tool versus alternatives like 'bulk_create_samples' or 'create_sample_template'. It provides some context (e.g., for tracking samples) but lacks clear exclusions or named alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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