Skip to main content
Glama

FindUniqRecord

Locate a specific record in RushDB's graph database using search criteria and label filters to identify unique data entries.

Instructions

Find a unique record that matches the given search criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
labelsNoFilter by record labels
whereNoSearch conditions for finding the unique record

Implementation Reference

  • The core handler function that performs a unique record lookup using the database client with optional labels and where conditions.
    export async function FindUniqRecord(params: { labels?: string[]; where?: Record<string, any> }) { const { labels, where } = params const result = await db.records.findUniq({ ...(labels && { labels }), ...(where && { where }) }) return result?.data || null }
  • Tool schema definition including name, description, and input validation schema for the FindUniqRecord tool.
    { name: 'FindUniqRecord', description: 'Find a unique record that matches the given search criteria', inputSchema: { type: 'object', properties: { labels: { type: 'array', items: { type: 'string' }, description: 'Filter by record labels' }, where: { type: 'object', description: 'Search conditions for finding the unique record' } }, required: [] } },
  • index.ts:382-394 (registration)
    Registration and dispatching logic in the MCP server handler that calls the FindUniqRecord tool function based on the tool name.
    case 'FindUniqRecord': const foundUniqRecord = await FindUniqRecord({ labels: args.labels as string[] | undefined, where: args.where as Record<string, any> | undefined }) return { content: [ { type: 'text', text: foundUniqRecord ? JSON.stringify(foundUniqRecord, null, 2) : 'No unique record found.' } ] }
  • index.ts:72-75 (registration)
    Server registration for listing tools, which includes the FindUniqRecord schema via the imported tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/1pxone/RushDB'

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