Skip to main content
Glama

CreateRecord

Add new records to your RushDB graph database by specifying labels and data fields for structured storage.

Instructions

Create a new record in the database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelYesLabel for the record
dataYesThe record data to insert
transactionIdNoOptional transaction ID for atomic creation

Implementation Reference

  • The main handler function that executes the CreateRecord tool logic by calling db.records.create to insert a new record.
    export async function CreateRecord(params: {
      label: string
      data: Record<string, any>
      transactionId?: string
    }) {
      const { label, data, transactionId } = params
    
      const result = await db.records.create({ label, data }, transactionId)
    
      return {
        success: true,
        id: result.id(),
        message: `Record created successfully with label '${label}'`
      }
    }
  • JSON schema definition for the CreateRecord tool input, used for validation in the MCP tool list.
    {
      name: 'CreateRecord',
      description: 'Create a new record in the database',
      inputSchema: {
        type: 'object',
        properties: {
          label: { type: 'string', description: 'Label for the record' },
          data: { type: 'object', description: 'The record data to insert' },
          transactionId: { type: 'string', description: 'Optional transaction ID for atomic creation' }
        },
        required: ['label', 'data']
      }
    },
  • index.ts:137-150 (registration)
    Registration of the CreateRecord handler in the MCP server's CallToolRequestSchema switch dispatcher.
    case 'CreateRecord':
      const createResult = await CreateRecord({
        label: args.label as string,
        data: args.data as Record<string, any>,
        transactionId: args.transactionId as string | undefined
      })
      return {
        content: [
          {
            type: 'text',
            text: `${createResult.message}\nID: ${createResult.id}`
          }
        ]
      }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Create a new record' which implies a write operation, but lacks details on permissions, idempotency, error handling, or response format. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core purpose without unnecessary elaboration.

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

Completeness2/5

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

Given the tool's complexity as a write operation with no annotations and no output schema, the description is incomplete. It fails to address behavioral aspects like atomicity hints from 'transactionId', potential side effects, or what the return value might be, leaving critical gaps for an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the input schema already documents all parameters (label, data, transactionId) with descriptions. The description adds no additional meaning beyond the schema, such as examples or constraints, resulting in a baseline score of 3.

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 action ('Create') and resource ('new record in the database'), making the purpose evident. However, it doesn't distinguish this tool from sibling tools like 'BulkCreateRecords' or 'SetRecord', which appear to have similar creation functions, missing explicit differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as 'BulkCreateRecords' for multiple records or 'SetRecord' which might imply upsert behavior. There's no mention of prerequisites, context, or exclusions, leaving usage unclear relative to siblings.

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/rush-db/RushDB'

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