GetRecord
Retrieve a specific record from the RushDB graph database by providing its unique ID, enabling quick access to stored data for AI agents and development teams.
Instructions
Get a specific record by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| recordId | Yes | ID of the record to retrieve |
Implementation Reference
- tools/GetRecord.ts:17-23 (handler)The core handler function that executes the GetRecord tool logic: fetches a specific record by its ID from the database using db.records.findById and returns the data.export async function GetRecord(params: { recordId: string }) { const { recordId } = params const result = await db.records.findById(recordId) return result.data }
- tools.ts:160-167 (schema)Input schema definition for the GetRecord tool, specifying that it requires a 'recordId' string parameter. This schema is used for tool listing and validation in the MCP server.name: 'GetRecord', description: 'Get a specific record by ID', inputSchema: { type: 'object', properties: { recordId: { type: 'string', description: 'ID of the record to retrieve' } }, required: ['recordId'] } },
- index.ts:208-219 (registration)Registration and dispatch logic in the MCP server's CallToolRequestHandler: imports the GetRecord handler and invokes it in the switch statement when the tool is called, formatting the response as MCP content.case 'GetRecord': const record = await GetRecord({ recordId: args.recordId as string }) return { content: [ { type: 'text', text: JSON.stringify(record, null, 2) } ] }