Skip to main content
Glama

UpdateRecord

Modify existing records in RushDB by providing record ID, label, and partial data updates. Supports optional transaction IDs for atomic operations.

Instructions

Update an existing record (partial update)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe updated (partial) record data
labelYesLabel for the record
recordIdYesID of the record to update
transactionIdNoOptional transaction ID for atomic update

Implementation Reference

  • Core handler function that performs the record update using the database utility.
    export async function UpdateRecord(params: { recordId: string label: string data: Record<string, any> transactionId?: string }) { const { recordId, label, data, transactionId } = params await db.records.update({ target: recordId, label, data }, transactionId) return { success: true, message: `Record updated successfully` } }
  • Input schema definition for the UpdateRecord tool, used for validation and tool listing.
    { name: 'UpdateRecord', description: 'Update an existing record (partial update)', inputSchema: { type: 'object', properties: { recordId: { type: 'string', description: 'ID of the record to update' }, label: { type: 'string', description: 'Label for the record' }, data: { type: 'object', description: 'The updated (partial) record data' }, transactionId: { type: 'string', description: 'Optional transaction ID for atomic update' } }, required: ['recordId', 'label', 'data'] } },
  • index.ts:152-166 (registration)
    Registration and dispatching of the UpdateRecord tool call within the MCP server's callTool handler.
    case 'UpdateRecord': const updateResult = await UpdateRecord({ recordId: args.recordId as string, label: args.label as string, data: args.data as Record<string, any>, transactionId: args.transactionId as string | undefined }) return { content: [ { type: 'text', text: updateResult.message } ] }

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/1pxone/RushDB'

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