Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

add_extra_fields_to_item

Extend inventory items with custom metadata fields for experiments or projects. Add text or numeric data to organize research information in RSpace.

Instructions

Adds custom metadata fields to inventory items

Usage: Extend items with experiment-specific or project-specific data Field format: [{"name": "Field Name", "type": "text|number", "content": "value"}] Types: 'text' for strings, 'number' for numeric values

Returns: Updated item with new custom fields

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYes
field_dataYes

Implementation Reference

  • Handler function decorated with @mcp.tool for registration. Processes list of dicts into ExtraField objects and adds them to the inventory item via inv_cli.
    @mcp.tool(tags={"rspace", "inventory", "utility"}) def add_extra_fields_to_item(item_id: Union[int, str], field_data: List[dict]) -> dict: """ Adds custom metadata fields to inventory items Usage: Extend items with experiment-specific or project-specific data Field format: [{"name": "Field Name", "type": "text|number", "content": "value"}] Types: 'text' for strings, 'number' for numeric values Returns: Updated item with new custom fields """ extra_fields = [] for field in field_data: field_type = i.ExtraFieldType.TEXT if field.get('type', 'text').lower() == 'text' else i.ExtraFieldType.NUMBER ef = i.ExtraField(field['name'], field_type, field.get('content', '')) extra_fields.append(ef) return inv_cli.add_extra_fields(item_id, *extra_fields)
  • Type hints and docstring define the input schema: item_id as int/str, field_data as List[dict] with name, type (text/number), content.
    def add_extra_fields_to_item(item_id: Union[int, str], field_data: List[dict]) -> dict: """ Adds custom metadata fields to inventory items Usage: Extend items with experiment-specific or project-specific data Field format: [{"name": "Field Name", "type": "text|number", "content": "value"}] Types: 'text' for strings, 'number' for numeric values Returns: Updated item with new custom fields """
  • main.py:1131-1131 (registration)
    The @mcp.tool decorator automatically registers the tool with the MCP server.
    @mcp.tool(tags={"rspace", "inventory", "utility"})

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