Skip to main content
Glama
rspace-os

RSpace MCP Server

Official
by rspace-os

add_extra_fields_to_item

Extend RSpace inventory items with custom metadata fields for experiments or projects, supporting text and number data types to organize research data.

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
field_dataYes
item_idYes

Implementation Reference

  • This is the main handler function for the 'add_extra_fields_to_item' tool, decorated with @mcp.tool for automatic registration. It processes a list of field data dictionaries, converts them to RSpace ExtraField objects, and calls the inventory client's add_extra_fields method to attach custom metadata fields to the specified inventory item.
    @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)

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