Skip to main content
Glama

surreal-mcp

update

Replace all fields in a SurrealDB record with new data while preserving the record ID and creation timestamp. Use for complete record updates rather than partial modifications.

Instructions

Update a specific record with new data, completely replacing its content.

This tool performs a full update, replacing all fields (except ID and timestamps) with the provided data. For partial updates that only modify specific fields, use 'merge' or 'patch' instead.

Args: thing: The full record ID to update in format "table:id" (e.g., "user:john", "product:laptop-123") data: Complete new data for the record. All existing fields will be replaced except: - The record ID (cannot be changed) - The 'created' timestamp (preserved from original) - The 'updated' timestamp (automatically set to current time)

Returns: A dictionary containing: - success: Boolean indicating if update was successful - data: The updated record with all new values - error: Error message if update failed (only present on failure)

Examples: >>> await update("user:john", {"name": "John Smith", "email": "john.smith@example.com", "age": 31}) { "success": true, "data": {"id": "user:john", "name": "John Smith", "email": "john.smith@example.com", "age": 31, "updated": "2024-01-01T10:00:00Z"} }

Warning: This replaces ALL fields. If you only want to update specific fields, use 'merge' instead.

Input Schema

NameRequiredDescriptionDefault
dataYes
thingYes

Input Schema (JSON Schema)

{ "properties": { "data": { "additionalProperties": true, "title": "Data", "type": "object" }, "thing": { "title": "Thing", "type": "string" } }, "required": [ "thing", "data" ], "type": "object" }

Other Tools from surreal-mcp

Related Tools

    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/lfnovo/surreal-mcp'

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